{
  "info": {
    "description": "Warehouse Management System JSON-RPC API",
    "title": "WMS API",
    "version": "1.0.0"
  },
  "methods": [
    {
      "name": "create_project",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "type": "object"
        }
      },
      "summary": "Create a project",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "project",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:a2c799262a3ce3c19ef5cdd983bf3d12b43ab3c426227091b909dcb7054738c0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_projects",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "type": "object"
        }
      },
      "summary": "List projects (filtered)",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "project",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:a2c799262a3ce3c19ef5cdd983bf3d12b43ab3c426227091b909dcb7054738c0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_project",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "type": "object"
        }
      },
      "summary": "Update a project",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "project",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:a2c799262a3ce3c19ef5cdd983bf3d12b43ab3c426227091b909dcb7054738c0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_project",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "type": "object"
        }
      },
      "summary": "Delete a project",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "project",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:a2c799262a3ce3c19ef5cdd983bf3d12b43ab3c426227091b909dcb7054738c0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "me",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserStatus": {
              "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Locked",
                    "Disabled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                  "enum": [
                    "Invited"
                  ],
                  "type": "string"
                }
              ]
            },
            "UserTyp": {
              "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
              "enum": [
                "User",
                "Admin",
                "Sys",
                "Agent"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "default": null,
              "description": "When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.",
              "type": [
                "string",
                "null"
              ]
            },
            "api_access": {
              "type": "boolean"
            },
            "date_format": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "employee_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "failed_login_attempts": {
              "format": "int32",
              "type": "integer"
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_failed_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "locale": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            },
            "password_age_days": {
              "description": "\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "pwd_changed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "rf_login": {
              "type": "boolean"
            },
            "status": {
              "$ref": "#/definitions/UserStatus"
            },
            "timezone": {
              "type": "string"
            },
            "typ": {
              "$ref": "#/definitions/UserTyp"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "api_access",
            "date_format",
            "email",
            "failed_login_attempts",
            "id",
            "locale",
            "mode",
            "rf_login",
            "status",
            "timezone",
            "typ",
            "username"
          ],
          "title": "UserInfo",
          "type": "object"
        }
      },
      "summary": "Get current user info",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:02b2f6fa01d4cd07437f3dbd6c2c4bf740cd02edfae35393b18e735f0ef1b7c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "UserStatus": {
                "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
                "oneOf": [
                  {
                    "enum": [
                      "Active",
                      "Locked",
                      "Disabled"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                    "enum": [
                      "Invited"
                    ],
                    "type": "string"
                  }
                ]
              },
              "UserTyp": {
                "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
                "enum": [
                  "User",
                  "Admin",
                  "Sys",
                  "Agent"
                ],
                "type": "string"
              }
            },
            "properties": {
              "date_format": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "employee_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "full_name": {
                "description": "What an admin can meaningfully set when creating an account through the Users screen. Deliberately does NOT include the AUDIT-block columns (`last_login_at`, `failed_login_attempts`, `last_failed_login_at`, `pwd_changed_at`) — those are server-owned facts nobody sets at creation time either; see `UserForUpdate`'s doc comment for the full reasoning.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "locale": {
                "type": "string"
              },
              "mode": {
                "type": "string"
              },
              "pwd_clear": {
                "description": "`pwd` is what the Users screen's field is called (form 171), as on [`UserForUpdate::pwd_clear`].",
                "type": "string"
              },
              "status": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/UserStatus"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "`None` leaves the column's DB default (`Active`) in place. An admin can still pick `Invited` explicitly for an account that hasn't set a password yet."
              },
              "timezone": {
                "type": "string"
              },
              "typ": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/UserTyp"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The New form's Type dropdown. `None` leaves the column default (`User`). Anything else is decided by a superuser only — see [`UserBmc::ensure_may_set_typ`]."
              },
              "username": {
                "type": "string"
              }
            },
            "required": [
              "date_format",
              "email",
              "locale",
              "mode",
              "pwd_clear",
              "timezone",
              "username"
            ],
            "title": "UserForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserStatus": {
              "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Locked",
                    "Disabled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                  "enum": [
                    "Invited"
                  ],
                  "type": "string"
                }
              ]
            },
            "UserTyp": {
              "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
              "enum": [
                "User",
                "Admin",
                "Sys",
                "Agent"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "default": null,
              "description": "When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.",
              "type": [
                "string",
                "null"
              ]
            },
            "api_access": {
              "type": "boolean"
            },
            "date_format": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "employee_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "failed_login_attempts": {
              "format": "int32",
              "type": "integer"
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_failed_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "locale": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            },
            "password_age_days": {
              "description": "\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "pwd_changed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "rf_login": {
              "type": "boolean"
            },
            "status": {
              "$ref": "#/definitions/UserStatus"
            },
            "timezone": {
              "type": "string"
            },
            "typ": {
              "$ref": "#/definitions/UserTyp"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "api_access",
            "date_format",
            "email",
            "failed_login_attempts",
            "id",
            "locale",
            "mode",
            "rf_login",
            "status",
            "timezone",
            "typ",
            "username"
          ],
          "title": "UserInfo",
          "type": "object"
        }
      },
      "summary": "Create a new user — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:981f493e3a99d7536b0f268979d1e3eeb89e7dc05b48e3549a91d8218031c85c",
      "x-quark-response-schema-hash": "sha256:02b2f6fa01d4cd07437f3dbd6c2c4bf740cd02edfae35393b18e735f0ef1b7c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserStatus": {
              "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Locked",
                    "Disabled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                  "enum": [
                    "Invited"
                  ],
                  "type": "string"
                }
              ]
            },
            "UserTyp": {
              "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
              "enum": [
                "User",
                "Admin",
                "Sys",
                "Agent"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "default": null,
              "description": "When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.",
              "type": [
                "string",
                "null"
              ]
            },
            "api_access": {
              "type": "boolean"
            },
            "date_format": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "employee_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "failed_login_attempts": {
              "format": "int32",
              "type": "integer"
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_failed_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "locale": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            },
            "password_age_days": {
              "description": "\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "pwd_changed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "rf_login": {
              "type": "boolean"
            },
            "status": {
              "$ref": "#/definitions/UserStatus"
            },
            "timezone": {
              "type": "string"
            },
            "typ": {
              "$ref": "#/definitions/UserTyp"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "api_access",
            "date_format",
            "email",
            "failed_login_attempts",
            "id",
            "locale",
            "mode",
            "rf_login",
            "status",
            "timezone",
            "typ",
            "username"
          ],
          "title": "UserInfo",
          "type": "object"
        }
      },
      "summary": "Get a user by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:02b2f6fa01d4cd07437f3dbd6c2c4bf740cd02edfae35393b18e735f0ef1b7c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserInfo": {
              "properties": {
                "add_when": {
                  "default": null,
                  "description": "When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "api_access": {
                  "type": "boolean"
                },
                "date_format": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "employee_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "failed_login_attempts": {
                  "format": "int32",
                  "type": "integer"
                },
                "full_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_failed_login_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_login_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "locale": {
                  "type": "string"
                },
                "mode": {
                  "type": "string"
                },
                "password_age_days": {
                  "description": "\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pwd_changed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rf_login": {
                  "type": "boolean"
                },
                "status": {
                  "$ref": "#/definitions/UserStatus"
                },
                "timezone": {
                  "type": "string"
                },
                "typ": {
                  "$ref": "#/definitions/UserTyp"
                },
                "username": {
                  "type": "string"
                }
              },
              "required": [
                "api_access",
                "date_format",
                "email",
                "failed_login_attempts",
                "id",
                "locale",
                "mode",
                "rf_login",
                "status",
                "timezone",
                "typ",
                "username"
              ],
              "type": "object"
            },
            "UserStatus": {
              "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Locked",
                    "Disabled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                  "enum": [
                    "Invited"
                  ],
                  "type": "string"
                }
              ]
            },
            "UserTyp": {
              "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
              "enum": [
                "User",
                "Admin",
                "Sys",
                "Agent"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/UserInfo"
          },
          "title": "Array_of_UserInfo",
          "type": "array"
        }
      },
      "summary": "List user — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b952496a7f5f3ffb1cd384f742dfddc52b61d7aeff5c13bcd642b0e9ba902ccb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count user — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Security-owned user patch. Login/audit facts are absent by construction; nullable profile fields retain explicit keep/clear/set semantics.",
            "properties": {
              "api_access": {
                "type": "boolean"
              },
              "date_format": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "employee_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "full_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "locale": {
                "type": "string"
              },
              "mode": {
                "type": "string"
              },
              "pwd_clear": {
                "type": "string"
              },
              "rf_login": {
                "type": "boolean"
              },
              "status": {
                "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
                "oneOf": [
                  {
                    "enum": [
                      "Active",
                      "Locked",
                      "Disabled"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                    "enum": [
                      "Invited"
                    ],
                    "type": "string"
                  }
                ]
              },
              "timezone": {
                "type": "string"
              },
              "typ": {
                "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
                "enum": [
                  "User",
                  "Admin",
                  "Sys",
                  "Agent"
                ],
                "type": "string"
              },
              "username": {
                "type": "string"
              }
            },
            "title": "UserUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserStatus": {
              "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Locked",
                    "Disabled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                  "enum": [
                    "Invited"
                  ],
                  "type": "string"
                }
              ]
            },
            "UserTyp": {
              "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
              "enum": [
                "User",
                "Admin",
                "Sys",
                "Agent"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "default": null,
              "description": "When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.",
              "type": [
                "string",
                "null"
              ]
            },
            "api_access": {
              "type": "boolean"
            },
            "date_format": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "employee_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "failed_login_attempts": {
              "format": "int32",
              "type": "integer"
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_failed_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "locale": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            },
            "password_age_days": {
              "description": "\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "pwd_changed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "rf_login": {
              "type": "boolean"
            },
            "status": {
              "$ref": "#/definitions/UserStatus"
            },
            "timezone": {
              "type": "string"
            },
            "typ": {
              "$ref": "#/definitions/UserTyp"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "api_access",
            "date_format",
            "email",
            "failed_login_attempts",
            "id",
            "locale",
            "mode",
            "rf_login",
            "status",
            "timezone",
            "typ",
            "username"
          ],
          "title": "UserInfo",
          "type": "object"
        }
      },
      "summary": "Update an account through the guarded security model; audit facts are read-only.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8eefa8522ee804773576faf11bfdc595e6fbf71990356e3b8f380eb4036ed122",
      "x-quark-response-schema-hash": "sha256:02b2f6fa01d4cd07437f3dbd6c2c4bf740cd02edfae35393b18e735f0ef1b7c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserStatus": {
              "description": "Mirror of the `user_status` PostgreSQL enum (`enterprise` migration 044, tenant-manager migration 005).",
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Locked",
                    "Disabled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The account exists but its owner has not set a password yet. Allowed through: without a password there is nothing to sign in with, and once one is set the account is in use.",
                  "enum": [
                    "Invited"
                  ],
                  "type": "string"
                }
              ]
            },
            "UserTyp": {
              "description": "Mirror of the `enterprise.user_typ` PostgreSQL enum (migration 021).\n\nLifting `user.typ` from a stringly-typed column to a real enum gets us: - DB-level whitelist (insert/update of an unknown variant fails). - Compile-time exhaustive matching at every read site (was previously ad-hoc `matches!(s.as_str(), \"Admin\" | \"Sys\")` in `role_resolver`/`tx_helper`/`admin_rbac`).",
              "enum": [
                "User",
                "Admin",
                "Sys",
                "Agent"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "default": null,
              "description": "When the account was created — the AUDIT block's \"Created\" field.\n\n`add_when` is NOT NULL on both `enterprise.user` and tenant-manager's `user`, so this is `Option` to tolerate a projection that did not select it, not because a created account can lack a creation time.\n\nAdded late, and the reason is worth keeping: migration 317 put \"Created\" on the detail form reading `add_when`, but this struct — the only thing the `is_rpc` BIO's `get_user` path can return — never carried the column, so the field rendered permanently blank. The form was right; the projection was short.",
              "type": [
                "string",
                "null"
              ]
            },
            "api_access": {
              "type": "boolean"
            },
            "date_format": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "employee_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "failed_login_attempts": {
              "format": "int32",
              "type": "integer"
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_failed_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_login_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "locale": {
              "type": "string"
            },
            "mode": {
              "type": "string"
            },
            "password_age_days": {
              "description": "\"Password age\" for the AUDIT block — derived from `pwd_changed_at`, in whole days. **Not a database column**: `#[field(skip)]` keeps it out of the SELECT projection (`sea_column_refs`), and `#[sqlx(default)]` keeps `derive(FromRow)` from trying to read a `password_age_days` column that doesn't exist. Populated by `UserBy::finish_computed_fields`, which every `UserBmc` fetch path calls — see there. `None` whenever `pwd_changed_at` is `None`; never a misleading `0`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "pwd_changed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "rf_login": {
              "type": "boolean"
            },
            "status": {
              "$ref": "#/definitions/UserStatus"
            },
            "timezone": {
              "type": "string"
            },
            "typ": {
              "$ref": "#/definitions/UserTyp"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "api_access",
            "date_format",
            "email",
            "failed_login_attempts",
            "id",
            "locale",
            "mode",
            "rf_login",
            "status",
            "timezone",
            "typ",
            "username"
          ],
          "title": "UserInfo",
          "type": "object"
        }
      },
      "summary": "Delete a user by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:02b2f6fa01d4cd07437f3dbd6c2c4bf740cd02edfae35393b18e735f0ef1b7c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_user",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple user by IDs — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "user",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_system_settings",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "config_key": {
                "type": "string"
              },
              "config_value": {
                "type": "string"
              },
              "default_value": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "editable": {
                "type": "boolean"
              }
            },
            "required": [
              "config_key",
              "config_value",
              "default_value",
              "editable"
            ],
            "title": "SystemSettingsForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "config_key": {
              "type": "string"
            },
            "config_value": {
              "type": "string"
            },
            "default_value": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "config_key",
            "config_value",
            "default_value",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "SystemSettings",
          "type": "object"
        }
      },
      "summary": "Create a new system_settings — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sys_settings",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:29c6b0c5b6d71899524294fe695fb88f99111b8b7929c5d4819d0f64a02ce788",
      "x-quark-response-schema-hash": "sha256:2958f2dd06aa1bdd9ac37a7c8d8414a7c01036b51a5518ced1a8d001e7da72bd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_system_settings",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "config_key": {
              "type": "string"
            },
            "config_value": {
              "type": "string"
            },
            "default_value": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "config_key",
            "config_value",
            "default_value",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "SystemSettings",
          "type": "object"
        }
      },
      "summary": "Get a system_settings by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sys_settings",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:2958f2dd06aa1bdd9ac37a7c8d8414a7c01036b51a5518ced1a8d001e7da72bd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_system_settings",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SystemSettings": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "config_key": {
                  "type": "string"
                },
                "config_value": {
                  "type": "string"
                },
                "default_value": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "editable": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "config_key",
                "config_value",
                "default_value",
                "editable",
                "id",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SystemSettings"
          },
          "title": "Array_of_SystemSettings",
          "type": "array"
        }
      },
      "summary": "List system_settings — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sys_settings",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:e5e742f573d9d54f969ddec3f2e7dbfa8216b1d206caa71f4e9e12935260e65d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_system_settings",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Only the current value is operator-owned. Key/default/description and the editable bit are deployment metadata.",
            "properties": {
              "config_value": {
                "type": "string"
              }
            },
            "title": "SystemSettingsUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "config_key": {
              "type": "string"
            },
            "config_value": {
              "type": "string"
            },
            "default_value": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "config_key",
            "config_value",
            "default_value",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "SystemSettings",
          "type": "object"
        }
      },
      "summary": "Update the value of an editable system setting; metadata is immutable.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sys_settings",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:08004292848f9cd8f9f51c78fd0ea6e651dc4658256648b0784a41ce26fa6dfe",
      "x-quark-response-schema-hash": "sha256:2958f2dd06aa1bdd9ac37a7c8d8414a7c01036b51a5518ced1a8d001e7da72bd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_system_settings",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "config_key": {
              "type": "string"
            },
            "config_value": {
              "type": "string"
            },
            "default_value": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "config_key",
            "config_value",
            "default_value",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "SystemSettings",
          "type": "object"
        }
      },
      "summary": "Delete a system_settings by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sys_settings",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:2958f2dd06aa1bdd9ac37a7c8d8414a7c01036b51a5518ced1a8d001e7da72bd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_admin_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WarehouseAdminRow": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "length_uom": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "readiness": {
                  "$ref": "#/definitions/WarehouseReadiness"
                },
                "readiness_label": {
                  "type": "string"
                },
                "readiness_reason": {
                  "type": "string"
                },
                "schema_name": {
                  "type": "string"
                },
                "volume_uom": {
                  "type": "string"
                },
                "weight_uom": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "id",
                "is_active",
                "length_uom",
                "name",
                "readiness",
                "readiness_label",
                "readiness_reason",
                "schema_name",
                "volume_uom",
                "weight_uom"
              ],
              "type": "object"
            },
            "WarehouseReadiness": {
              "enum": [
                "ready",
                "needs_provisioning",
                "outdated",
                "invalid"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/WarehouseAdminRow"
          },
          "title": "Array_of_WarehouseAdminRow",
          "type": "array"
        }
      },
      "summary": "List warehouse definitions and actual schema readiness in Enterprise administration.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:37b48444d553b37c8b9df711302f683452469f010b252c9489916f750b0cd9c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_admin_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WarehouseReadiness": {
              "enum": [
                "ready",
                "needs_provisioning",
                "outdated",
                "invalid"
              ],
              "type": "string"
            }
          },
          "properties": {
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "length_uom": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "readiness": {
              "$ref": "#/definitions/WarehouseReadiness"
            },
            "readiness_label": {
              "type": "string"
            },
            "readiness_reason": {
              "type": "string"
            },
            "schema_name": {
              "type": "string"
            },
            "volume_uom": {
              "type": "string"
            },
            "weight_uom": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "id",
            "is_active",
            "length_uom",
            "name",
            "readiness",
            "readiness_label",
            "readiness_reason",
            "schema_name",
            "volume_uom",
            "weight_uom"
          ],
          "title": "WarehouseAdminRow",
          "type": "object"
        }
      },
      "summary": "Read one warehouse definition and schema readiness in Enterprise administration.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:8ad4b707db7327438797ac62235366df18c7144bc17e856c351eff783b67efef",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_admin_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "is_active": {
                "description": "Accepted for compatibility with generic forms, but always forced false.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "length_uom": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "schema_name": {
                "type": "string"
              },
              "volume_uom": {
                "type": "string"
              },
              "weight_uom": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "length_uom",
              "name",
              "schema_name",
              "volume_uom",
              "weight_uom"
            ],
            "title": "WarehouseAdminCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WarehouseReadiness": {
              "enum": [
                "ready",
                "needs_provisioning",
                "outdated",
                "invalid"
              ],
              "type": "string"
            }
          },
          "properties": {
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "length_uom": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "readiness": {
              "$ref": "#/definitions/WarehouseReadiness"
            },
            "readiness_label": {
              "type": "string"
            },
            "readiness_reason": {
              "type": "string"
            },
            "schema_name": {
              "type": "string"
            },
            "volume_uom": {
              "type": "string"
            },
            "weight_uom": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "id",
            "is_active",
            "length_uom",
            "name",
            "readiness",
            "readiness_label",
            "readiness_reason",
            "schema_name",
            "volume_uom",
            "weight_uom"
          ],
          "title": "WarehouseAdminRow",
          "type": "object"
        }
      },
      "summary": "Create an inactive warehouse and provision its complete application schema.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:8aae634a924c0ebac6b47181e876d09b15917dc37f68e8085e8924fd5db0da1f",
      "x-quark-response-schema-hash": "sha256:8ad4b707db7327438797ac62235366df18c7144bc17e856c351eff783b67efef",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_admin_update",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Strict flat command input: generic UI commands carry every operand in data. Unknown identity/unit fields and explicit nulls cannot silently become no-ops.",
            "properties": {
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "is_active": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "title": "WarehouseAdminUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WarehouseReadiness": {
              "enum": [
                "ready",
                "needs_provisioning",
                "outdated",
                "invalid"
              ],
              "type": "string"
            }
          },
          "properties": {
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "length_uom": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "readiness": {
              "$ref": "#/definitions/WarehouseReadiness"
            },
            "readiness_label": {
              "type": "string"
            },
            "readiness_reason": {
              "type": "string"
            },
            "schema_name": {
              "type": "string"
            },
            "volume_uom": {
              "type": "string"
            },
            "weight_uom": {
              "type": "string"
            }
          },
          "required": [
            "code",
            "id",
            "is_active",
            "length_uom",
            "name",
            "readiness",
            "readiness_label",
            "readiness_reason",
            "schema_name",
            "volume_uom",
            "weight_uom"
          ],
          "title": "WarehouseAdminRow",
          "type": "object"
        }
      },
      "summary": "Rename or change warehouse activity; activation requires current schema migrations.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:189c0c4d18732113e17c1d8743809d8444adcf8ffef01f98b42a323828963dac",
      "x-quark-response-schema-hash": "sha256:8ad4b707db7327438797ac62235366df18c7144bc17e856c351eff783b67efef",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_user_warehouses",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "q": {
                "default": null,
                "description": "Reserved for future substring filter (rf-go's F2 picker convention sends `q`). Currently ignored — the per-user warehouse set is typically tiny so filtering doesn't earn its weight yet. Accepted so the F2 picker call deserializes cleanly.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "user_id": {
                "description": "Target user_id. When omitted, falls back to the authenticated `Ctx.user_id()` — convenient for caller-self lookups (e.g. WHSEL's F2 picker, which can only send `{q: …}` per rf-go's lookupValues convention and has no way to thread an explicit user_id from screen state).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "ParamsListUserWarehouses",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserWarehouseWithDetails": {
              "description": "Joined result for user warehouse list (warehouse + role details)",
              "properties": {
                "is_default": {
                  "type": "boolean"
                },
                "role_code": {
                  "type": "string"
                },
                "role_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "schema_name": {
                  "type": "string"
                },
                "user_warehouse_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warehouse_code": {
                  "type": "string"
                },
                "warehouse_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warehouse_name": {
                  "type": "string"
                }
              },
              "required": [
                "is_default",
                "role_code",
                "role_id",
                "schema_name",
                "user_warehouse_id",
                "warehouse_code",
                "warehouse_id",
                "warehouse_name"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/UserWarehouseWithDetails"
          },
          "title": "Array_of_UserWarehouseWithDetails",
          "type": "array"
        }
      },
      "summary": "List warehouses accessible by a user (user_id optional → caller's Ctx.user_id by default)",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:4b8d8f8d1b801af269c460a7e923e631598fcf10c2e2627e06fa5a22b842eec5",
      "x-quark-response-schema-hash": "sha256:fafc98011b5ccedee159eefc862f73a9b6c65ef4e82cd30d4b02305075235626",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_warehouse_defaults",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/WarehouseDefaults"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "WarehouseDefaults": {
              "description": "Defaults configured for the warehouse currently selected by the caller.\n\nThese values live in the enterprise schema because they describe a warehouse, while several of the referenced records (owner, locations, printer) live inside that warehouse's schema.  Keeping this read model in core prevents UI processes from learning that storage layout.",
              "properties": {
                "default_owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_pack_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_pick_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_printer_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_receive_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": "object"
            }
          },
          "title": "Nullable_WarehouseDefaults"
        }
      },
      "summary": "Get defaults for the active warehouse",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:931da073e89a7d18ab0606f7815d2a1f452cdbbf9dc534baee0c88135ea1140a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_settings_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WarehouseSettingsRow": {
              "description": "The caller's warehouse as the warehouse settings screen shows it: who it is and the rules the screen sets. One row — the screen never lists or writes another warehouse (plan R2). `Deserialize` because a command's output is stored for its replay.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "shared_tote_allows_mixed_owners": {
                  "description": "May goods of several owners lie in one station route's shared tote at once? Switching it off changes nothing already deposited: the next deposit of another owner is refused.",
                  "type": "boolean"
                },
                "station_route_abandoned_after_minutes": {
                  "description": "Minutes with no activity on a station route — no stop under a live lease, no route or stop change — before the supervisor's board calls it abandoned and the supervisor's door finishes its totes.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "id",
                "name",
                "shared_tote_allows_mixed_owners",
                "station_route_abandoned_after_minutes"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/WarehouseSettingsRow"
          },
          "title": "Array_of_WarehouseSettingsRow",
          "type": "array"
        }
      },
      "summary": "List the active warehouse with the rules its settings screen sets (one row; an id filter rereads it).",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:bbbf5eaebdbd82b1bdb47cdbbdba9935ace28dc0b21dc6df483f5a7a8e9c5f77",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_set_shared_tote_mixed_owners",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command: the value the person chose for the caller's warehouse.",
            "properties": {
              "allows_mixed_owners": {
                "description": "`true` — owners may share a tote; `false` — one owner per tote.",
                "type": "boolean"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "allows_mixed_owners"
            ],
            "title": "SetSharedToteMixedOwners",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The caller's warehouse as the warehouse settings screen shows it: who it is and the rules the screen sets. One row — the screen never lists or writes another warehouse (plan R2). `Deserialize` because a command's output is stored for its replay.",
          "properties": {
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "shared_tote_allows_mixed_owners": {
              "description": "May goods of several owners lie in one station route's shared tote at once? Switching it off changes nothing already deposited: the next deposit of another owner is refused.",
              "type": "boolean"
            },
            "station_route_abandoned_after_minutes": {
              "description": "Minutes with no activity on a station route — no stop under a live lease, no route or stop change — before the supervisor's board calls it abandoned and the supervisor's door finishes its totes.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "id",
            "name",
            "shared_tote_allows_mixed_owners",
            "station_route_abandoned_after_minutes"
          ],
          "title": "WarehouseSettingsRow",
          "type": "object"
        }
      },
      "summary": "Set whether goods of several owners may share one station route's tote in the active warehouse.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a788760684d5addfd56b370e43eed0b8d1564ff8ff6f6a2056c8d79dc17af055",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58c78bf0de263e484e8661f4b084bfb76bc1d055fe1de832e8e0dc9c2f41d0ba",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "warehouse_set_station_route_abandoned_after",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command: the number of minutes the person typed for the caller's warehouse.",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "minutes": {
                "description": "Minutes with no activity on a station route before it counts as abandoned; at least 1.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "minutes"
            ],
            "title": "SetStationRouteAbandonedAfter",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The caller's warehouse as the warehouse settings screen shows it: who it is and the rules the screen sets. One row — the screen never lists or writes another warehouse (plan R2). `Deserialize` because a command's output is stored for its replay.",
          "properties": {
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "shared_tote_allows_mixed_owners": {
              "description": "May goods of several owners lie in one station route's shared tote at once? Switching it off changes nothing already deposited: the next deposit of another owner is refused.",
              "type": "boolean"
            },
            "station_route_abandoned_after_minutes": {
              "description": "Minutes with no activity on a station route — no stop under a live lease, no route or stop change — before the supervisor's board calls it abandoned and the supervisor's door finishes its totes.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "id",
            "name",
            "shared_tote_allows_mixed_owners",
            "station_route_abandoned_after_minutes"
          ],
          "title": "WarehouseSettingsRow",
          "type": "object"
        }
      },
      "summary": "Set after how many minutes with no activity a station route counts as abandoned in the active warehouse.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "warehouse",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fc44f86662cd2c5be33f128098be1f28d95ff805c2b8d6f1c586cc84606157e4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58c78bf0de263e484e8661f4b084bfb76bc1d055fe1de832e8e0dc9c2f41d0ba",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "name"
            ],
            "title": "RoleForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_system": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_system",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "Role",
          "type": "object"
        }
      },
      "summary": "Create a new role — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:57f0b3f5d835a5becd8ad1cfd044d9662de2ef8087e6ee73f89b3aafcf0941c3",
      "x-quark-response-schema-hash": "sha256:caab4bd1dae4969a86c20eec29a89cefcb58fc52c0c88cada9d95882bc4417cb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_system": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_system",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "Role",
          "type": "object"
        }
      },
      "summary": "Get a role by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:caab4bd1dae4969a86c20eec29a89cefcb58fc52c0c88cada9d95882bc4417cb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Role": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_system": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "is_active",
                "is_system",
                "mod_when",
                "mod_who",
                "name"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/Role"
          },
          "title": "Array_of_Role",
          "type": "array"
        }
      },
      "summary": "List role — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:f8b026af54500e2068eb54257f7faf37ec6f9ac3c7b3a34b55a6691f6c03e9a8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "A role code is stable permission identity. Operators may rename, describe, disable or re-enable the role without moving that identity.",
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              }
            },
            "title": "RoleUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_system": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_system",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "Role",
          "type": "object"
        }
      },
      "summary": "Update mutable role fields; code is immutable and null is explicit.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:dfecc51c40e80f2f4606175ba6007c2c7326f1360f2df3187a7e2bd67f35bdea",
      "x-quark-response-schema-hash": "sha256:caab4bd1dae4969a86c20eec29a89cefcb58fc52c0c88cada9d95882bc4417cb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_system": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_system",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "Role",
          "type": "object"
        }
      },
      "summary": "Delete a role by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:caab4bd1dae4969a86c20eec29a89cefcb58fc52c0c88cada9d95882bc4417cb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple role by IDs — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_role",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count role — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "can_delete": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "can_execute": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "can_read": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "can_write": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "resource_code": {
                "type": "string"
              },
              "resource_type": {
                "type": "string"
              },
              "role_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "resource_code",
              "resource_type",
              "role_id"
            ],
            "title": "RolePermissionForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "can_delete": {
              "type": "boolean"
            },
            "can_execute": {
              "type": "boolean"
            },
            "can_read": {
              "type": "boolean"
            },
            "can_write": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "resource_code": {
              "type": "string"
            },
            "resource_type": {
              "type": "string"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "can_delete",
            "can_execute",
            "can_read",
            "can_write",
            "id",
            "mod_when",
            "mod_who",
            "resource_code",
            "resource_type",
            "role_id"
          ],
          "title": "RolePermission",
          "type": "object"
        }
      },
      "summary": "Create a new role_permission — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d5da55eb5db92b71ee177bac332b7f310b211c87787d232818869c458b4904e1",
      "x-quark-response-schema-hash": "sha256:180f30bf6b9212c146c31076fd18675e3e186a69aa55df74a945668503323e2e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "can_delete": {
              "type": "boolean"
            },
            "can_execute": {
              "type": "boolean"
            },
            "can_read": {
              "type": "boolean"
            },
            "can_write": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "resource_code": {
              "type": "string"
            },
            "resource_type": {
              "type": "string"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "can_delete",
            "can_execute",
            "can_read",
            "can_write",
            "id",
            "mod_when",
            "mod_who",
            "resource_code",
            "resource_type",
            "role_id"
          ],
          "title": "RolePermission",
          "type": "object"
        }
      },
      "summary": "Get a role_permission by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:180f30bf6b9212c146c31076fd18675e3e186a69aa55df74a945668503323e2e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RolePermission": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "can_delete": {
                  "type": "boolean"
                },
                "can_execute": {
                  "type": "boolean"
                },
                "can_read": {
                  "type": "boolean"
                },
                "can_write": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "resource_code": {
                  "type": "string"
                },
                "resource_type": {
                  "type": "string"
                },
                "role_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "can_delete",
                "can_execute",
                "can_read",
                "can_write",
                "id",
                "mod_when",
                "mod_who",
                "resource_code",
                "resource_type",
                "role_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/RolePermission"
          },
          "title": "Array_of_RolePermission",
          "type": "array"
        }
      },
      "summary": "List role_permission — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:a66f070d1f1618008c383af83b4880db531e5276ec40283592c782bb1a1da1d1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Strict wire patch for the mutable cells of one permission row. The row's role/resource identity is immutable; moving a permission means delete + create, while the four grants may be independently changed.",
            "properties": {
              "can_delete": {
                "type": "boolean"
              },
              "can_execute": {
                "type": "boolean"
              },
              "can_read": {
                "type": "boolean"
              },
              "can_write": {
                "type": "boolean"
              }
            },
            "title": "RolePermissionUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "can_delete": {
              "type": "boolean"
            },
            "can_execute": {
              "type": "boolean"
            },
            "can_read": {
              "type": "boolean"
            },
            "can_write": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "resource_code": {
              "type": "string"
            },
            "resource_type": {
              "type": "string"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "can_delete",
            "can_execute",
            "can_read",
            "can_write",
            "id",
            "mod_when",
            "mod_who",
            "resource_code",
            "resource_type",
            "role_id"
          ],
          "title": "RolePermission",
          "type": "object"
        }
      },
      "summary": "Update role-permission grants; null and identity changes are rejected.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7a45009914b6ad1d45546c160aebc03f91c0b8b33b838749cdcc6119d407d10",
      "x-quark-response-schema-hash": "sha256:180f30bf6b9212c146c31076fd18675e3e186a69aa55df74a945668503323e2e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "can_delete": {
              "type": "boolean"
            },
            "can_execute": {
              "type": "boolean"
            },
            "can_read": {
              "type": "boolean"
            },
            "can_write": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "resource_code": {
              "type": "string"
            },
            "resource_type": {
              "type": "string"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "can_delete",
            "can_execute",
            "can_read",
            "can_write",
            "id",
            "mod_when",
            "mod_who",
            "resource_code",
            "resource_type",
            "role_id"
          ],
          "title": "RolePermission",
          "type": "object"
        }
      },
      "summary": "Delete a role_permission by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:180f30bf6b9212c146c31076fd18675e3e186a69aa55df74a945668503323e2e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple role_permission by IDs — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_role_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count role_permission — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "role",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "supervisor_override_grant",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AckToken": {
                "description": "One acknowledgement unit on the move / directed-putaway override contract: a `(code, subject)` pair. `code` is the dimension — a `move_warning_codes` constant (source-loc hold 83, dest-loc hold 84, source-stock hold 80, …), or for receipt a bare `ReceiptValidationReturnCode`. `subject` is WHAT was overridden: the hold code string (`QcQuarantine`), or a rule id (directed putaway). The pair is atomic — `(83, X) != (84, X)` — so acking a hold on the source location never clears the same code on the destination.\n\nWire tolerance (contract `docs/superpowers/plans/2026-07-27-move-ack-override-contract.md`): the shared `CommandMeta.acknowledged_overrides` carries acks for BOTH receipt (bare integer codes, no subject) and move (pairs). This type deserializes EITHER form — a bare `27` becomes `{code: 27, subject: \"\"}`; an object `{\"code\":83,\"subject\":\"QcQuarantine\"}` keeps both — so an existing receipt client sending `[27, 71]` is unaffected while move sends `[{code, subject}]`. Serialization is always the canonical object form (the error envelope's `context.pairs`). Subject `\"\"` is the receipt / dimensionless convention.",
                "properties": {
                  "code": {
                    "format": "int16",
                    "type": "integer"
                  },
                  "subject": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "subject"
                ],
                "type": "object"
              }
            },
            "properties": {
              "pairs": {
                "description": "The pairs this grant authorizes. For a move: exactly what the refused move reported in `error.data.detail.context.pairs`. For a receipt override, likewise what the refused receipt command reported there: `{\"code\": 71, \"subject\": \"receipt:<receipt_id>\"}` for a close — bound to that receipt — and `{\"code\": <28|27>, \"subject\": \"receipt:<receipt_id>/line:<receipt_detail_id>\"}` for a shortage or excess — bound to that one line.",
                "items": {
                  "$ref": "#/definitions/AckToken"
                },
                "type": "array"
              },
              "password": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "default": null,
                "description": "Why the authorizer is allowing it. REQUIRED for a count-freeze pair (`{\"code\": 87, \"subject\": \"count:<inventory_count_id>\"}`): the owner asked for that reason to be recorded, and it is written onto the count as the mark that stock moved underneath it. Optional for every other pair, which says what it overrode in its own subject.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "default": null,
                "description": "Required only when the caller cannot authorize every pair themselves.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "pairs"
            ],
            "title": "GrantParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "expires_at": {
              "description": "RFC 3339 in UTC.",
              "format": "date-time",
              "type": "string"
            },
            "grant_id": {
              "format": "uuid",
              "type": "string"
            }
          },
          "required": [
            "expires_at",
            "grant_id"
          ],
          "title": "GrantResult",
          "type": "object"
        }
      },
      "summary": "Mint a supervisor override grant for the pairs a refused command reported. The grant binds OPERATOR + PAIRS + the authenticated authorizer, is single-use and expires in minutes. A move passes its id as move_execute's ctx.override_grant_id; receipt_close, receipt_receive_against_asn and receipt_receive_case_level_line take it as override_grant_id (meta or data). Receipt pairs are bound to what they decide: a close (71) to one receipt, {code, subject: \"receipt:<receipt_id>\"}; a shortage or excess (28/27) to one line, {code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"} — a grant for one line is refused on any other. Authority is checked PER PAIR: a move pair needs an override role (SUPERVISOR/MANAGER/ADMIN); a receipt pair needs the capability its code names (71 receipt.override_close_discrepancy, 28 receipt.override_qty_shortage, 27 receipt.override_qty_excess — SUPERVISOR only), so an ADMIN or MANAGER cannot authorize a receipt override. A caller who holds every pair's authority mints seamlessly with no credentials; anyone else must supply username + password, verified through the same path as /api/login, and that person is held to the same per-pair rule. Supplying credentials always authenticates THEM, even if the caller could have minted seamlessly. The recorded authorizer is whoever the SERVER authenticated here; it is never taken from the command request. A count-freeze pair ({code: 87, subject: \"count:<inventory_count_id>\"}), which a Hard inventory count's freeze reports in context.pairs, needs an override role like a move pair AND a reason: the reason is recorded on the grant and written onto the count as the mark that stock moved underneath it, so the counter knows the number is in doubt. Such a grant is refused without one. move_execute, inventory_adjustment_post (override_grant_id) and pick_commit (count_freeze_grant_id) redeem it.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "override_grant",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:834d23168614bcd0c8e73cb0643c1cfa3c3b3d07cc11175cb1f59fc6380fb655",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:46a736106db56bb50562326c5f4efa00e667d73a9679d6e6c0c0f0080ce348cc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "is_default": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "role_id": {
                "format": "int64",
                "type": "integer"
              },
              "user_id": {
                "format": "int64",
                "type": "integer"
              },
              "warehouse_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "role_id",
              "user_id",
              "warehouse_id"
            ],
            "title": "UserWarehouseForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_id": {
              "format": "int64",
              "type": "integer"
            },
            "warehouse_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "role_id",
            "user_id",
            "warehouse_id"
          ],
          "title": "UserWarehouse",
          "type": "object"
        }
      },
      "summary": "Create a new user_warehouse — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0e58ec67f93531882c135385a08e40fd505eedfce5067f04a0faaa9243398e95",
      "x-quark-response-schema-hash": "sha256:1f91ef83ef9de1fb4aa81b46dd7a6cbaaed75b897ee053e1d52db0fc0f7e8604",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_id": {
              "format": "int64",
              "type": "integer"
            },
            "warehouse_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "role_id",
            "user_id",
            "warehouse_id"
          ],
          "title": "UserWarehouse",
          "type": "object"
        }
      },
      "summary": "Get a user_warehouse by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:1f91ef83ef9de1fb4aa81b46dd7a6cbaaed75b897ee053e1d52db0fc0f7e8604",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserWarehouse": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_default": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "role_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "user_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warehouse_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "is_default",
                "mod_when",
                "mod_who",
                "role_id",
                "user_id",
                "warehouse_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/UserWarehouse"
          },
          "title": "Array_of_UserWarehouse",
          "type": "array"
        }
      },
      "summary": "List user_warehouse — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:ba1533695584c3f8a57d32e70093c2c87c7bfedceff23779bbd05ad43091f9a2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "A warehouse assignment keeps its `(user_id, warehouse_id)` identity. Only its role and default marker are editable; both columns are NOT NULL.",
            "properties": {
              "is_default": {
                "type": "boolean"
              },
              "role_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "title": "UserWarehouseUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_id": {
              "format": "int64",
              "type": "integer"
            },
            "warehouse_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "role_id",
            "user_id",
            "warehouse_id"
          ],
          "title": "UserWarehouse",
          "type": "object"
        }
      },
      "summary": "Update an assignment's role/default marker; null and identity changes are rejected.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bfebc03bcca8f7eb654f23793eefee933c56bfe507821ad28fda9dd6887fefb2",
      "x-quark-response-schema-hash": "sha256:1f91ef83ef9de1fb4aa81b46dd7a6cbaaed75b897ee053e1d52db0fc0f7e8604",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "role_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_id": {
              "format": "int64",
              "type": "integer"
            },
            "warehouse_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "role_id",
            "user_id",
            "warehouse_id"
          ],
          "title": "UserWarehouse",
          "type": "object"
        }
      },
      "summary": "Delete a user_warehouse by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:1f91ef83ef9de1fb4aa81b46dd7a6cbaaed75b897ee053e1d52db0fc0f7e8604",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple user_warehouse by IDs — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_user_warehouse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count user_warehouse — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "user_warehouse",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "generate_user_api_key",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "user_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "name",
              "user_id"
            ],
            "title": "GenerateApiKeyParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "expires_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "key_prefix": {
              "type": "string"
            },
            "plaintext_key": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "key_prefix",
            "plaintext_key"
          ],
          "title": "GenerateApiKeyResult",
          "type": "object"
        }
      },
      "summary": "Generate API key for user; returns plaintext exactly once",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "user_api_key",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:536f17af5d281c144a2140bdd50e65a7b5c639af943a0b837878577c8dc1084c",
      "x-quark-response-schema-hash": "sha256:5bf25a9c14c1a5bae6494b5bda470904e00a3f7811de92010a540575f35567c6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "revoke_user_api_key",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "user_id": {
                "description": "The user card whose API-key list the caller is acting on. Requiring both identities prevents a stale/tampered row id from revoking a key that belongs to a different user.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "user_id"
            ],
            "title": "RevokeApiKeyParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Revoke an API key for its parent user; retries preserve the first revoke time",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "user_api_key",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0bc66bf6b3cab380f681263fdaeb35403209475744e06990df4443ae0a52d5ff",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_user_api_key",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "key_hash": {
              "description": "argon2id PHC hash of the full plaintext key. **Never leaves the process.** `#[serde(skip_serializing)]` keeps it out of every RPC response (`list_user_api_key` / `get_user_api_key`). The field is still populated by `FromRow` because `ApiKeyStore::validate` reads it directly from the table — just not via this DTO. See ADR-022 (mutation audit events).",
              "type": "string",
              "writeOnly": true
            },
            "key_prefix": {
              "type": "string"
            },
            "last_used_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "revoked_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "user_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "key_hash",
            "key_prefix",
            "mod_when",
            "mod_who",
            "name",
            "user_id"
          ],
          "title": "UserApiKey",
          "type": "object"
        }
      },
      "summary": "Get a user_api_key by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user_api_key",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:7f71d223f8a4f70ea961cad3ee846d443146d2fcb8b9fd3f8df2dd3e61e5ab03",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_user_api_key",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserApiKey": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "expires_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "key_hash": {
                  "description": "argon2id PHC hash of the full plaintext key. **Never leaves the process.** `#[serde(skip_serializing)]` keeps it out of every RPC response (`list_user_api_key` / `get_user_api_key`). The field is still populated by `FromRow` because `ApiKeyStore::validate` reads it directly from the table — just not via this DTO. See ADR-022 (mutation audit events).",
                  "type": "string",
                  "writeOnly": true
                },
                "key_prefix": {
                  "type": "string"
                },
                "last_used_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "revoked_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "key_hash",
                "key_prefix",
                "mod_when",
                "mod_who",
                "name",
                "user_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/UserApiKey"
          },
          "title": "Array_of_UserApiKey",
          "type": "array"
        }
      },
      "summary": "List user_api_key — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user_api_key",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:847007d3ae3111d8366ccade3750334660c624e89b0dfaee7e7e8cb2f442e257",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_user_api_key",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count user_api_key — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "user_api_key",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_audit_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Read-only audit log entry — **selected from `enterprise.audit_log_view`** (see ADR-025), not the raw `audit_log` table. The view LEFT JOINs user / role / warehouse / target entities so the Audit Log grid can render human labels (`username`, `role_code`, `warehouse_code`, `target_label`) instead of opaque numeric ids.\n\nInserts still go via `wms_lib_auth::authorization::audit::log_event` which writes directly to `enterprise.audit_log` with raw SQL — BMC is read-only for audit.",
          "properties": {
            "detail": true,
            "event_kind": {
              "type": "string"
            },
            "event_time": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "required_bit": {
              "type": [
                "string",
                "null"
              ]
            },
            "resource_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "resource_label": {
              "description": "Alias of `resource_code` until the resource_catalog lands (ADR-025 §D4).",
              "type": [
                "string",
                "null"
              ]
            },
            "resource_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "role_code": {
              "description": "Resolved via LEFT JOIN on `enterprise.role`.",
              "type": [
                "string",
                "null"
              ]
            },
            "role_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "target_extra": {
              "type": [
                "string",
                "null"
              ]
            },
            "target_id": {
              "description": "Extracted from `detail->'target_pk'` (JSON — scalar for single-PK tables, array for composite). Grid renders the raw JSON."
            },
            "target_label": {
              "description": "Human label for the target row (`r.code`, `u.username`, …) joined from the six RBAC entity types (ADR-025 §D2). NULL for unknown / composite-PK targets — the UI renders em-dash.",
              "type": [
                "string",
                "null"
              ]
            },
            "target_type": {
              "description": "Extracted from `detail->>'target_table'` — which entity was mutated.",
              "type": [
                "string",
                "null"
              ]
            },
            "user_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "username": {
              "description": "Resolved via LEFT JOIN on `enterprise.\"user\"`. NULL if user deleted.",
              "type": [
                "string",
                "null"
              ]
            },
            "warehouse_code": {
              "description": "Resolved via LEFT JOIN on `enterprise.warehouse`.",
              "type": [
                "string",
                "null"
              ]
            },
            "warehouse_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "warehouse_name": {
              "description": "Resolved via LEFT JOIN on `enterprise.warehouse`.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "event_kind",
            "event_time",
            "id"
          ],
          "title": "AuditLog",
          "type": "object"
        }
      },
      "summary": "Get a audit_log by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "audit_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:fe0446e7078ca3b08ae28916407bc42e3359568cec092878c283cb8746f032c3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_audit_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AuditLog": {
              "description": "Read-only audit log entry — **selected from `enterprise.audit_log_view`** (see ADR-025), not the raw `audit_log` table. The view LEFT JOINs user / role / warehouse / target entities so the Audit Log grid can render human labels (`username`, `role_code`, `warehouse_code`, `target_label`) instead of opaque numeric ids.\n\nInserts still go via `wms_lib_auth::authorization::audit::log_event` which writes directly to `enterprise.audit_log` with raw SQL — BMC is read-only for audit.",
              "properties": {
                "detail": true,
                "event_kind": {
                  "type": "string"
                },
                "event_time": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_bit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_label": {
                  "description": "Alias of `resource_code` until the resource_catalog lands (ADR-025 §D4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "role_code": {
                  "description": "Resolved via LEFT JOIN on `enterprise.role`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "role_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_extra": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "target_id": {
                  "description": "Extracted from `detail->'target_pk'` (JSON — scalar for single-PK tables, array for composite). Grid renders the raw JSON."
                },
                "target_label": {
                  "description": "Human label for the target row (`r.code`, `u.username`, …) joined from the six RBAC entity types (ADR-025 §D2). NULL for unknown / composite-PK targets — the UI renders em-dash.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "target_type": {
                  "description": "Extracted from `detail->>'target_table'` — which entity was mutated.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "username": {
                  "description": "Resolved via LEFT JOIN on `enterprise.\"user\"`. NULL if user deleted.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "warehouse_code": {
                  "description": "Resolved via LEFT JOIN on `enterprise.warehouse`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "warehouse_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "warehouse_name": {
                  "description": "Resolved via LEFT JOIN on `enterprise.warehouse`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "event_kind",
                "event_time",
                "id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AuditLog"
          },
          "title": "Array_of_AuditLog",
          "type": "array"
        }
      },
      "summary": "List audit_log — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "audit_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9044fa9db7e65e7ad4a2bdd14867a29055a0ba999e6f64f835ba14b9f5e1ece0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_audit_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count audit_log — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "audit_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_audit_event_kinds",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "items": {
            "type": "string"
          },
          "title": "Array_of_String",
          "type": "array"
        }
      },
      "summary": "Distinct event_kind values from enterprise.audit_log_view (set-filter feed).",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "audit_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:020f77b8f56ce868f07b99f48f85aab221ffc9e792ca3cd4e456aea7acb5178f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "batch_update_role_permissions",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PermissionChange": {
                "properties": {
                  "can_delete": {
                    "type": "boolean"
                  },
                  "can_execute": {
                    "type": "boolean"
                  },
                  "can_read": {
                    "type": "boolean"
                  },
                  "can_write": {
                    "type": "boolean"
                  },
                  "resource_code": {
                    "type": "string"
                  },
                  "resource_type": {
                    "type": "string"
                  },
                  "role_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "can_delete",
                  "can_execute",
                  "can_read",
                  "can_write",
                  "resource_code",
                  "resource_type",
                  "role_id"
                ],
                "type": "object"
              }
            },
            "properties": {
              "changes": {
                "items": {
                  "$ref": "#/definitions/PermissionChange"
                },
                "type": "array"
              }
            },
            "required": [
              "changes"
            ],
            "title": "BatchUpdateParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "duration_ms": {
              "format": "uint128",
              "minimum": 0.0,
              "type": "integer"
            },
            "updated_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "duration_ms",
            "updated_count"
          ],
          "title": "BatchUpdateResult",
          "type": "object"
        }
      },
      "summary": "Batch-update role_permission cells (Permission Matrix save)",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "role_permission",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:49ef7bd7032686fe71ac74818817d6413171b350cc43df85d6262cde3ca1242d",
      "x-quark-response-schema-hash": "sha256:7d54855b1ff8402398f6bc4b790eab38302797027f6788f131d101da79781c3a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_role_permissions_tree",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RolePermissionTreeRow": {
              "description": "Flat tree row. `hierarchy_path` drives the grid's row-grouping. Field names that appear on the wire in camelCase carry explicit `serde(rename)` attributes because the AG Grid SSRM tree renderer expects those exact keys.\n\nLabel resolution (resource_code → human label) is delegated to the web-ui-server's `column_display_resolver` via `form_list_details.value_formatter`. This RPC ships `menu_code` / `form_code` set ONLY for rows whose `resource_type` matches, and two separate `lookup:` formatters on the list form resolve each one against its own metadata table (`public.menu_items`, `public.form_base`). `api` / `server_action` rows leave both code fields null and render the raw `resource_code`.",
              "properties": {
                "can_delete": {
                  "type": "boolean"
                },
                "can_execute": {
                  "type": "boolean"
                },
                "can_read": {
                  "type": "boolean"
                },
                "can_write": {
                  "type": "boolean"
                },
                "child_count": {
                  "description": "Only populated for group rows — total leaves under this branch.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "form_code": {
                  "description": "Populated only when `resource_type = 'form'` — becomes the source field for `lookup:public.form_base:code:name:form_code`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hierarchyLevel": {
                  "format": "uint8",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "hierarchyPath": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "id": {
                  "description": "Synthetic negative id for group rows; real `role_permission.id` for leaves.",
                  "format": "int64",
                  "type": "integer"
                },
                "is_admin_only": {
                  "type": "boolean"
                },
                "label": {
                  "description": "Group-row display label (`\"Menu Items\"`, `\"Forms\"`, …) — only meaningful at `hierarchy_level = 0`. Leaf rows carry an empty string here and let the `lookup:` formatter produce the display value on the web-ui-server side.",
                  "type": "string"
                },
                "menu_code": {
                  "description": "Populated only when `resource_type = 'menu_item'` — becomes the source field for `lookup:public.menu_items:code:label:menu_code`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_code": {
                  "type": "string"
                },
                "resource_type": {
                  "type": "string"
                },
                "role_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "can_delete",
                "can_execute",
                "can_read",
                "can_write",
                "hierarchyLevel",
                "hierarchyPath",
                "id",
                "is_admin_only",
                "label",
                "resource_code",
                "resource_type",
                "role_id"
              ],
              "type": "object"
            }
          },
          "description": "RPC response envelope. The framework's tree action expects a top-level `items` array.",
          "properties": {
            "items": {
              "items": {
                "$ref": "#/definitions/RolePermissionTreeRow"
              },
              "type": "array"
            }
          },
          "required": [
            "items"
          ],
          "title": "RolePermissionTreeResponse",
          "type": "object"
        }
      },
      "summary": "Tree view of role_permission rows grouped by resource_type (AG Grid SSRM).",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "role_permission",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:8e350fd58d23be01586b44b42ce1f04ab4e71baa4918cd5e6c074561b9beedcf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_permission_matrix",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Filter shape accepted by `list_permission_matrix`. All fields optional; missing fields mean \"no narrowing\".",
            "properties": {
              "limit": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "offset": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "resource_type": {
                "default": null,
                "description": "One of \"form\" | \"menu_item\" | \"api\" | \"server_action\". `None` = all.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "role_codes": {
                "default": null,
                "description": "Subset of role codes to render as columns. `None` = every active role.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "search": {
                "default": null,
                "description": "Substring on `resource_code` (case-insensitive).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "MatrixFilter",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "MatrixCell": {
              "properties": {
                "d": {
                  "type": "boolean"
                },
                "r": {
                  "type": "boolean"
                },
                "resource_code": {
                  "type": "string"
                },
                "resource_type": {
                  "type": "string"
                },
                "role_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "w": {
                  "type": "boolean"
                },
                "x": {
                  "type": "boolean"
                }
              },
              "required": [
                "d",
                "r",
                "resource_code",
                "resource_type",
                "role_id",
                "w",
                "x"
              ],
              "type": "object"
            },
            "MatrixResource": {
              "properties": {
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "module": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_code": {
                  "type": "string"
                },
                "resource_type": {
                  "type": "string"
                }
              },
              "required": [
                "resource_code",
                "resource_type"
              ],
              "type": "object"
            },
            "MatrixRole": {
              "properties": {
                "role_code": {
                  "type": "string"
                },
                "role_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "role_label": {
                  "type": "string"
                }
              },
              "required": [
                "role_code",
                "role_id",
                "role_label"
              ],
              "type": "object"
            }
          },
          "properties": {
            "cells": {
              "items": {
                "$ref": "#/definitions/MatrixCell"
              },
              "type": "array"
            },
            "resources": {
              "items": {
                "$ref": "#/definitions/MatrixResource"
              },
              "type": "array"
            },
            "roles": {
              "items": {
                "$ref": "#/definitions/MatrixRole"
              },
              "type": "array"
            },
            "total_resources": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "cells",
            "resources",
            "roles",
            "total_resources"
          ],
          "title": "MatrixPage",
          "type": "object"
        }
      },
      "summary": "List permission matrix slice (resources × roles × R/W/D/X bits)",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "permission_matrix",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5407142e3de27d6335ed98b104175f7c8cc51b6b50965ea49a565161aea3ac99",
      "x-quark-response-schema-hash": "sha256:05377c3d78c3bbb238ba9aa2bd9566a82f02f203133be8896fab39cddfc1d1b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "batch_upsert_permission_matrix",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "MatrixCell": {
                "properties": {
                  "d": {
                    "type": "boolean"
                  },
                  "r": {
                    "type": "boolean"
                  },
                  "resource_code": {
                    "type": "string"
                  },
                  "resource_type": {
                    "type": "string"
                  },
                  "role_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "w": {
                    "type": "boolean"
                  },
                  "x": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "d",
                  "r",
                  "resource_code",
                  "resource_type",
                  "role_id",
                  "w",
                  "x"
                ],
                "type": "object"
              }
            },
            "properties": {
              "changes": {
                "items": {
                  "$ref": "#/definitions/MatrixCell"
                },
                "type": "array"
              }
            },
            "required": [
              "changes"
            ],
            "title": "MatrixBatchUpsertParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "touched_roles": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "upserted": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "touched_roles",
            "upserted"
          ],
          "title": "MatrixBatchUpsertResult",
          "type": "object"
        }
      },
      "summary": "Insert-or-update role_permission cells from the Permission Matrix UI",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "permission_matrix",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ba344baf6034db9e4f58643b52e948b12dbca8ed58b5f3ad630e9248f78fb5e0",
      "x-quark-response-schema-hash": "sha256:6638bafe1d737d604c037b0dcda435843b843e29ceee1658d98a9356f42c1b41",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dashboard_snapshot_rpc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "rail": {
                "default": null,
                "description": "The reader's own six rail metrics (dashboard spec 2026-10-09 §6), from their board layout. Absent = the warehouse's rail. Read slot by slot against the warehouse's — never refused, never shrunk.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "scope": {
                "description": "`shift` | `today` | `7d`. An unknown value falls back to `shift` rather than erroring — this arrives from a URL, and a stale bookmark should show a board, not a 500.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "DashboardSnapshotInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Dashboard: control-center snapshot",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dashboard",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:91cb03b487896f0db564ba3689e44cbfb8914ad14fb73592135295995489e936",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_dashboard_setting",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What a save of the settings card changed.",
                "properties": {
                  "expiring_within_days": {
                    "default": null,
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "rail_1": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rail_2": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rail_3": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rail_4": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rail_5": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rail_6": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "show_demo": {
                    "default": null,
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "throughput_plan_per_hour": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "title": "SettingChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The settings card: the effective rail one slot a field, so a picker sits on each.",
          "properties": {
            "expiring_within_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "rail_1": {
              "type": "string"
            },
            "rail_2": {
              "type": "string"
            },
            "rail_3": {
              "type": "string"
            },
            "rail_4": {
              "type": "string"
            },
            "rail_5": {
              "type": "string"
            },
            "rail_6": {
              "type": "string"
            },
            "show_demo": {
              "type": "boolean"
            },
            "throughput_plan_per_hour": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "expiring_within_days",
            "id",
            "rail_1",
            "rail_2",
            "rail_3",
            "rail_4",
            "rail_5",
            "rail_6",
            "show_demo",
            "version"
          ],
          "title": "SettingCard",
          "type": "object"
        }
      },
      "summary": "Dashboard: save the board settings card, on the version read.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fb2f87815acca38d26dddb400d12c1bd56d61863e881414c4c01d80c921db692",
      "x-quark-response-schema-hash": "sha256:64dcb64add92e27968b28df3150fd9478ecfea58c80683eb604bc0d716bede99",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dashboard_setting",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_dashboard_metric_threshold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A new threshold, as its form sends it.",
            "properties": {
              "alert_at": {
                "default": null,
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "bad_when": {
                "default": null,
                "description": "`Above` (default) or `Below`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "critical_at": {
                "default": null,
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "metric_key": {
                "default": "",
                "type": "string"
              }
            },
            "title": "ThresholdForm",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A metric's alert and critical levels in this warehouse.",
          "properties": {
            "alert_at": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "bad_when": {
              "description": "`Above` or `Below` — which side of the levels is bad.",
              "type": "string"
            },
            "critical_at": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "metric_key": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "bad_when",
            "id",
            "metric_key",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "DashboardMetricThreshold",
          "type": "object"
        }
      },
      "summary": "Dashboard: a threshold for a metric that has none.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cfe3ce7661f344309e656b6536637e584cf258259c7539c07a222b9d8eca1e2d",
      "x-quark-response-schema-hash": "sha256:e86f26c2ac27294d5bedeabcdd3d399524b33eb44e23012e731e292a2717ffd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_dashboard_metric_threshold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What a save of a threshold changed. The metric is the row's identity: a threshold for another metric is another row.",
                "properties": {
                  "alert_at": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "bad_when": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "critical_at": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "metric_key": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "title": "ThresholdChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A metric's alert and critical levels in this warehouse.",
          "properties": {
            "alert_at": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "bad_when": {
              "description": "`Above` or `Below` — which side of the levels is bad.",
              "type": "string"
            },
            "critical_at": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "metric_key": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "bad_when",
            "id",
            "metric_key",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "DashboardMetricThreshold",
          "type": "object"
        }
      },
      "summary": "Dashboard: save a threshold's levels, on the version read.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:57212e66a006d94ade38d7561fdfc63fd9090099e5abaaeee883675a70397008",
      "x-quark-response-schema-hash": "sha256:e86f26c2ac27294d5bedeabcdd3d399524b33eb44e23012e731e292a2717ffd8",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dashboard_metric_threshold",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "dashboard_metric_threshold_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "id"
            ],
            "title": "DeleteThresholdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Dashboard: delete a threshold, on the version read.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b86125ced8e5de3a03fcc052d246a7ed5846041a5284bd5b03e4c7d01879f3c4",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dashboard_metric_threshold",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "dashboard_setting_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The settings card: the effective rail one slot a field, so a picker sits on each.",
          "properties": {
            "expiring_within_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "rail_1": {
              "type": "string"
            },
            "rail_2": {
              "type": "string"
            },
            "rail_3": {
              "type": "string"
            },
            "rail_4": {
              "type": "string"
            },
            "rail_5": {
              "type": "string"
            },
            "rail_6": {
              "type": "string"
            },
            "show_demo": {
              "type": "boolean"
            },
            "throughput_plan_per_hour": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "expiring_within_days",
            "id",
            "rail_1",
            "rail_2",
            "rail_3",
            "rail_4",
            "rail_5",
            "rail_6",
            "show_demo",
            "version"
          ],
          "title": "SettingCard",
          "type": "object"
        }
      },
      "summary": "Dashboard: the warehouse's board settings card.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:64dcb64add92e27968b28df3150fd9478ecfea58c80683eb604bc0d716bede99",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dashboard_setting_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SettingCard": {
              "description": "The settings card: the effective rail one slot a field, so a picker sits on each.",
              "properties": {
                "expiring_within_days": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "rail_1": {
                  "type": "string"
                },
                "rail_2": {
                  "type": "string"
                },
                "rail_3": {
                  "type": "string"
                },
                "rail_4": {
                  "type": "string"
                },
                "rail_5": {
                  "type": "string"
                },
                "rail_6": {
                  "type": "string"
                },
                "show_demo": {
                  "type": "boolean"
                },
                "throughput_plan_per_hour": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "expiring_within_days",
                "id",
                "rail_1",
                "rail_2",
                "rail_3",
                "rail_4",
                "rail_5",
                "rail_6",
                "show_demo",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SettingCard"
          },
          "title": "Array_of_SettingCard",
          "type": "array"
        }
      },
      "summary": "Dashboard: the board settings, as a one-row list.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:763498dfd9ac46d0a003c46d3a79843ca3979f92b09d805de659fba985bdbb0a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dashboard_metric_threshold_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A metric's alert and critical levels in this warehouse.",
          "properties": {
            "alert_at": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "bad_when": {
              "description": "`Above` or `Below` — which side of the levels is bad.",
              "type": "string"
            },
            "critical_at": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "metric_key": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "bad_when",
            "id",
            "metric_key",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "DashboardMetricThreshold",
          "type": "object"
        }
      },
      "summary": "Dashboard: one metric threshold, as its card loads it.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:e86f26c2ac27294d5bedeabcdd3d399524b33eb44e23012e731e292a2717ffd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dashboard_metric_threshold_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DashboardMetricThreshold": {
              "description": "A metric's alert and critical levels in this warehouse.",
              "properties": {
                "alert_at": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "bad_when": {
                  "description": "`Above` or `Below` — which side of the levels is bad.",
                  "type": "string"
                },
                "critical_at": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "metric_key": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "bad_when",
                "id",
                "metric_key",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/DashboardMetricThreshold"
          },
          "title": "Array_of_DashboardMetricThreshold",
          "type": "array"
        }
      },
      "summary": "Dashboard: the warehouse's metric thresholds.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:020aba5ecc21af5f320e28d0d5b4eea1218d3dcb2fa13d3903e698259b6649aa",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dashboard_metric_catalogue",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CatalogueMetric": {
              "description": "One catalogue metric for a picker: its key, its English default name, and whether a module stands behind it.",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "live": {
                  "type": "boolean"
                }
              },
              "required": [
                "key",
                "label",
                "live"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CatalogueMetric"
          },
          "title": "Array_of_CatalogueMetric",
          "type": "array"
        }
      },
      "summary": "Dashboard: every metric the rail can hold — key, name, live or demo.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dashboard_setting",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:09b5924ac362f68e476d797c3e995f878cf4f13938bdc7485b4a5de206ba4ee3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "set_log_level",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filter",
          "required": true,
          "schema": {
            "description": "Директива в синтаксисе `RUST_LOG`. Слово `default` возвращает стартовую.\n\nДиректива ЗАМЕНЯЕТ фильтр целиком, а не добавляется к нему, и SQL слоя 3 идёт с target `wms_lib_core::dbx` — то есть напрашивающееся `wms_inventory=trace` (пример, который здесь стоял раньше) не включает ни одной SQL-строки и вдобавок гасит слои 1 и 2. Готовая строка «все три слоя сразу» — в `docs-obsidian/architecture/logging.md`.",
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "filter": {
              "type": "string"
            }
          },
          "required": [
            "filter"
          ],
          "title": "LogLevelResult",
          "type": "object"
        }
      },
      "summary": "Set the live log filter directive",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "log_level",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8dc269bdb828addf0aa7f94805ce65ca67c96c7593100542e77d507936c2413d",
      "x-quark-response-schema-hash": "sha256:f771652f1f76a0d815a20d8c9a44e87c8e21b234574eb984467b31289de64e85",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_log_level",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "filter": {
              "type": "string"
            }
          },
          "required": [
            "filter"
          ],
          "title": "LogLevelResult",
          "type": "object"
        }
      },
      "summary": "Read the live log filter directive",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "log_level",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:f771652f1f76a0d815a20d8c9a44e87c8e21b234574eb984467b31289de64e85",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_handling_unit_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "HandlingUnitTracking": {
                "description": "How a unit of this type is told apart. Only `ByInstance` is built: a carrier is a physical object with its own identity, not a SKU quantity.",
                "enum": [
                  "ByInstance"
                ],
                "type": "string"
              },
              "HandlingUnitUsagePolicy": {
                "description": "To whom an instance may be handed out by default.",
                "enum": [
                  "OwnOnly",
                  "WarehouseShared"
                ],
                "type": "string"
              }
            },
            "description": "A field left `None` is left out of the INSERT, so the column takes its DEFAULT.",
            "properties": {
              "active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "code_prefix": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_usage_policy": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/HandlingUnitUsagePolicy"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "holds_containers": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "holds_inventory": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "inner_height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "inner_length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "inner_width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_gross_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "positions": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "return_inspection": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "returnable": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "shippable": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "tare_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/HandlingUnitTracking"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "code",
              "name"
            ],
            "title": "HandlingUnitTypeForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HandlingUnitTracking": {
              "description": "How a unit of this type is told apart. Only `ByInstance` is built: a carrier is a physical object with its own identity, not a SKU quantity.",
              "enum": [
                "ByInstance"
              ],
              "type": "string"
            },
            "HandlingUnitUsagePolicy": {
              "description": "To whom an instance may be handed out by default.",
              "enum": [
                "OwnOnly",
                "WarehouseShared"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_prefix": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_usage_policy": {
              "anyOf": [
                {
                  "$ref": "#/definitions/HandlingUnitUsagePolicy"
                },
                {
                  "type": "null"
                }
              ]
            },
            "holds_containers": {
              "type": "boolean"
            },
            "holds_inventory": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "positions": {
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "return_inspection": {
              "type": "boolean"
            },
            "returnable": {
              "type": "boolean"
            },
            "shippable": {
              "type": "boolean"
            },
            "tare_weight": {
              "format": "double",
              "type": "number"
            },
            "tracking": {
              "$ref": "#/definitions/HandlingUnitTracking"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "holds_containers",
            "holds_inventory",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "mod_when",
            "mod_who",
            "name",
            "return_inspection",
            "returnable",
            "shippable",
            "tare_weight",
            "tracking"
          ],
          "title": "HandlingUnitType",
          "type": "object"
        }
      },
      "summary": "Create a new handling_unit_type — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "handling_unit_type",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:66544fc6e6f6332154dc08e758ab4024a901ae701a2f53f9cad23b2f10594f90",
      "x-quark-response-schema-hash": "sha256:dc25d5facab9320267cfefa39a48dd43d3661fcaf01bfadf5e4c56eb2e13cd41",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_handling_unit_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HandlingUnitTracking": {
              "description": "How a unit of this type is told apart. Only `ByInstance` is built: a carrier is a physical object with its own identity, not a SKU quantity.",
              "enum": [
                "ByInstance"
              ],
              "type": "string"
            },
            "HandlingUnitUsagePolicy": {
              "description": "To whom an instance may be handed out by default.",
              "enum": [
                "OwnOnly",
                "WarehouseShared"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_prefix": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_usage_policy": {
              "anyOf": [
                {
                  "$ref": "#/definitions/HandlingUnitUsagePolicy"
                },
                {
                  "type": "null"
                }
              ]
            },
            "holds_containers": {
              "type": "boolean"
            },
            "holds_inventory": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "positions": {
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "return_inspection": {
              "type": "boolean"
            },
            "returnable": {
              "type": "boolean"
            },
            "shippable": {
              "type": "boolean"
            },
            "tare_weight": {
              "format": "double",
              "type": "number"
            },
            "tracking": {
              "$ref": "#/definitions/HandlingUnitTracking"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "holds_containers",
            "holds_inventory",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "mod_when",
            "mod_who",
            "name",
            "return_inspection",
            "returnable",
            "shippable",
            "tare_weight",
            "tracking"
          ],
          "title": "HandlingUnitType",
          "type": "object"
        }
      },
      "summary": "Get a handling_unit_type by ID — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "handling_unit_type",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:dc25d5facab9320267cfefa39a48dd43d3661fcaf01bfadf5e4c56eb2e13cd41",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_handling_unit_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HandlingUnitTracking": {
              "description": "How a unit of this type is told apart. Only `ByInstance` is built: a carrier is a physical object with its own identity, not a SKU quantity.",
              "enum": [
                "ByInstance"
              ],
              "type": "string"
            },
            "HandlingUnitType": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "code_prefix": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_usage_policy": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/HandlingUnitUsagePolicy"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "holds_containers": {
                  "type": "boolean"
                },
                "holds_inventory": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "max_gross_weight": {
                  "format": "double",
                  "type": "number"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "positions": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "return_inspection": {
                  "type": "boolean"
                },
                "returnable": {
                  "type": "boolean"
                },
                "shippable": {
                  "type": "boolean"
                },
                "tare_weight": {
                  "format": "double",
                  "type": "number"
                },
                "tracking": {
                  "$ref": "#/definitions/HandlingUnitTracking"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "code",
                "holds_containers",
                "holds_inventory",
                "id",
                "inner_height",
                "inner_length",
                "inner_width",
                "max_gross_weight",
                "mod_when",
                "mod_who",
                "name",
                "return_inspection",
                "returnable",
                "shippable",
                "tare_weight",
                "tracking"
              ],
              "type": "object"
            },
            "HandlingUnitUsagePolicy": {
              "description": "To whom an instance may be handed out by default.",
              "enum": [
                "OwnOnly",
                "WarehouseShared"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/HandlingUnitType"
          },
          "title": "Array_of_HandlingUnitType",
          "type": "array"
        }
      },
      "summary": "List handling_unit_type — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "handling_unit_type",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:22b6598233b0033f5df2c8b97fcae3fa05db2029b2656ddf6c37abe9b7a17675",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_handling_unit_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count handling_unit_type — CRUD.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "handling_unit_type",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_handling_unit_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "active": {
                "type": "boolean"
              },
              "code_prefix": {
                "type": "string"
              },
              "default_usage_policy": {
                "description": "To whom an instance may be handed out by default.",
                "enum": [
                  "OwnOnly",
                  "WarehouseShared"
                ],
                "type": "string"
              },
              "holds_containers": {
                "type": "boolean"
              },
              "holds_inventory": {
                "type": "boolean"
              },
              "inner_height": {
                "format": "double",
                "type": "number"
              },
              "inner_length": {
                "format": "double",
                "type": "number"
              },
              "inner_width": {
                "format": "double",
                "type": "number"
              },
              "max_gross_weight": {
                "format": "double",
                "type": "number"
              },
              "name": {
                "type": "string"
              },
              "positions": {
                "format": "int16",
                "type": "integer"
              },
              "return_inspection": {
                "type": "boolean"
              },
              "returnable": {
                "type": "boolean"
              },
              "shippable": {
                "type": "boolean"
              },
              "tare_weight": {
                "format": "double",
                "type": "number"
              }
            },
            "title": "HandlingUnitTypeUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HandlingUnitTracking": {
              "description": "How a unit of this type is told apart. Only `ByInstance` is built: a carrier is a physical object with its own identity, not a SKU quantity.",
              "enum": [
                "ByInstance"
              ],
              "type": "string"
            },
            "HandlingUnitUsagePolicy": {
              "description": "To whom an instance may be handed out by default.",
              "enum": [
                "OwnOnly",
                "WarehouseShared"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_prefix": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_usage_policy": {
              "anyOf": [
                {
                  "$ref": "#/definitions/HandlingUnitUsagePolicy"
                },
                {
                  "type": "null"
                }
              ]
            },
            "holds_containers": {
              "type": "boolean"
            },
            "holds_inventory": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "positions": {
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "return_inspection": {
              "type": "boolean"
            },
            "returnable": {
              "type": "boolean"
            },
            "shippable": {
              "type": "boolean"
            },
            "tare_weight": {
              "format": "double",
              "type": "number"
            },
            "tracking": {
              "$ref": "#/definitions/HandlingUnitTracking"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "holds_containers",
            "holds_inventory",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "mod_when",
            "mod_who",
            "name",
            "return_inspection",
            "returnable",
            "shippable",
            "tare_weight",
            "tracking"
          ],
          "title": "HandlingUnitType",
          "type": "object"
        }
      },
      "summary": "Update a handling unit type; its code is the stable key and cannot change.",
      "tags": [
        {
          "name": "enterprise"
        }
      ],
      "x-quark-context": "enterprise",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "handling_unit_type",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a052a03ee6132e873c96b09035de1934eb1d95ceffff48142888d4b2e18ca2fa",
      "x-quark-response-schema-hash": "sha256:dc25d5facab9320267cfefa39a48dd43d3661fcaf01bfadf5e4c56eb2e13cd41",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "editable": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "description"
            ],
            "title": "CodeListForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeList",
          "type": "object"
        }
      },
      "summary": "Create a new code_list — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e1e0c217100082c2077dd68cffc7f58901b495a044688985029a2d1ec2719ca4",
      "x-quark-response-schema-hash": "sha256:c62f5cf390fff5f12daaba09731deba0613791d3e03332faf66f0fc7e78bb4ab",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeList",
          "type": "object"
        }
      },
      "summary": "Get a code_list by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c62f5cf390fff5f12daaba09731deba0613791d3e03332faf66f0fc7e78bb4ab",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CodeList": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "editable": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "description",
                "editable",
                "id",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CodeList"
          },
          "title": "Array_of_CodeList",
          "type": "array"
        }
      },
      "summary": "List code_list — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:687272caea8e690f65689ffd7331e50d25f1de47c3d52ef78c3beac7330bd922",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Editable fields of a code-list header. Its stable `code` is deliberately absent: changing identity is not a partial edit.",
            "properties": {
              "description": {
                "type": "string"
              },
              "editable": {
                "type": "boolean"
              }
            },
            "title": "CodeListUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeList",
          "type": "object"
        }
      },
      "summary": "Update code-list reference fields; null and identity changes are rejected.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:638dfece114d413cbf13f65233da3a8536f25b2284d275b966b16ba9d96c5cdc",
      "x-quark-response-schema-hash": "sha256:c62f5cf390fff5f12daaba09731deba0613791d3e03332faf66f0fc7e78bb4ab",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "editable": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeList",
          "type": "object"
        }
      },
      "summary": "Delete a code_list by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c62f5cf390fff5f12daaba09731deba0613791d3e03332faf66f0fc7e78bb4ab",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count code_list — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_code_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple code_list by IDs — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_code_list_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "code_list_id": {
                "format": "int64",
                "type": "integer"
              },
              "color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": "string"
              },
              "display_order": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "editable": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "short_description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "code_list_id",
              "description"
            ],
            "title": "CodeListValueForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_list_id": {
              "format": "int64",
              "type": "integer"
            },
            "color": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "display_order": {
              "format": "int16",
              "type": "integer"
            },
            "editable": {
              "type": "boolean"
            },
            "icon": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "short_description": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "code_list_id",
            "description",
            "display_order",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeListValue",
          "type": "object"
        }
      },
      "summary": "Create a new code_list_value — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code_value",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b608c310958f65c59bef163c79275e33c8a29382c11a7457ee13061ac0735b6c",
      "x-quark-response-schema-hash": "sha256:d783948c13764e7f8cd17af64fbb1c17e01263a6462a09895eccdaab5f50854a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_code_list_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_list_id": {
              "format": "int64",
              "type": "integer"
            },
            "color": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "display_order": {
              "format": "int16",
              "type": "integer"
            },
            "editable": {
              "type": "boolean"
            },
            "icon": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "short_description": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "code_list_id",
            "description",
            "display_order",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeListValue",
          "type": "object"
        }
      },
      "summary": "Get a code_list_value by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code_value",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d783948c13764e7f8cd17af64fbb1c17e01263a6462a09895eccdaab5f50854a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_code_list_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CodeListValue": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "code_list_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "color": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": "string"
                },
                "display_order": {
                  "format": "int16",
                  "type": "integer"
                },
                "editable": {
                  "type": "boolean"
                },
                "icon": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "short_description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "code",
                "code_list_id",
                "description",
                "display_order",
                "editable",
                "id",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CodeListValue"
          },
          "title": "Array_of_CodeListValue",
          "type": "array"
        }
      },
      "summary": "List code_list_value — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code_value",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:938e90586d79a9327254ec59c5ec5ad7b29f60eee225ff09fcc95581adb81652",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_code_list_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Editable fields of one value in a code list. `code_list_id` and `code` are identity and therefore cannot be changed through this endpoint.",
            "properties": {
              "active": {
                "type": "boolean"
              },
              "color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": "string"
              },
              "display_order": {
                "format": "int16",
                "type": "integer"
              },
              "editable": {
                "type": "boolean"
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "short_description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "CodeListValueUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_list_id": {
              "format": "int64",
              "type": "integer"
            },
            "color": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "display_order": {
              "format": "int16",
              "type": "integer"
            },
            "editable": {
              "type": "boolean"
            },
            "icon": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "short_description": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "code_list_id",
            "description",
            "display_order",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeListValue",
          "type": "object"
        }
      },
      "summary": "Update a code-list value with explicit keep, clear and set semantics.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code_value",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:12adb90e0450b68b9d04933ad6bd98584de8112c4c970a0ebc9b7fe56cd8cf9b",
      "x-quark-response-schema-hash": "sha256:d783948c13764e7f8cd17af64fbb1c17e01263a6462a09895eccdaab5f50854a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_code_list_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "code_list_id": {
              "format": "int64",
              "type": "integer"
            },
            "color": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "display_order": {
              "format": "int16",
              "type": "integer"
            },
            "editable": {
              "type": "boolean"
            },
            "icon": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "short_description": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "code_list_id",
            "description",
            "display_order",
            "editable",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "CodeListValue",
          "type": "object"
        }
      },
      "summary": "Delete a code_list_value by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code_value",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d783948c13764e7f8cd17af64fbb1c17e01263a6462a09895eccdaab5f50854a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_code_list_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count code_list_value — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "code_value",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_pack",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "descr": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "descr"
            ],
            "title": "PackInnerForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "PackInner",
          "type": "object"
        }
      },
      "summary": "Create a pack (header only)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1e39f5852fd224462fe2ba0d2ebb5627562e94d88adc3e0ac5c8c7134a667b60",
      "x-quark-response-schema-hash": "sha256:38b0d111604ef00b1dcc0a6d2b4d153a4ad73964ebaddfb7e180411f5e7511e4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_pack_with_items",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PackItemForCreate": {
                "properties": {
                  "cartonize": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "catch_weight_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "child_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cube": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "height": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "is_active": {
                    "description": "ADR-045 §3 — defaults to true on INSERT.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "is_catch_weight": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "is_dual_uom": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "length": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "max_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "min_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "nominal_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_hi": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_ti": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_wood_height": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_wood_length": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_wood_width": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "qty_per_child": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "replenish": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rotation_rule": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/RotationRule"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Как этот уровень разрешено поворачивать. Не прислали — `All90`, умолчание колонки: пока правила не было, класть упаковку как угодно ничто не запрещало."
                  },
                  "secondary_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "ship_as_is": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "uom": {
                    "type": "string"
                  },
                  "weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "width": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "uom"
                ],
                "type": "object"
              },
              "RotationRule": {
                "oneOf": [
                  {
                    "description": "Все шесть ориентаций.",
                    "enum": [
                      "All90"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Только естественное положение.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "«Этой стороной вверх».",
                    "enum": [
                      "UprightOnly"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "code": {
                "type": "string"
              },
              "descr": {
                "type": "string"
              },
              "items": {
                "items": {
                  "$ref": "#/definitions/PackItemForCreate"
                },
                "type": "array"
              }
            },
            "required": [
              "code",
              "descr",
              "items"
            ],
            "title": "PackForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackItem": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "description": "ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.",
                  "type": "boolean"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RotationRule"
                    }
                  ],
                  "description": "Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "description": "Explicit factory packaging. Mutually exclusive with `cartonize`.",
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_active",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "items": {
              "items": {
                "$ref": "#/definitions/PackItem"
              },
              "type": "array"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "items",
            "mod_when",
            "mod_who"
          ],
          "title": "Pack",
          "type": "object"
        }
      },
      "summary": "Create a pack with child items",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:969595c5091249376fcc66bd63f498de0701a4d7e693ad94d81ed60614378d56",
      "x-quark-response-schema-hash": "sha256:f45cb5d96635af870ba877a4bd54bdf0129cc1bf2f2ce6f8685fdcb830a624f1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_pack_item",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "RotationRule": {
                "oneOf": [
                  {
                    "description": "Все шесть ориентаций.",
                    "enum": [
                      "All90"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Только естественное положение.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "«Этой стороной вверх».",
                    "enum": [
                      "UprightOnly"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "base_qty": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "cartonize": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "catch_weight_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "child_pack_item_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "hierarchy_level": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "is_catch_weight": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "is_dual_uom": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "min_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "nominal_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pack_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_revision_id": {
                "description": "Эпоха, в которую ложится строка. Вызывающему знать о ней не нужно: `PackItemInnerBmc::create` сам берёт ДЕЙСТВУЮЩУЮ ревизию упаковки. Поле есть только потому, что `Fields` строит список колонок INSERT-а из структуры, а колонка `NOT NULL` и без умолчания.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pallet_hi": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_ti": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_wood_height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_wood_length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_wood_width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "qty_per_child": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "replenish": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "rotation_rule": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/RotationRule"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secondary_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ship_as_is": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "uom": {
                "type": "string"
              },
              "weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "pack_id",
              "uom"
            ],
            "title": "PackItemForCreateInner",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "base_qty": {
              "format": "double",
              "type": "number"
            },
            "cartonize": {
              "type": "boolean"
            },
            "catch_weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "child_pack_item_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "cube": {
              "format": "double",
              "type": "number"
            },
            "height": {
              "format": "double",
              "type": "number"
            },
            "hierarchy_level": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_catch_weight": {
              "type": "boolean"
            },
            "is_dual_uom": {
              "type": "boolean"
            },
            "length": {
              "format": "double",
              "type": "number"
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "nominal_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_revision_id": {
              "description": "Эпоха лестницы, которой принадлежит эта ступень (миграция 347).",
              "format": "int64",
              "type": "integer"
            },
            "pallet_hi": {
              "format": "double",
              "type": "number"
            },
            "pallet_ti": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_height": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_length": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_width": {
              "format": "double",
              "type": "number"
            },
            "qty_per_child": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "replenish": {
              "type": "boolean"
            },
            "rotation_rule": {
              "$ref": "#/definitions/RotationRule"
            },
            "secondary_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "ship_as_is": {
              "type": "boolean"
            },
            "uom": {
              "type": "string"
            },
            "weight": {
              "format": "double",
              "type": "number"
            },
            "width": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "base_qty",
            "cartonize",
            "cube",
            "height",
            "hierarchy_level",
            "id",
            "is_catch_weight",
            "is_dual_uom",
            "length",
            "mod_when",
            "mod_who",
            "pack_id",
            "pack_revision_id",
            "pallet_hi",
            "pallet_ti",
            "pallet_wood_height",
            "pallet_wood_length",
            "pallet_wood_width",
            "replenish",
            "rotation_rule",
            "ship_as_is",
            "uom",
            "weight",
            "width"
          ],
          "title": "PackItemInner",
          "type": "object"
        }
      },
      "summary": "Create a single pack item",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:dcb74832f35119211f0046c2936bd4bda0fd850de14cca942d00a1e85f4f0021",
      "x-quark-response-schema-hash": "sha256:bfa527a1096e8b09ad235b08e5c7b1056b3dc84268bf7a6aa8e96cd7576ba7df",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pack",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "PackInner",
          "type": "object"
        }
      },
      "summary": "Get a pack by ID (header only)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:38b0d111604ef00b1dcc0a6d2b4d153a4ad73964ebaddfb7e180411f5e7511e4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pack_with_items",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackItem": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "description": "ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.",
                  "type": "boolean"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RotationRule"
                    }
                  ],
                  "description": "Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "description": "Explicit factory packaging. Mutually exclusive with `cartonize`.",
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_active",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "items": {
              "items": {
                "$ref": "#/definitions/PackItem"
              },
              "type": "array"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "items",
            "mod_when",
            "mod_who"
          ],
          "title": "Pack",
          "type": "object"
        }
      },
      "summary": "Get a pack by ID with items",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f45cb5d96635af870ba877a4bd54bdf0129cc1bf2f2ce6f8685fdcb830a624f1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pack_item",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "base_qty": {
              "format": "double",
              "type": "number"
            },
            "cartonize": {
              "type": "boolean"
            },
            "catch_weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "child_pack_item_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "cube": {
              "format": "double",
              "type": "number"
            },
            "height": {
              "format": "double",
              "type": "number"
            },
            "hierarchy_level": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_catch_weight": {
              "type": "boolean"
            },
            "is_dual_uom": {
              "type": "boolean"
            },
            "length": {
              "format": "double",
              "type": "number"
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "nominal_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_revision_id": {
              "description": "Эпоха лестницы, которой принадлежит эта ступень (миграция 347).",
              "format": "int64",
              "type": "integer"
            },
            "pallet_hi": {
              "format": "double",
              "type": "number"
            },
            "pallet_ti": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_height": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_length": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_width": {
              "format": "double",
              "type": "number"
            },
            "qty_per_child": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "replenish": {
              "type": "boolean"
            },
            "rotation_rule": {
              "$ref": "#/definitions/RotationRule"
            },
            "secondary_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "ship_as_is": {
              "type": "boolean"
            },
            "uom": {
              "type": "string"
            },
            "weight": {
              "format": "double",
              "type": "number"
            },
            "width": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "base_qty",
            "cartonize",
            "cube",
            "height",
            "hierarchy_level",
            "id",
            "is_catch_weight",
            "is_dual_uom",
            "length",
            "mod_when",
            "mod_who",
            "pack_id",
            "pack_revision_id",
            "pallet_hi",
            "pallet_ti",
            "pallet_wood_height",
            "pallet_wood_length",
            "pallet_wood_width",
            "replenish",
            "rotation_rule",
            "ship_as_is",
            "uom",
            "weight",
            "width"
          ],
          "title": "PackItemInner",
          "type": "object"
        }
      },
      "summary": "Get a pack item by ID",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bfa527a1096e8b09ad235b08e5c7b1056b3dc84268bf7a6aa8e96cd7576ba7df",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_pack",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "PackInnerForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "PackInner",
          "type": "object"
        }
      },
      "summary": "Update a pack (header only)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:928c3212778360a389ae8a38dc8c1b7d87473c5a5c49761e393abd464895a4da",
      "x-quark-response-schema-hash": "sha256:38b0d111604ef00b1dcc0a6d2b4d153a4ad73964ebaddfb7e180411f5e7511e4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_pack_with_items",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PackItemForUpdate": {
                "properties": {
                  "cartonize": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "catch_weight_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cube": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "height": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "is_active": {
                    "description": "ADR-045 §3 — flip to false to retire (don't UPDATE other fields).",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "is_catch_weight": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "is_dual_uom": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "length": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "max_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "min_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "nominal_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_hi": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_ti": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_wood_height": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_wood_length": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pallet_wood_width": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "qty_per_child": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "replenish": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rotation_rule": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/RotationRule"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Как этот уровень разрешено поворачивать. Не прислали — `All90`, умолчание колонки: пока правила не было, класть упаковку как угодно ничто не запрещало."
                  },
                  "secondary_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "ship_as_is": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "width": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "RotationRule": {
                "oneOf": [
                  {
                    "description": "Все шесть ориентаций.",
                    "enum": [
                      "All90"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Только естественное положение.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "«Этой стороной вверх».",
                    "enum": [
                      "UprightOnly"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "items": {
                "items": {
                  "$ref": "#/definitions/PackItemForUpdate"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "title": "PackForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackItem": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "description": "ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.",
                  "type": "boolean"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RotationRule"
                    }
                  ],
                  "description": "Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "description": "Explicit factory packaging. Mutually exclusive with `cartonize`.",
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_active",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "items": {
              "items": {
                "$ref": "#/definitions/PackItem"
              },
              "type": "array"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "items",
            "mod_when",
            "mod_who"
          ],
          "title": "Pack",
          "type": "object"
        }
      },
      "summary": "Update a pack with child items",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:aec355fd67e608b9a2a20324d0a2b99a4e4cdf72d32af24b596bdb51c2735dd7",
      "x-quark-response-schema-hash": "sha256:f45cb5d96635af870ba877a4bd54bdf0129cc1bf2f2ce6f8685fdcb830a624f1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_pack_item",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "RotationRule": {
                "oneOf": [
                  {
                    "description": "Все шесть ориентаций.",
                    "enum": [
                      "All90"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Только естественное положение.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "«Этой стороной вверх».",
                    "enum": [
                      "UprightOnly"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "base_qty": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "cartonize": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "catch_weight_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "child_pack_item_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "hierarchy_level": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "is_catch_weight": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "is_dual_uom": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "min_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "nominal_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_hi": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_ti": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_wood_height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_wood_length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "pallet_wood_width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "qty_per_child": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "replenish": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "rotation_rule": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/RotationRule"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secondary_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ship_as_is": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "title": "PackItemForUpdateInner",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "base_qty": {
              "format": "double",
              "type": "number"
            },
            "cartonize": {
              "type": "boolean"
            },
            "catch_weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "child_pack_item_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "cube": {
              "format": "double",
              "type": "number"
            },
            "height": {
              "format": "double",
              "type": "number"
            },
            "hierarchy_level": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_catch_weight": {
              "type": "boolean"
            },
            "is_dual_uom": {
              "type": "boolean"
            },
            "length": {
              "format": "double",
              "type": "number"
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "nominal_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_revision_id": {
              "description": "Эпоха лестницы, которой принадлежит эта ступень (миграция 347).",
              "format": "int64",
              "type": "integer"
            },
            "pallet_hi": {
              "format": "double",
              "type": "number"
            },
            "pallet_ti": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_height": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_length": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_width": {
              "format": "double",
              "type": "number"
            },
            "qty_per_child": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "replenish": {
              "type": "boolean"
            },
            "rotation_rule": {
              "$ref": "#/definitions/RotationRule"
            },
            "secondary_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "ship_as_is": {
              "type": "boolean"
            },
            "uom": {
              "type": "string"
            },
            "weight": {
              "format": "double",
              "type": "number"
            },
            "width": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "base_qty",
            "cartonize",
            "cube",
            "height",
            "hierarchy_level",
            "id",
            "is_catch_weight",
            "is_dual_uom",
            "length",
            "mod_when",
            "mod_who",
            "pack_id",
            "pack_revision_id",
            "pallet_hi",
            "pallet_ti",
            "pallet_wood_height",
            "pallet_wood_length",
            "pallet_wood_width",
            "replenish",
            "rotation_rule",
            "ship_as_is",
            "uom",
            "weight",
            "width"
          ],
          "title": "PackItemInner",
          "type": "object"
        }
      },
      "summary": "Update a pack item",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:77fabec06fadffd290e155f7cb58ac0a5ab1a97ad7ca0db909fb738583500912",
      "x-quark-response-schema-hash": "sha256:bfa527a1096e8b09ad235b08e5c7b1056b3dc84268bf7a6aa8e96cd7576ba7df",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_packs",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackInner": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "descr",
                "id",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PackInner"
          },
          "title": "Array_of_PackInner",
          "type": "array"
        }
      },
      "summary": "List packs (filtered)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:ce68eb90064253048c60bfe2dda8824d727373245f45ac8530d52b4b9b005708",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_pack_items",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackItemInner": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "description": "Эпоха лестницы, которой принадлежит эта ступень (миграция 347).",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "$ref": "#/definitions/RotationRule"
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/PackItemInner"
          },
          "title": "Array_of_PackItemInner",
          "type": "array"
        }
      },
      "summary": "List pack items (filtered)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:527da36e547a057efc150d96ce0372c48e644b08fa5378798cb7a1e1644c608e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_pack",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "PackInner",
          "type": "object"
        }
      },
      "summary": "Delete a pack (header only)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:38b0d111604ef00b1dcc0a6d2b4d153a4ad73964ebaddfb7e180411f5e7511e4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_pack_item",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "base_qty": {
              "format": "double",
              "type": "number"
            },
            "cartonize": {
              "type": "boolean"
            },
            "catch_weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "child_pack_item_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "cube": {
              "format": "double",
              "type": "number"
            },
            "height": {
              "format": "double",
              "type": "number"
            },
            "hierarchy_level": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_catch_weight": {
              "type": "boolean"
            },
            "is_dual_uom": {
              "type": "boolean"
            },
            "length": {
              "format": "double",
              "type": "number"
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "nominal_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_revision_id": {
              "description": "Эпоха лестницы, которой принадлежит эта ступень (миграция 347).",
              "format": "int64",
              "type": "integer"
            },
            "pallet_hi": {
              "format": "double",
              "type": "number"
            },
            "pallet_ti": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_height": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_length": {
              "format": "double",
              "type": "number"
            },
            "pallet_wood_width": {
              "format": "double",
              "type": "number"
            },
            "qty_per_child": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "replenish": {
              "type": "boolean"
            },
            "rotation_rule": {
              "$ref": "#/definitions/RotationRule"
            },
            "secondary_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "ship_as_is": {
              "type": "boolean"
            },
            "uom": {
              "type": "string"
            },
            "weight": {
              "format": "double",
              "type": "number"
            },
            "width": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "base_qty",
            "cartonize",
            "cube",
            "height",
            "hierarchy_level",
            "id",
            "is_catch_weight",
            "is_dual_uom",
            "length",
            "mod_when",
            "mod_who",
            "pack_id",
            "pack_revision_id",
            "pallet_hi",
            "pallet_ti",
            "pallet_wood_height",
            "pallet_wood_length",
            "pallet_wood_width",
            "replenish",
            "rotation_rule",
            "ship_as_is",
            "uom",
            "weight",
            "width"
          ],
          "title": "PackItemInner",
          "type": "object"
        }
      },
      "summary": "Delete a pack item",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bfa527a1096e8b09ad235b08e5c7b1056b3dc84268bf7a6aa8e96cd7576ba7df",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_pack_with_items",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackItem": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "description": "ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.",
                  "type": "boolean"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RotationRule"
                    }
                  ],
                  "description": "Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "description": "Explicit factory packaging. Mutually exclusive with `cartonize`.",
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_active",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "items": {
              "items": {
                "$ref": "#/definitions/PackItem"
              },
              "type": "array"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "items",
            "mod_when",
            "mod_who"
          ],
          "title": "Pack",
          "type": "object"
        }
      },
      "summary": "Delete a pack with its items",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f45cb5d96635af870ba877a4bd54bdf0129cc1bf2f2ce6f8685fdcb830a624f1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_pack",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count packs",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pack_hierarchy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackInner": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "descr",
                "id",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            },
            "PackItemTreeView": {
              "description": "Tree view representation for UI display",
              "properties": {
                "baseQty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catchWeightUom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "childPackItemId": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchyLevel": {
                  "format": "int32",
                  "type": "integer"
                },
                "hierarchyPath": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "isBaseUnit": {
                  "type": "boolean"
                },
                "isCatchWeight": {
                  "type": "boolean"
                },
                "isDualUom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "maxWeight": {
                  "format": "double",
                  "type": "number"
                },
                "minWeight": {
                  "format": "double",
                  "type": "number"
                },
                "nominalWeight": {
                  "format": "double",
                  "type": "number"
                },
                "packId": {
                  "format": "int64",
                  "type": "integer"
                },
                "palletHi": {
                  "format": "double",
                  "type": "number"
                },
                "palletTi": {
                  "format": "double",
                  "type": "number"
                },
                "qtyPerChild": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "secondaryUom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shipAsIs": {
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "baseQty",
                "cartonize",
                "cube",
                "height",
                "hierarchyLevel",
                "hierarchyPath",
                "id",
                "isBaseUnit",
                "isCatchWeight",
                "isDualUom",
                "length",
                "maxWeight",
                "minWeight",
                "nominalWeight",
                "packId",
                "palletHi",
                "palletTi",
                "replenish",
                "shipAsIs",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            }
          },
          "description": "Response for hierarchy endpoint",
          "properties": {
            "items": {
              "items": {
                "$ref": "#/definitions/PackItemTreeView"
              },
              "type": "array"
            },
            "pack": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PackInner"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "items"
          ],
          "title": "PackHierarchyResponse",
          "type": "object"
        }
      },
      "summary": "Get pack items as tree/hierarchy view",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:40738c5239d08479eebda4b74cae646eccb668afb7fee2b0c9a0fb106e43f824",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "convert_pack_uom",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "from_uom",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        },
        {
          "name": "pack_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "qty",
          "required": true,
          "schema": {
            "format": "double",
            "type": "number"
          },
          "summary": null
        },
        {
          "name": "to_uom",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Response for UOM conversion",
          "properties": {
            "fromQty": {
              "format": "double",
              "type": "number"
            },
            "fromUom": {
              "type": "string"
            },
            "toQty": {
              "format": "double",
              "type": "number"
            },
            "toUom": {
              "type": "string"
            }
          },
          "required": [
            "fromQty",
            "fromUom",
            "toQty",
            "toUom"
          ],
          "title": "ConvertUomResponse",
          "type": "object"
        }
      },
      "summary": "Convert quantity between UOMs within a pack",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:27659a319d0c8296650055dad0d81149dd0a874a8ca6df8cce1c64bc7b75d039",
      "x-quark-response-schema-hash": "sha256:50a5c354763029e1d3f7384f47cb59bd19646aa3b3449b705d2cfb150a719b82",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "calc_pack_quantity_breakdown",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "pack_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "qty",
          "required": true,
          "schema": {
            "format": "double",
            "type": "number"
          },
          "summary": null
        },
        {
          "name": "uom",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "BreakdownLevel": {
              "description": "Single level in the breakdown result",
              "properties": {
                "hierarchyLevel": {
                  "format": "int32",
                  "type": "integer"
                },
                "qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "hierarchyLevel",
                "qty",
                "uom"
              ],
              "type": "object"
            }
          },
          "description": "Result of quantity breakdown calculation. Works with any UOM hierarchy - not hardcoded to PL/CS/EA.",
          "properties": {
            "display": {
              "description": "Human-readable breakdown string (e.g., \"1 PL + 35 CS + 4 EA\")",
              "type": "string"
            },
            "levels": {
              "items": {
                "$ref": "#/definitions/BreakdownLevel"
              },
              "type": "array"
            },
            "totalBaseQty": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "display",
            "levels",
            "totalBaseQty"
          ],
          "title": "QuantityBreakdown",
          "type": "object"
        }
      },
      "summary": "Calculate quantity breakdown across pack hierarchy levels",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4b9beaafff29ecd07e63474f2fe0457910a87586f122d2c69ea56ec47c010989",
      "x-quark-response-schema-hash": "sha256:543b237c1b34b0ee007e8243511b60cdd8b448e2bfd547c66257d91240e35e5f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "calc_pack_pallet_breakdown",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "pack_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "qty",
          "required": true,
          "schema": {
            "format": "double",
            "type": "number"
          },
          "summary": null
        },
        {
          "name": "uom",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "BreakdownLevel": {
              "description": "Single level in the breakdown result",
              "properties": {
                "hierarchyLevel": {
                  "format": "int32",
                  "type": "integer"
                },
                "qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "hierarchyLevel",
                "qty",
                "uom"
              ],
              "type": "object"
            }
          },
          "description": "Result of quantity breakdown calculation. Works with any UOM hierarchy - not hardcoded to PL/CS/EA.",
          "properties": {
            "display": {
              "description": "Human-readable breakdown string (e.g., \"1 PL + 35 CS + 4 EA\")",
              "type": "string"
            },
            "levels": {
              "items": {
                "$ref": "#/definitions/BreakdownLevel"
              },
              "type": "array"
            },
            "totalBaseQty": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "display",
            "levels",
            "totalBaseQty"
          ],
          "title": "QuantityBreakdown",
          "type": "object"
        }
      },
      "summary": "Calculate pack pallet breakdown (alias of calc_pack_quantity_breakdown)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4b9beaafff29ecd07e63474f2fe0457910a87586f122d2c69ea56ec47c010989",
      "x-quark-response-schema-hash": "sha256:543b237c1b34b0ee007e8243511b60cdd8b448e2bfd547c66257d91240e35e5f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "recalculate_pack_hierarchy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackItem": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "description": "ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.",
                  "type": "boolean"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RotationRule"
                    }
                  ],
                  "description": "Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "description": "Explicit factory packaging. Mutually exclusive with `cartonize`.",
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_active",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "items": {
              "items": {
                "$ref": "#/definitions/PackItem"
              },
              "type": "array"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "items",
            "mod_when",
            "mod_who"
          ],
          "title": "Pack",
          "type": "object"
        }
      },
      "summary": "Recalculate base_qty and hierarchy_level for all items in a pack",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pack",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f45cb5d96635af870ba877a4bd54bdf0129cc1bf2f2ce6f8685fdcb830a624f1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "OwnerType": {
                "enum": [
                  "Sup",
                  "Cus",
                  "Trn",
                  "Rec",
                  "Con",
                  "Own",
                  "Man",
                  "Dst",
                  "Vnd",
                  "Brk"
                ],
                "type": "string"
              }
            },
            "properties": {
              "code": {
                "type": "string"
              },
              "company": {
                "type": "string"
              },
              "credit_limit": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "currency_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "locale": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_type": {
                "$ref": "#/definitions/OwnerType"
              },
              "parent_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "picking_toloc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timezone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vat": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "company",
              "owner_type"
            ],
            "title": "OwnerForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "Owner",
          "type": "object"
        }
      },
      "summary": "Create an owner master-data root.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c789819f5751dd4437b41e978bd49d46e359e65b08c62c32e01df410c62d95df",
      "x-quark-response-schema-hash": "sha256:599a5343de5e4b20d1c670f9e19f66c6b3259320336802969e9472a513fcc624",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "Owner",
          "type": "object"
        }
      },
      "summary": "Get a owner by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:599a5343de5e4b20d1c670f9e19f66c6b3259320336802969e9472a513fcc624",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "OwnerAddress": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "address1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address4": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address_type": {
                  "type": "string"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_default": {
                  "type": "boolean"
                },
                "iso_country_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "phone1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "zip": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "address_type",
                "id",
                "is_default",
                "mod_when",
                "mod_who",
                "owner_id"
              ],
              "type": "object"
            },
            "OwnerConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_commingled_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_duplicate_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_system_generated_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_asn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_po": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_print_lpn_on_receive": {
                  "type": "boolean"
                },
                "carton_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "confirm_empty_on_move": {
                  "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
                  "type": "boolean"
                },
                "cube_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "damage_major_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_minor_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_total_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "default_allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_discard_loc": {
                  "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_inventory_tracking_granularity": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_receiving_loc": {
                  "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_returns_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_rtv_loc": {
                  "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_sku_rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dimension_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hide_expected_qty_from_operator": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lpn_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_rollback_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_start_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_lpn_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_reservation_ttl_min": {
                  "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "roll_receipt": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "rtv_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shelf_life_warning_multiplier_pct": {
                  "format": "int32",
                  "type": "integer"
                },
                "track_inventory_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "write_off_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_print_lpn_on_receive",
                "confirm_empty_on_move",
                "damage_major_action",
                "damage_minor_action",
                "damage_total_action",
                "hide_expected_qty_from_operator",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "shelf_life_warning_multiplier_pct"
              ],
              "type": "object"
            },
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "addresses": {
              "items": {
                "$ref": "#/definitions/OwnerAddress"
              },
              "type": "array"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OwnerConfig"
                },
                {
                  "type": "null"
                }
              ]
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "addresses",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "OwnerFull",
          "type": "object"
        }
      },
      "summary": "Get owner with addresses and config aggregated",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:a05bb0c04ce7e84b0c634a9b7d58bb8c35d93f9f850611a09bf4f214e56d757b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner_config_by_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/OwnerConfig"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "OwnerConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_commingled_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_duplicate_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_system_generated_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_asn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_po": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_print_lpn_on_receive": {
                  "type": "boolean"
                },
                "carton_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "confirm_empty_on_move": {
                  "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
                  "type": "boolean"
                },
                "cube_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "damage_major_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_minor_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_total_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "default_allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_discard_loc": {
                  "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_inventory_tracking_granularity": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_receiving_loc": {
                  "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_returns_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_rtv_loc": {
                  "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_sku_rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dimension_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hide_expected_qty_from_operator": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lpn_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_rollback_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_start_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_lpn_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_reservation_ttl_min": {
                  "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "roll_receipt": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "rtv_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shelf_life_warning_multiplier_pct": {
                  "format": "int32",
                  "type": "integer"
                },
                "track_inventory_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "write_off_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_print_lpn_on_receive",
                "confirm_empty_on_move",
                "damage_major_action",
                "damage_minor_action",
                "damage_total_action",
                "hide_expected_qty_from_operator",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "shelf_life_warning_multiplier_pct"
              ],
              "type": "object"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "title": "Nullable_OwnerConfig"
        }
      },
      "summary": "Get owner config by owner ID (1:1 relationship)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d44846a5ad0217903b8041c8351ffd26c9d148d7a2094b246b9e71cf5a8afcf4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_owner_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "DamageAction": {
                "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                "enum": [
                  "None",
                  "Hold",
                  "Reject",
                  "WriteOff",
                  "RTV",
                  "Repurpose",
                  "Destroy"
                ],
                "type": "string"
              },
              "OwnerAddressForCreateInner": {
                "additionalProperties": false,
                "properties": {
                  "address1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address3": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address4": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address_type": {
                    "type": "string"
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "contact1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "contact2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_default": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "iso_country_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "zip": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "address_type"
                ],
                "type": "object"
              },
              "OwnerConfigForCreateInner": {
                "additionalProperties": false,
                "properties": {
                  "allow_commingled_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_duplicate_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_mixed_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_system_generated_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_close_asn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_close_po": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_print_lpn_on_receive": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "carton_group": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "confirm_empty_on_move": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "cube_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "damage_major_action": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/DamageAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "damage_minor_action": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/DamageAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "damage_total_action": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/DamageAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "default_allocation_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_cartonization_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_discard_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_lot_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_putaway_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_qc_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_receipt_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_receiving_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_replenishment_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_returns_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_rtv_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_sku_rotation": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/SkuRotation"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dimension_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hide_expected_qty_from_operator": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "lpn_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lpn_rollback_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lpn_start_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "next_lpn_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "putaway_reservation_ttl_min": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "roll_receipt": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rtv_gl_account_hint": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shelf_life_warning_multiplier_pct": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "track_inventory_by": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "weight_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "write_off_gl_account_hint": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "OwnerForCreate": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "company": {
                    "type": "string"
                  },
                  "credit_limit": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "currency_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "locale": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "owner_type": {
                    "$ref": "#/definitions/OwnerType"
                  },
                  "parent_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "picking_toloc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "timezone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vat": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "code",
                  "company",
                  "owner_type"
                ],
                "type": "object"
              },
              "OwnerType": {
                "enum": [
                  "Sup",
                  "Cus",
                  "Trn",
                  "Rec",
                  "Con",
                  "Own",
                  "Man",
                  "Dst",
                  "Vnd",
                  "Brk"
                ],
                "type": "string"
              },
              "SkuRotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              }
            },
            "properties": {
              "addresses": {
                "items": {
                  "$ref": "#/definitions/OwnerAddressForCreateInner"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/OwnerConfigForCreateInner"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "owner": {
                "$ref": "#/definitions/OwnerForCreate"
              }
            },
            "required": [
              "owner"
            ],
            "title": "OwnerFullForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "OwnerAddress": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "address1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address4": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address_type": {
                  "type": "string"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_default": {
                  "type": "boolean"
                },
                "iso_country_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "phone1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "zip": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "address_type",
                "id",
                "is_default",
                "mod_when",
                "mod_who",
                "owner_id"
              ],
              "type": "object"
            },
            "OwnerConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_commingled_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_duplicate_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_system_generated_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_asn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_po": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_print_lpn_on_receive": {
                  "type": "boolean"
                },
                "carton_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "confirm_empty_on_move": {
                  "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
                  "type": "boolean"
                },
                "cube_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "damage_major_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_minor_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_total_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "default_allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_discard_loc": {
                  "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_inventory_tracking_granularity": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_receiving_loc": {
                  "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_returns_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_rtv_loc": {
                  "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_sku_rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dimension_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hide_expected_qty_from_operator": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lpn_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_rollback_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_start_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_lpn_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_reservation_ttl_min": {
                  "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "roll_receipt": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "rtv_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shelf_life_warning_multiplier_pct": {
                  "format": "int32",
                  "type": "integer"
                },
                "track_inventory_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "write_off_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_print_lpn_on_receive",
                "confirm_empty_on_move",
                "damage_major_action",
                "damage_minor_action",
                "damage_total_action",
                "hide_expected_qty_from_operator",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "shelf_life_warning_multiplier_pct"
              ],
              "type": "object"
            },
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "addresses": {
              "items": {
                "$ref": "#/definitions/OwnerAddress"
              },
              "type": "array"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OwnerConfig"
                },
                {
                  "type": "null"
                }
              ]
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "addresses",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "OwnerFull",
          "type": "object"
        }
      },
      "summary": "Create owner with addresses and config in one call",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a8415181709dd6cb8386e4ec3e3c105760dfb11b57f42a3348991ba2f43a0636",
      "x-quark-response-schema-hash": "sha256:a05bb0c04ce7e84b0c634a9b7d58bb8c35d93f9f850611a09bf4f214e56d757b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_owner_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AllowError": {
                "enum": [
                  "Allow",
                  "HardError",
                  "Warning"
                ],
                "type": "string"
              },
              "DamageAction": {
                "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                "enum": [
                  "None",
                  "Hold",
                  "Reject",
                  "WriteOff",
                  "RTV",
                  "Repurpose",
                  "Destroy"
                ],
                "type": "string"
              },
              "InventoryTrackingGranularity": {
                "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
                "enum": [
                  "Aggregate",
                  "Pallet",
                  "Case"
                ],
                "type": "string"
              },
              "OwnerAddressUpdate": {
                "additionalProperties": false,
                "properties": {
                  "data": {
                    "$ref": "#/definitions/OwnerAddressUpdateApi"
                  },
                  "id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "data",
                  "id"
                ],
                "type": "object"
              },
              "OwnerAddressUpdateApi": {
                "additionalProperties": false,
                "properties": {
                  "address1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address3": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address4": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "address_type": {
                    "type": "string"
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "contact1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "contact2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_default": {
                    "type": "boolean"
                  },
                  "iso_country_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "zip": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "OwnerConfigForCreateInner": {
                "additionalProperties": false,
                "properties": {
                  "allow_commingled_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_duplicate_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_mixed_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_system_generated_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_close_asn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_close_po": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_print_lpn_on_receive": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "carton_group": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "confirm_empty_on_move": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "cube_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "damage_major_action": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/DamageAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "damage_minor_action": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/DamageAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "damage_total_action": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/DamageAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "default_allocation_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_cartonization_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_discard_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_lot_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_putaway_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_qc_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_receipt_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_receiving_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_replenishment_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_returns_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_rtv_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_sku_rotation": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/SkuRotation"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dimension_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hide_expected_qty_from_operator": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "lpn_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lpn_rollback_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lpn_start_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "next_lpn_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "putaway_reservation_ttl_min": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "roll_receipt": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rtv_gl_account_hint": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shelf_life_warning_multiplier_pct": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "track_inventory_by": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "weight_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "write_off_gl_account_hint": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "OwnerConfigMutation": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/OwnerConfigForCreateInner"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/definitions/OwnerConfigUpdateApi"
                      },
                      "id": {
                        "format": "int64",
                        "type": "integer"
                      }
                    },
                    "required": [
                      "data",
                      "id"
                    ],
                    "type": "object"
                  }
                ]
              },
              "OwnerConfigUpdateApi": {
                "additionalProperties": false,
                "properties": {
                  "allow_commingled_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_duplicate_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_mixed_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_system_generated_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_close_asn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_close_po": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "auto_print_lpn_on_receive": {
                    "type": "boolean"
                  },
                  "carton_group": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "confirm_empty_on_move": {
                    "type": "boolean"
                  },
                  "cube_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "damage_major_action": {
                    "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                    "enum": [
                      "None",
                      "Hold",
                      "Reject",
                      "WriteOff",
                      "RTV",
                      "Repurpose",
                      "Destroy"
                    ],
                    "type": "string"
                  },
                  "damage_minor_action": {
                    "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                    "enum": [
                      "None",
                      "Hold",
                      "Reject",
                      "WriteOff",
                      "RTV",
                      "Repurpose",
                      "Destroy"
                    ],
                    "type": "string"
                  },
                  "damage_total_action": {
                    "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                    "enum": [
                      "None",
                      "Hold",
                      "Reject",
                      "WriteOff",
                      "RTV",
                      "Repurpose",
                      "Destroy"
                    ],
                    "type": "string"
                  },
                  "default_allocation_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_cartonization_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_discard_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_inventory_tracking_granularity": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/InventoryTrackingGranularity"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "default_lot_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_putaway_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_qc_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_receipt_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_receiving_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_replenishment_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "default_returns_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_rtv_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "default_sku_rotation": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/SkuRotation"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "default_unplanned_case_on_asn": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/AllowError"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dimension_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "hide_expected_qty_from_operator": {
                    "type": "boolean"
                  },
                  "lpn_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lpn_rollback_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "lpn_start_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "next_lpn_number": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "putaway_reservation_ttl_min": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "roll_receipt": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "rtv_gl_account_hint": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shelf_life_warning_multiplier_pct": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "track_inventory_by": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "weight_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "write_off_gl_account_hint": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "OwnerUpdateApi": {
                "additionalProperties": false,
                "properties": {
                  "company": {
                    "type": "string"
                  },
                  "credit_limit": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "currency_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "locale": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "owner_type": {
                    "enum": [
                      "Sup",
                      "Cus",
                      "Trn",
                      "Rec",
                      "Con",
                      "Own",
                      "Man",
                      "Dst",
                      "Vnd",
                      "Brk"
                    ],
                    "type": "string"
                  },
                  "parent_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "picking_toloc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "timezone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "vat": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "SkuRotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              }
            },
            "properties": {
              "addresses": {
                "items": {
                  "$ref": "#/definitions/OwnerAddressUpdate"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "config": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/OwnerConfigMutation"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "owner": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/OwnerUpdateApi"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "title": "OwnerFullForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "OwnerAddress": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "address1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address4": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address_type": {
                  "type": "string"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_default": {
                  "type": "boolean"
                },
                "iso_country_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "phone1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "zip": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "address_type",
                "id",
                "is_default",
                "mod_when",
                "mod_who",
                "owner_id"
              ],
              "type": "object"
            },
            "OwnerConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_commingled_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_duplicate_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_system_generated_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_asn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_po": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_print_lpn_on_receive": {
                  "type": "boolean"
                },
                "carton_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "confirm_empty_on_move": {
                  "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
                  "type": "boolean"
                },
                "cube_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "damage_major_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_minor_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_total_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "default_allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_discard_loc": {
                  "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_inventory_tracking_granularity": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_receiving_loc": {
                  "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_returns_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_rtv_loc": {
                  "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_sku_rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dimension_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hide_expected_qty_from_operator": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lpn_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_rollback_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_start_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_lpn_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_reservation_ttl_min": {
                  "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "roll_receipt": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "rtv_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shelf_life_warning_multiplier_pct": {
                  "format": "int32",
                  "type": "integer"
                },
                "track_inventory_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "write_off_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_print_lpn_on_receive",
                "confirm_empty_on_move",
                "damage_major_action",
                "damage_minor_action",
                "damage_total_action",
                "hide_expected_qty_from_operator",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "shelf_life_warning_multiplier_pct"
              ],
              "type": "object"
            },
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "addresses": {
              "items": {
                "$ref": "#/definitions/OwnerAddress"
              },
              "type": "array"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OwnerConfig"
                },
                {
                  "type": "null"
                }
              ]
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "addresses",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "OwnerFull",
          "type": "object"
        }
      },
      "summary": "Update owner with addresses and config in one call",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5e4a536b93a55d8614902eb88ccfe6b8f5ee2dfe82ec984b32ad8cc38b5a78ed",
      "x-quark-response-schema-hash": "sha256:a05bb0c04ce7e84b0c634a9b7d58bb8c35d93f9f850611a09bf4f214e56d757b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Owner": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "company": {
                  "type": "string"
                },
                "credit_limit": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "currency_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "locale": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_type": {
                  "$ref": "#/definitions/OwnerType"
                },
                "parent_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "picking_toloc": {
                  "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "timezone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vat": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "company",
                "id",
                "mod_when",
                "mod_who",
                "owner_type"
              ],
              "type": "object"
            },
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Owner"
          },
          "title": "Array_of_Owner",
          "type": "array"
        }
      },
      "summary": "List owner — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:707dd016a073c7f39c9b20fd8f9137d2519fd668b80cb4606fd82c7c1c1ae370",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "company": {
                "type": "string"
              },
              "credit_limit": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "currency_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "locale": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_type": {
                "enum": [
                  "Sup",
                  "Cus",
                  "Trn",
                  "Rec",
                  "Con",
                  "Own",
                  "Man",
                  "Dst",
                  "Vnd",
                  "Brk"
                ],
                "type": "string"
              },
              "parent_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "picking_toloc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timezone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vat": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "OwnerUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "Owner",
          "type": "object"
        }
      },
      "summary": "Update owner master data with explicit keep, clear and set semantics.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a2e706372b560be50545aac3afae584b5a1ab3c4b32776cf8be826d5e4be0d4d",
      "x-quark-response-schema-hash": "sha256:599a5343de5e4b20d1c670f9e19f66c6b3259320336802969e9472a513fcc624",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerType": {
              "enum": [
                "Sup",
                "Cus",
                "Trn",
                "Rec",
                "Con",
                "Own",
                "Man",
                "Dst",
                "Vnd",
                "Brk"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "company": {
              "type": "string"
            },
            "credit_limit": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "currency_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "locale": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_type": {
              "$ref": "#/definitions/OwnerType"
            },
            "parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "picking_toloc": {
              "description": "Delivery location of this owner's orders for a pick carrier (ADR-091).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": [
                "string",
                "null"
              ]
            },
            "timezone": {
              "type": [
                "string",
                "null"
              ]
            },
            "vat": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "company",
            "id",
            "mod_when",
            "mod_who",
            "owner_type"
          ],
          "title": "Owner",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced owner and its owned master-data subresources.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:599a5343de5e4b20d1c670f9e19f66c6b3259320336802969e9472a513fcc624",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_owner",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count owner — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "search_owners",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "description": "1-indexed page number. Default 1.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "page_size": {
                "description": "Page size. Default 50, capped at 200.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "q": {
                "description": "Optional substring matched against `code` and `company` with ILIKE. `None` (or empty) returns the recent-owners window (LIMIT page_size).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "SearchOwnersInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerSummary": {
              "description": "Compact owner row shape for the picker — id is what the widget writes back into `display.owner_id`, `code` / `company` are what the operator sees in the overlay. Mirrors the `AsnHeader` pattern from `lookup_asn` / `search_asns` so rf-go's `lookupValues` parser handles both endpoints identically.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "company": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "company",
                "id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OwnerSummary"
          },
          "title": "Array_of_OwnerSummary",
          "type": "array"
        }
      },
      "summary": "Substring search of owners (owner_type='Own' only); used by the RCBLIND01 F2 picker",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "owner",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7b6a86af20e2d05e2943175e9418716c1489c16798d99c41ebce2bf186986da2",
      "x-quark-response-schema-hash": "sha256:e88c41507476f61b5937bf42ce680777e043ffbb28b4f1ba0b8f1531e8e07919",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_owner_address",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "address1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address3": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address4": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_type": {
                "type": "string"
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_default": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "iso_country_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "phone1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address_type",
              "owner_id"
            ],
            "title": "OwnerAddressForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "address1": {
              "type": [
                "string",
                "null"
              ]
            },
            "address2": {
              "type": [
                "string",
                "null"
              ]
            },
            "address3": {
              "type": [
                "string",
                "null"
              ]
            },
            "address4": {
              "type": [
                "string",
                "null"
              ]
            },
            "address_type": {
              "type": "string"
            },
            "city": {
              "type": [
                "string",
                "null"
              ]
            },
            "company": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact1": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact2": {
              "type": [
                "string",
                "null"
              ]
            },
            "country": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "iso_country_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "phone1": {
              "type": [
                "string",
                "null"
              ]
            },
            "phone2": {
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            },
            "zip": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "address_type",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerAddress",
          "type": "object"
        }
      },
      "summary": "Create a new owner_address — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_address",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:96b07d408d62b02781ba9050d0b8ff412ebd527844f324e176c444bba069eacf",
      "x-quark-response-schema-hash": "sha256:4c440e0c3b5145b0394996f4734394846f169ecffd959a4728b8078fa0b05f1c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner_address",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "address1": {
              "type": [
                "string",
                "null"
              ]
            },
            "address2": {
              "type": [
                "string",
                "null"
              ]
            },
            "address3": {
              "type": [
                "string",
                "null"
              ]
            },
            "address4": {
              "type": [
                "string",
                "null"
              ]
            },
            "address_type": {
              "type": "string"
            },
            "city": {
              "type": [
                "string",
                "null"
              ]
            },
            "company": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact1": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact2": {
              "type": [
                "string",
                "null"
              ]
            },
            "country": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "iso_country_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "phone1": {
              "type": [
                "string",
                "null"
              ]
            },
            "phone2": {
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            },
            "zip": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "address_type",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerAddress",
          "type": "object"
        }
      },
      "summary": "Get a owner_address by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_address",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:4c440e0c3b5145b0394996f4734394846f169ecffd959a4728b8078fa0b05f1c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_owner_address",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerAddress": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "address1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address3": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address4": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "address_type": {
                  "type": "string"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contact2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_default": {
                  "type": "boolean"
                },
                "iso_country_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "phone1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "state": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "zip": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "address_type",
                "id",
                "is_default",
                "mod_when",
                "mod_who",
                "owner_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OwnerAddress"
          },
          "title": "Array_of_OwnerAddress",
          "type": "array"
        }
      },
      "summary": "List owner_address — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_address",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:e32d5cfed8644039b3e23ab4fc3383e9607428b227d227904e62dbcff808f573",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_owner_address",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "address1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address3": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address4": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_type": {
                "type": "string"
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "contact2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_default": {
                "type": "boolean"
              },
              "iso_country_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "OwnerAddressUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "address1": {
              "type": [
                "string",
                "null"
              ]
            },
            "address2": {
              "type": [
                "string",
                "null"
              ]
            },
            "address3": {
              "type": [
                "string",
                "null"
              ]
            },
            "address4": {
              "type": [
                "string",
                "null"
              ]
            },
            "address_type": {
              "type": "string"
            },
            "city": {
              "type": [
                "string",
                "null"
              ]
            },
            "company": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact1": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact2": {
              "type": [
                "string",
                "null"
              ]
            },
            "country": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "iso_country_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "phone1": {
              "type": [
                "string",
                "null"
              ]
            },
            "phone2": {
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            },
            "zip": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "address_type",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerAddress",
          "type": "object"
        }
      },
      "summary": "Update an owner address without changing its owner identity.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_address",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2c26fc3be7b267904582503dec00c32ab77436b645c925fbacaee2a926e65559",
      "x-quark-response-schema-hash": "sha256:4c440e0c3b5145b0394996f4734394846f169ecffd959a4728b8078fa0b05f1c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_owner_address",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "address1": {
              "type": [
                "string",
                "null"
              ]
            },
            "address2": {
              "type": [
                "string",
                "null"
              ]
            },
            "address3": {
              "type": [
                "string",
                "null"
              ]
            },
            "address4": {
              "type": [
                "string",
                "null"
              ]
            },
            "address_type": {
              "type": "string"
            },
            "city": {
              "type": [
                "string",
                "null"
              ]
            },
            "company": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact1": {
              "type": [
                "string",
                "null"
              ]
            },
            "contact2": {
              "type": [
                "string",
                "null"
              ]
            },
            "country": {
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_default": {
              "type": "boolean"
            },
            "iso_country_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "phone1": {
              "type": [
                "string",
                "null"
              ]
            },
            "phone2": {
              "type": [
                "string",
                "null"
              ]
            },
            "state": {
              "type": [
                "string",
                "null"
              ]
            },
            "zip": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "address_type",
            "id",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerAddress",
          "type": "object"
        }
      },
      "summary": "Delete a owner_address by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_address",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:4c440e0c3b5145b0394996f4734394846f169ecffd959a4728b8078fa0b05f1c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_owner_address",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count owner_address — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_address",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "account": {
                "type": "string"
              },
              "bank_name": {
                "type": "string"
              },
              "bic": {
                "type": "string"
              },
              "corr_account": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "is_default": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "account",
              "bank_name",
              "bic",
              "owner_id"
            ],
            "title": "OwnerBankAccountForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "account": {
              "type": "string"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "bank_name": {
              "type": "string"
            },
            "bic": {
              "type": "string"
            },
            "corr_account": {
              "type": [
                "string",
                "null"
              ]
            },
            "currency": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "account",
            "add_when",
            "add_who",
            "bank_name",
            "bic",
            "currency",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerBankAccount",
          "type": "object"
        }
      },
      "summary": "Create a new owner_bank_account — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:37346fcfbf27b8a26aa32a4330dcfc53f4bc43c0bde7826fb9b40ef27990ee7c",
      "x-quark-response-schema-hash": "sha256:0d4a56e11eb11f1047e91f5db242e25e683c286ba4d1e2834544d092fffddd48",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "account": {
              "type": "string"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "bank_name": {
              "type": "string"
            },
            "bic": {
              "type": "string"
            },
            "corr_account": {
              "type": [
                "string",
                "null"
              ]
            },
            "currency": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "account",
            "add_when",
            "add_who",
            "bank_name",
            "bic",
            "currency",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerBankAccount",
          "type": "object"
        }
      },
      "summary": "Get a owner_bank_account by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:0d4a56e11eb11f1047e91f5db242e25e683c286ba4d1e2834544d092fffddd48",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OwnerBankAccount": {
              "properties": {
                "account": {
                  "type": "string"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "bank_name": {
                  "type": "string"
                },
                "bic": {
                  "type": "string"
                },
                "corr_account": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "currency": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_default": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "account",
                "add_when",
                "add_who",
                "bank_name",
                "bic",
                "currency",
                "id",
                "is_active",
                "is_default",
                "mod_when",
                "mod_who",
                "owner_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OwnerBankAccount"
          },
          "title": "Array_of_OwnerBankAccount",
          "type": "array"
        }
      },
      "summary": "List owner_bank_account — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:1c87b6f02a245e4b0b3fb03f44e1473e8f8b9ac85359435c73f6fca2f09c1d0a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "account": {
                "type": "string"
              },
              "bank_name": {
                "type": "string"
              },
              "bic": {
                "type": "string"
              },
              "corr_account": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "is_default": {
                "type": "boolean"
              }
            },
            "title": "OwnerBankAccountUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "account": {
              "type": "string"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "bank_name": {
              "type": "string"
            },
            "bic": {
              "type": "string"
            },
            "corr_account": {
              "type": [
                "string",
                "null"
              ]
            },
            "currency": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "account",
            "add_when",
            "add_who",
            "bank_name",
            "bic",
            "currency",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerBankAccount",
          "type": "object"
        }
      },
      "summary": "Update an owner bank account without changing its owner identity.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:34a4371c36094db7835ebd2f9aaeefd02809d269b5bad2a4abb198cb406dc1e0",
      "x-quark-response-schema-hash": "sha256:0d4a56e11eb11f1047e91f5db242e25e683c286ba4d1e2834544d092fffddd48",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "account": {
              "type": "string"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "bank_name": {
              "type": "string"
            },
            "bic": {
              "type": "string"
            },
            "corr_account": {
              "type": [
                "string",
                "null"
              ]
            },
            "currency": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "account",
            "add_when",
            "add_who",
            "bank_name",
            "bic",
            "currency",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "owner_id"
          ],
          "title": "OwnerBankAccount",
          "type": "object"
        }
      },
      "summary": "Delete a owner_bank_account by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:0d4a56e11eb11f1047e91f5db242e25e683c286ba4d1e2834544d092fffddd48",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple owner_bank_account by IDs — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_owner_bank_account",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count owner_bank_account — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_bank_account",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_owner_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageAction": {
                "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                "enum": [
                  "None",
                  "Hold",
                  "Reject",
                  "WriteOff",
                  "RTV",
                  "Repurpose",
                  "Destroy"
                ],
                "type": "string"
              },
              "SkuRotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              }
            },
            "properties": {
              "allow_commingled_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_duplicate_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_mixed_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_system_generated_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_close_asn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_close_po": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_print_lpn_on_receive": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "carton_group": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "confirm_empty_on_move": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "cube_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "damage_major_action": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "damage_minor_action": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "damage_total_action": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_allocation_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_cartonization_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_discard_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_lot_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_putaway_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_qc_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_receipt_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_receiving_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_replenishment_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_returns_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_rtv_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_sku_rotation": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuRotation"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dimension_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hide_expected_qty_from_operator": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "lpn_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "lpn_rollback_number": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "lpn_start_number": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_lpn_number": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "pick_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "putaway_reservation_ttl_min": {
                "description": "Blank on the form means NULL means inherit — see [`OwnerConfig`].",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "roll_receipt": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "rtv_gl_account_hint": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shelf_life_warning_multiplier_pct": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "track_inventory_by": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "weight_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "write_off_gl_account_hint": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "owner_id"
            ],
            "title": "OwnerConfigForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_commingled_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_duplicate_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_mixed_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_system_generated_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_close_asn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_close_po": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_lpn_on_receive": {
              "type": "boolean"
            },
            "carton_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "confirm_empty_on_move": {
              "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
              "type": "boolean"
            },
            "cube_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "damage_major_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_minor_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_total_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "default_allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_discard_loc": {
              "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_inventory_tracking_granularity": {
              "anyOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_receiving_loc": {
              "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_returns_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_rtv_loc": {
              "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_sku_rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dimension_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "hide_expected_qty_from_operator": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lpn_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "lpn_rollback_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "lpn_start_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "next_lpn_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_reservation_ttl_min": {
              "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "roll_receipt": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "rtv_gl_account_hint": {
              "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
              "type": [
                "string",
                "null"
              ]
            },
            "shelf_life_warning_multiplier_pct": {
              "format": "int32",
              "type": "integer"
            },
            "track_inventory_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "write_off_gl_account_hint": {
              "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_print_lpn_on_receive",
            "confirm_empty_on_move",
            "damage_major_action",
            "damage_minor_action",
            "damage_total_action",
            "hide_expected_qty_from_operator",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "shelf_life_warning_multiplier_pct"
          ],
          "title": "OwnerConfig",
          "type": "object"
        }
      },
      "summary": "Create the optional configuration owned by one owner.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "owner_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a437e58e2d226bf0c621aa160644487e4f5c4a4c31561b0c99d55a6ce587e604",
      "x-quark-response-schema-hash": "sha256:ffc06ec8ab32f88dbb78e451fd7a3104b677a5ab2b9efeac5b38a4658e9e2ea3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_commingled_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_duplicate_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_mixed_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_system_generated_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_close_asn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_close_po": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_lpn_on_receive": {
              "type": "boolean"
            },
            "carton_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "confirm_empty_on_move": {
              "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
              "type": "boolean"
            },
            "cube_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "damage_major_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_minor_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_total_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "default_allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_discard_loc": {
              "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_inventory_tracking_granularity": {
              "anyOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_receiving_loc": {
              "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_returns_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_rtv_loc": {
              "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_sku_rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dimension_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "hide_expected_qty_from_operator": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lpn_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "lpn_rollback_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "lpn_start_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "next_lpn_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_reservation_ttl_min": {
              "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "roll_receipt": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "rtv_gl_account_hint": {
              "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
              "type": [
                "string",
                "null"
              ]
            },
            "shelf_life_warning_multiplier_pct": {
              "format": "int32",
              "type": "integer"
            },
            "track_inventory_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "write_off_gl_account_hint": {
              "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_print_lpn_on_receive",
            "confirm_empty_on_move",
            "damage_major_action",
            "damage_minor_action",
            "damage_total_action",
            "hide_expected_qty_from_operator",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "shelf_life_warning_multiplier_pct"
          ],
          "title": "OwnerConfig",
          "type": "object"
        }
      },
      "summary": "Get a owner_config by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ffc06ec8ab32f88dbb78e451fd7a3104b677a5ab2b9efeac5b38a4658e9e2ea3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_owner_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "OwnerConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_commingled_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_duplicate_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_system_generated_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_asn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_close_po": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_print_lpn_on_receive": {
                  "type": "boolean"
                },
                "carton_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "confirm_empty_on_move": {
                  "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
                  "type": "boolean"
                },
                "cube_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "damage_major_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_minor_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_total_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "default_allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_discard_loc": {
                  "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_inventory_tracking_granularity": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_receiving_loc": {
                  "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "default_returns_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_rtv_loc": {
                  "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_sku_rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dimension_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hide_expected_qty_from_operator": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lpn_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_rollback_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "lpn_start_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_lpn_number": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_reservation_ttl_min": {
                  "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "roll_receipt": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "rtv_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shelf_life_warning_multiplier_pct": {
                  "format": "int32",
                  "type": "integer"
                },
                "track_inventory_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "write_off_gl_account_hint": {
                  "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_print_lpn_on_receive",
                "confirm_empty_on_move",
                "damage_major_action",
                "damage_minor_action",
                "damage_total_action",
                "hide_expected_qty_from_operator",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "shelf_life_warning_multiplier_pct"
              ],
              "type": "object"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/OwnerConfig"
          },
          "title": "Array_of_OwnerConfig",
          "type": "array"
        }
      },
      "summary": "List owner_config — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:10177baf237663e746fb5b4333e59e9960a304c023b7381ddc4747d5d2f1a2b0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_owner_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AllowError": {
                "enum": [
                  "Allow",
                  "HardError",
                  "Warning"
                ],
                "type": "string"
              },
              "InventoryTrackingGranularity": {
                "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
                "enum": [
                  "Aggregate",
                  "Pallet",
                  "Case"
                ],
                "type": "string"
              },
              "SkuRotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              }
            },
            "properties": {
              "allow_commingled_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_duplicate_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_mixed_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_system_generated_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_close_asn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_close_po": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_print_lpn_on_receive": {
                "type": "boolean"
              },
              "carton_group": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "confirm_empty_on_move": {
                "type": "boolean"
              },
              "cube_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "damage_major_action": {
                "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                "enum": [
                  "None",
                  "Hold",
                  "Reject",
                  "WriteOff",
                  "RTV",
                  "Repurpose",
                  "Destroy"
                ],
                "type": "string"
              },
              "damage_minor_action": {
                "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                "enum": [
                  "None",
                  "Hold",
                  "Reject",
                  "WriteOff",
                  "RTV",
                  "Repurpose",
                  "Destroy"
                ],
                "type": "string"
              },
              "damage_total_action": {
                "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
                "enum": [
                  "None",
                  "Hold",
                  "Reject",
                  "WriteOff",
                  "RTV",
                  "Repurpose",
                  "Destroy"
                ],
                "type": "string"
              },
              "default_allocation_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_cartonization_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_discard_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_inventory_tracking_granularity": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryTrackingGranularity"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_lot_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_putaway_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_qc_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_receipt_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_receiving_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_replenishment_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "default_returns_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_rtv_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_sku_rotation": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuRotation"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_unplanned_case_on_asn": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AllowError"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dimension_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hide_expected_qty_from_operator": {
                "type": "boolean"
              },
              "lpn_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "lpn_rollback_number": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "lpn_start_number": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "next_lpn_number": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pick_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "putaway_reservation_ttl_min": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "roll_receipt": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "rtv_gl_account_hint": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shelf_life_warning_multiplier_pct": {
                "format": "int32",
                "type": "integer"
              },
              "track_inventory_by": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "weight_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "write_off_gl_account_hint": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "OwnerConfigUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_commingled_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_duplicate_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_mixed_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_system_generated_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_close_asn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_close_po": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_lpn_on_receive": {
              "type": "boolean"
            },
            "carton_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "confirm_empty_on_move": {
              "description": "Count spec Appendix L (wms-app 116): a manual move that takes the last stock of this owner out of its source location asks the operator whether the location is empty.",
              "type": "boolean"
            },
            "cube_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "damage_major_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_minor_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_total_action": {
              "$ref": "#/definitions/DamageAction"
            },
            "default_allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_discard_loc": {
              "description": "E.2 (migration 162). Discard-condition returns deposit destination. NULL → write-off without deposit (current behavior, no inventory row); set → deposit through DepositService into this loc.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_inventory_tracking_granularity": {
              "anyOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_receiving_loc": {
              "description": "Миграция 350. Ячейка, которую окно приёмки подставляет по умолчанию. NULL = не задана: оператор выбирает сам, как выбирал до 350.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "default_returns_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_rtv_loc": {
              "description": "T-062 (migration 148). Falls back to `default_returns_loc` when NULL; if both NULL, MoveDamageToRtv returns NoRtvLocConfigured error.",
              "type": [
                "string",
                "null"
              ]
            },
            "default_sku_rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ]
            },
            "dimension_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "hide_expected_qty_from_operator": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lpn_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "lpn_rollback_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "lpn_start_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "next_lpn_number": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_reservation_ttl_min": {
              "description": "Minutes a directed-putaway location reservation (`inventory_pending_move_in`) is held for this owner's stock before the TTL sweeper releases it.\n\n`None` is not \"no TTL\": it means INHERIT, and `PendingMoveInBmc::resolve_ttl_minutes` falls through to the `system_settings` key `PUTAWAY_RESERVATION_TTL_MIN`. Owner-level because the number is really a walking distance — a deep warehouse needs a longer hold than a two-aisle one.\n\n`chk_owner_config_putaway_ttl` forbids 0 and negatives: a reservation born already expired is not a short hold, it is an insert that always fails (`chk_inventory_pending_move_in_expiry_after_add`).",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "roll_receipt": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "rtv_gl_account_hint": {
              "description": "T-062 (migration 148). ERP GL account hint passed in `damage.rtv_initiated` outbox event (e.g. SAP `1450-RTV-Receivable`).",
              "type": [
                "string",
                "null"
              ]
            },
            "shelf_life_warning_multiplier_pct": {
              "format": "int32",
              "type": "integer"
            },
            "track_inventory_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "weight_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "write_off_gl_account_hint": {
              "description": "T-062 (migration 148). ERP GL account hint passed in `damage.written_off` outbox event. ERP may use directly or map through its own table.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_print_lpn_on_receive",
            "confirm_empty_on_move",
            "damage_major_action",
            "damage_minor_action",
            "damage_total_action",
            "hide_expected_qty_from_operator",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "shelf_life_warning_multiplier_pct"
          ],
          "title": "OwnerConfig",
          "type": "object"
        }
      },
      "summary": "Update owner configuration with explicit keep, clear and set semantics.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:240a87eebfe2aff375e56d16a4252479d0a7e565aaea076d2f0e7d396e9c56bc",
      "x-quark-response-schema-hash": "sha256:ffc06ec8ab32f88dbb78e451fd7a3104b677a5ab2b9efeac5b38a4658e9e2ea3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_owner_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count owner_config — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "owner_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_putawayzone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "auto_print_addr_label": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "auto_print_carton_label": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_label_printer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_report_printer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inbound_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_cases_count": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "min_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "missing_toloc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "outbound_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "picking_toloc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "replenishment_allowed": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "replenishment_threshold": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "rf_pick_strategy": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "PutawayZoneForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_print_addr_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_carton_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "default_label_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_report_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inbound_loc": {
              "type": "string"
            },
            "max_cases_count": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_temperature": {
              "description": "Warmest temperature this zone holds. `None` = no constraint.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_temperature": {
              "description": "Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "missing_toloc": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "outbound_loc": {
              "type": "string"
            },
            "picking_toloc": {
              "type": "string"
            },
            "replenishment_allowed": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "replenishment_threshold": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "rf_pick_strategy": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "color",
            "description",
            "id",
            "inbound_loc",
            "missing_toloc",
            "mod_when",
            "mod_who",
            "outbound_loc",
            "picking_toloc"
          ],
          "title": "PutawayZone",
          "type": "object"
        }
      },
      "summary": "Create a new putawayzone — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c01e3727893a2b5e44ae382a09ff84ab82b9757aaf3721b1e0e5b47941c4d3bf",
      "x-quark-response-schema-hash": "sha256:5584c7bed88c38f6f2cde1d923190571aab64eca43a417f63d55f2417125966c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_putawayzone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_print_addr_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_carton_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "default_label_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_report_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inbound_loc": {
              "type": "string"
            },
            "max_cases_count": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_temperature": {
              "description": "Warmest temperature this zone holds. `None` = no constraint.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_temperature": {
              "description": "Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "missing_toloc": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "outbound_loc": {
              "type": "string"
            },
            "picking_toloc": {
              "type": "string"
            },
            "replenishment_allowed": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "replenishment_threshold": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "rf_pick_strategy": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "color",
            "description",
            "id",
            "inbound_loc",
            "missing_toloc",
            "mod_when",
            "mod_who",
            "outbound_loc",
            "picking_toloc"
          ],
          "title": "PutawayZone",
          "type": "object"
        }
      },
      "summary": "Get a putawayzone by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5584c7bed88c38f6f2cde1d923190571aab64eca43a417f63d55f2417125966c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_putawayzone_by_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "code",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_print_addr_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_carton_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "default_label_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_report_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inbound_loc": {
              "type": "string"
            },
            "max_cases_count": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_temperature": {
              "description": "Warmest temperature this zone holds. `None` = no constraint.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_temperature": {
              "description": "Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "missing_toloc": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "outbound_loc": {
              "type": "string"
            },
            "picking_toloc": {
              "type": "string"
            },
            "replenishment_allowed": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "replenishment_threshold": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "rf_pick_strategy": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "color",
            "description",
            "id",
            "inbound_loc",
            "missing_toloc",
            "mod_when",
            "mod_who",
            "outbound_loc",
            "picking_toloc"
          ],
          "title": "PutawayZone",
          "type": "object"
        }
      },
      "summary": "Get putaway zone by code (varchar PK)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5a1f1e3c655c96619b770c8f60805b257249fb36ee74d036e5ee30fa27afd8da",
      "x-quark-response-schema-hash": "sha256:5584c7bed88c38f6f2cde1d923190571aab64eca43a417f63d55f2417125966c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_putawayzone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PutawayZone": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_print_addr_label": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "auto_print_carton_label": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                },
                "default_label_printer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_report_printer": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inbound_loc": {
                  "type": "string"
                },
                "max_cases_count": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_temperature": {
                  "description": "Warmest temperature this zone holds. `None` = no constraint.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_temperature": {
                  "description": "Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "missing_toloc": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_loc": {
                  "type": "string"
                },
                "picking_toloc": {
                  "type": "string"
                },
                "replenishment_allowed": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "replenishment_threshold": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "rf_pick_strategy": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "color",
                "description",
                "id",
                "inbound_loc",
                "missing_toloc",
                "mod_when",
                "mod_who",
                "outbound_loc",
                "picking_toloc"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PutawayZone"
          },
          "title": "Array_of_PutawayZone",
          "type": "array"
        }
      },
      "summary": "List putawayzone — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:eccd8a12021ac0414ae2e994097ea0c7f28942c7e9da88efde96d13eb3a01f97",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_putawayzone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count putawayzone — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_putawayzone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "auto_print_addr_label": {
                "type": "boolean"
              },
              "auto_print_carton_label": {
                "type": "boolean"
              },
              "color": {
                "type": "string"
              },
              "default_label_printer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_report_printer": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": "string"
              },
              "inbound_loc": {
                "type": "string"
              },
              "max_cases_count": {
                "format": "double",
                "type": "number"
              },
              "max_cube": {
                "format": "double",
                "type": "number"
              },
              "max_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight": {
                "format": "double",
                "type": "number"
              },
              "min_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "missing_toloc": {
                "type": "string"
              },
              "outbound_loc": {
                "type": "string"
              },
              "picking_toloc": {
                "type": "string"
              },
              "replenishment_allowed": {
                "type": "boolean"
              },
              "replenishment_threshold": {
                "format": "int32",
                "type": "integer"
              },
              "rf_pick_strategy": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "PutawayZoneUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_print_addr_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_carton_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "default_label_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_report_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inbound_loc": {
              "type": "string"
            },
            "max_cases_count": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_temperature": {
              "description": "Warmest temperature this zone holds. `None` = no constraint.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_temperature": {
              "description": "Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "missing_toloc": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "outbound_loc": {
              "type": "string"
            },
            "picking_toloc": {
              "type": "string"
            },
            "replenishment_allowed": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "replenishment_threshold": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "rf_pick_strategy": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "color",
            "description",
            "id",
            "inbound_loc",
            "missing_toloc",
            "mod_when",
            "mod_who",
            "outbound_loc",
            "picking_toloc"
          ],
          "title": "PutawayZone",
          "type": "object"
        }
      },
      "summary": "Update putaway-zone settings without changing its stable code.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:06ebbc6bd10bf15743327b6d3a22c73671b7263d2cfc6f25667c336af1f9d126",
      "x-quark-response-schema-hash": "sha256:5584c7bed88c38f6f2cde1d923190571aab64eca43a417f63d55f2417125966c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_putawayzone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_print_addr_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "auto_print_carton_label": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "default_label_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "default_report_printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inbound_loc": {
              "type": "string"
            },
            "max_cases_count": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_temperature": {
              "description": "Warmest temperature this zone holds. `None` = no constraint.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_temperature": {
              "description": "Coldest temperature this zone holds. `None` = no constraint — see migration 211: filled in for a handful of zones, never for thousands of locations, which is why the range lives here and not on `location`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "missing_toloc": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "outbound_loc": {
              "type": "string"
            },
            "picking_toloc": {
              "type": "string"
            },
            "replenishment_allowed": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "replenishment_threshold": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "rf_pick_strategy": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "color",
            "description",
            "id",
            "inbound_loc",
            "missing_toloc",
            "mod_when",
            "mod_who",
            "outbound_loc",
            "picking_toloc"
          ],
          "title": "PutawayZone",
          "type": "object"
        }
      },
      "summary": "Delete a putawayzone by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5584c7bed88c38f6f2cde1d923190571aab64eca43a417f63d55f2417125966c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_loc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "LocCategory": {
                "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "NoPalletization",
                  "Asrs",
                  "CantileverRack",
                  "CartonFlow",
                  "DenseStorage",
                  "DoubleDeepRack",
                  "DriveInRack",
                  "DriveThroughRack",
                  "HorizontalCarousel",
                  "Other",
                  "PalletFlowRack",
                  "PalletCarousel",
                  "PushBackRack",
                  "SelectiveShelving",
                  "ShelvingStorage",
                  "WorkCenter"
                ],
                "type": "string"
              },
              "LocFlag": {
                "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
                "enum": [
                  "None",
                  "CycleCountActive",
                  "SanitationActive",
                  "MaintenanceActive",
                  "ReceivingHoldoff"
                ],
                "type": "string"
              },
              "LocProcessingType": {
                "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "Pallet",
                  "Case",
                  "Piece"
                ],
                "type": "string"
              },
              "LocStatus": {
                "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "Ok",
                  "Hold",
                  "Damage"
                ],
                "type": "string"
              },
              "LocType": {
                "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
                "oneOf": [
                  {
                    "enum": [
                      "None",
                      "Other",
                      "Case",
                      "Pick",
                      "Pnd",
                      "Door",
                      "Pickto",
                      "Sort",
                      "SpeedPick",
                      "QC",
                      "Damage",
                      "Rtv",
                      "Destroy",
                      "Returns",
                      "Stage",
                      "Lost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                    "enum": [
                      "InTransit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                    "enum": [
                      "Pack"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                    "enum": [
                      "Consolidation"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "abc": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AbcRotationSpeed"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "aisle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bay": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "check_digit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "discard_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "footprint": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "level": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "loc_category": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocCategory"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_flag": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocFlag"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_processing_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocProcessingType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "max_cube_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_qty_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "mix_lot": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "mix_sku": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "putawayzone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "route_sequence": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "section": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stack_limit": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocStatus"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "x_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "y_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "z_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "LocForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Basic location model description CRUDs",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": "string"
            },
            "bay": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "discard_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "footprint": {
              "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
              "format": "int16",
              "type": "integer"
            },
            "height": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "length": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "level": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "loc_category": {
              "$ref": "#/definitions/LocCategory"
            },
            "loc_flag": {
              "$ref": "#/definitions/LocFlag"
            },
            "loc_processing_type": {
              "$ref": "#/definitions/LocProcessingType"
            },
            "loc_type": {
              "$ref": "#/definitions/LocType"
            },
            "max_cube_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_qty_capacity": {
              "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
              "format": "double",
              "type": "number"
            },
            "max_weight_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mix_lot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mix_sku": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "section": {
              "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "format": "int16",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/LocStatus"
            },
            "width": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "x_coord": {
              "format": "double",
              "type": "number"
            },
            "y_coord": {
              "format": "double",
              "type": "number"
            },
            "z_coord": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "aisle",
            "bay",
            "code",
            "footprint",
            "id",
            "loc_category",
            "loc_flag",
            "loc_processing_type",
            "loc_type",
            "max_qty_capacity",
            "mod_when",
            "mod_who",
            "putawayzone",
            "stack_limit",
            "status",
            "x_coord",
            "y_coord",
            "z_coord"
          ],
          "title": "Loc",
          "type": "object"
        }
      },
      "summary": "Create a location (auto check-digit)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:dd09a3973cc7c9532b4541a3f24e9f15eab878dd2908aad8253250674d5c2a42",
      "x-quark-response-schema-hash": "sha256:98032bfd4df5b86a7fa95db448432336bdc03d440651483950ceef9b387442c1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_loc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Basic location model description CRUDs",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": "string"
            },
            "bay": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "discard_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "footprint": {
              "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
              "format": "int16",
              "type": "integer"
            },
            "height": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "length": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "level": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "loc_category": {
              "$ref": "#/definitions/LocCategory"
            },
            "loc_flag": {
              "$ref": "#/definitions/LocFlag"
            },
            "loc_processing_type": {
              "$ref": "#/definitions/LocProcessingType"
            },
            "loc_type": {
              "$ref": "#/definitions/LocType"
            },
            "max_cube_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_qty_capacity": {
              "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
              "format": "double",
              "type": "number"
            },
            "max_weight_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mix_lot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mix_sku": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "section": {
              "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "format": "int16",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/LocStatus"
            },
            "width": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "x_coord": {
              "format": "double",
              "type": "number"
            },
            "y_coord": {
              "format": "double",
              "type": "number"
            },
            "z_coord": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "aisle",
            "bay",
            "code",
            "footprint",
            "id",
            "loc_category",
            "loc_flag",
            "loc_processing_type",
            "loc_type",
            "max_qty_capacity",
            "mod_when",
            "mod_who",
            "putawayzone",
            "stack_limit",
            "status",
            "x_coord",
            "y_coord",
            "z_coord"
          ],
          "title": "Loc",
          "type": "object"
        }
      },
      "summary": "Get a location by ID",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:98032bfd4df5b86a7fa95db448432336bdc03d440651483950ceef9b387442c1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_loc_by_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "code",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Basic location model description CRUDs",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": "string"
            },
            "bay": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "discard_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "footprint": {
              "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
              "format": "int16",
              "type": "integer"
            },
            "height": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "length": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "level": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "loc_category": {
              "$ref": "#/definitions/LocCategory"
            },
            "loc_flag": {
              "$ref": "#/definitions/LocFlag"
            },
            "loc_processing_type": {
              "$ref": "#/definitions/LocProcessingType"
            },
            "loc_type": {
              "$ref": "#/definitions/LocType"
            },
            "max_cube_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_qty_capacity": {
              "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
              "format": "double",
              "type": "number"
            },
            "max_weight_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mix_lot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mix_sku": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "section": {
              "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "format": "int16",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/LocStatus"
            },
            "width": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "x_coord": {
              "format": "double",
              "type": "number"
            },
            "y_coord": {
              "format": "double",
              "type": "number"
            },
            "z_coord": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "aisle",
            "bay",
            "code",
            "footprint",
            "id",
            "loc_category",
            "loc_flag",
            "loc_processing_type",
            "loc_type",
            "max_qty_capacity",
            "mod_when",
            "mod_who",
            "putawayzone",
            "stack_limit",
            "status",
            "x_coord",
            "y_coord",
            "z_coord"
          ],
          "title": "Loc",
          "type": "object"
        }
      },
      "summary": "Get location by code (varchar PK)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5a1f1e3c655c96619b770c8f60805b257249fb36ee74d036e5ee30fa27afd8da",
      "x-quark-response-schema-hash": "sha256:98032bfd4df5b86a7fa95db448432336bdc03d440651483950ceef9b387442c1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_loc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "Loc": {
              "description": "Basic location model description CRUDs",
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "aisle": {
                  "type": "string"
                },
                "bay": {
                  "format": "int32",
                  "type": "integer"
                },
                "check_digit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "discard_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "footprint": {
                  "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
                  "format": "int16",
                  "type": "integer"
                },
                "height": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "length": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "level": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "loc_category": {
                  "$ref": "#/definitions/LocCategory"
                },
                "loc_flag": {
                  "$ref": "#/definitions/LocFlag"
                },
                "loc_processing_type": {
                  "$ref": "#/definitions/LocProcessingType"
                },
                "loc_type": {
                  "$ref": "#/definitions/LocType"
                },
                "max_cube_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_qty_capacity": {
                  "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
                  "format": "double",
                  "type": "number"
                },
                "max_weight_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mix_lot": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "mix_sku": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone": {
                  "type": "string"
                },
                "route_sequence": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "section": {
                  "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stack_limit": {
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/LocStatus"
                },
                "width": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "x_coord": {
                  "format": "double",
                  "type": "number"
                },
                "y_coord": {
                  "format": "double",
                  "type": "number"
                },
                "z_coord": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "aisle",
                "bay",
                "code",
                "footprint",
                "id",
                "loc_category",
                "loc_flag",
                "loc_processing_type",
                "loc_type",
                "max_qty_capacity",
                "mod_when",
                "mod_who",
                "putawayzone",
                "stack_limit",
                "status",
                "x_coord",
                "y_coord",
                "z_coord"
              ],
              "type": "object"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Loc"
          },
          "title": "Array_of_Loc",
          "type": "array"
        }
      },
      "summary": "List locations (filtered)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:2384cdf7d78eb649e4ab15936e55362495a14b09705c51685d24672c12d1a646",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_loc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "LocCategory": {
                "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "NoPalletization",
                  "Asrs",
                  "CantileverRack",
                  "CartonFlow",
                  "DenseStorage",
                  "DoubleDeepRack",
                  "DriveInRack",
                  "DriveThroughRack",
                  "HorizontalCarousel",
                  "Other",
                  "PalletFlowRack",
                  "PalletCarousel",
                  "PushBackRack",
                  "SelectiveShelving",
                  "ShelvingStorage",
                  "WorkCenter"
                ],
                "type": "string"
              },
              "LocFlag": {
                "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
                "enum": [
                  "None",
                  "CycleCountActive",
                  "SanitationActive",
                  "MaintenanceActive",
                  "ReceivingHoldoff"
                ],
                "type": "string"
              },
              "LocProcessingType": {
                "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "Pallet",
                  "Case",
                  "Piece"
                ],
                "type": "string"
              },
              "LocStatus": {
                "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "Ok",
                  "Hold",
                  "Damage"
                ],
                "type": "string"
              },
              "LocType": {
                "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
                "oneOf": [
                  {
                    "enum": [
                      "None",
                      "Other",
                      "Case",
                      "Pick",
                      "Pnd",
                      "Door",
                      "Pickto",
                      "Sort",
                      "SpeedPick",
                      "QC",
                      "Damage",
                      "Rtv",
                      "Destroy",
                      "Returns",
                      "Stage",
                      "Lost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                    "enum": [
                      "InTransit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                    "enum": [
                      "Pack"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                    "enum": [
                      "Consolidation"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "abc": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AbcRotationSpeed"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "aisle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bay": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "check_digit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "discard_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "footprint": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "level": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "loc_category": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocCategory"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_flag": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocFlag"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_processing_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocProcessingType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "max_cube_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_qty_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "mix_lot": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "mix_sku": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "putawayzone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "route_sequence": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "section": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stack_limit": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocStatus"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "x_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "y_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "z_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "title": "LocForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Basic location model description CRUDs",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": "string"
            },
            "bay": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "discard_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "footprint": {
              "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
              "format": "int16",
              "type": "integer"
            },
            "height": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "length": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "level": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "loc_category": {
              "$ref": "#/definitions/LocCategory"
            },
            "loc_flag": {
              "$ref": "#/definitions/LocFlag"
            },
            "loc_processing_type": {
              "$ref": "#/definitions/LocProcessingType"
            },
            "loc_type": {
              "$ref": "#/definitions/LocType"
            },
            "max_cube_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_qty_capacity": {
              "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
              "format": "double",
              "type": "number"
            },
            "max_weight_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mix_lot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mix_sku": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "section": {
              "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "format": "int16",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/LocStatus"
            },
            "width": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "x_coord": {
              "format": "double",
              "type": "number"
            },
            "y_coord": {
              "format": "double",
              "type": "number"
            },
            "z_coord": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "aisle",
            "bay",
            "code",
            "footprint",
            "id",
            "loc_category",
            "loc_flag",
            "loc_processing_type",
            "loc_type",
            "max_qty_capacity",
            "mod_when",
            "mod_who",
            "putawayzone",
            "stack_limit",
            "status",
            "x_coord",
            "y_coord",
            "z_coord"
          ],
          "title": "Loc",
          "type": "object"
        }
      },
      "summary": "Update a location; an explicit JSON null or a blank on section clears it back to NULL (its own section).",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8f49a6aaae26a31bd23d372653ec5ed539acda130cc728d83e8b0697789f41e8",
      "x-quark-response-schema-hash": "sha256:98032bfd4df5b86a7fa95db448432336bdc03d440651483950ceef9b387442c1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_loc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Basic location model description CRUDs",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": "string"
            },
            "bay": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "discard_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "footprint": {
              "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
              "format": "int16",
              "type": "integer"
            },
            "height": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "length": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "level": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "loc_category": {
              "$ref": "#/definitions/LocCategory"
            },
            "loc_flag": {
              "$ref": "#/definitions/LocFlag"
            },
            "loc_processing_type": {
              "$ref": "#/definitions/LocProcessingType"
            },
            "loc_type": {
              "$ref": "#/definitions/LocType"
            },
            "max_cube_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "max_qty_capacity": {
              "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
              "format": "double",
              "type": "number"
            },
            "max_weight_capacity": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mix_lot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mix_sku": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "section": {
              "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "format": "int16",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/LocStatus"
            },
            "width": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "x_coord": {
              "format": "double",
              "type": "number"
            },
            "y_coord": {
              "format": "double",
              "type": "number"
            },
            "z_coord": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "aisle",
            "bay",
            "code",
            "footprint",
            "id",
            "loc_category",
            "loc_flag",
            "loc_processing_type",
            "loc_type",
            "max_qty_capacity",
            "mod_when",
            "mod_who",
            "putawayzone",
            "stack_limit",
            "status",
            "x_coord",
            "y_coord",
            "z_coord"
          ],
          "title": "Loc",
          "type": "object"
        }
      },
      "summary": "Delete a location",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:98032bfd4df5b86a7fa95db448432336bdc03d440651483950ceef9b387442c1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_locs",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple locations by IDs",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "gen_locs",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "LocCategory": {
                "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "NoPalletization",
                  "Asrs",
                  "CantileverRack",
                  "CartonFlow",
                  "DenseStorage",
                  "DoubleDeepRack",
                  "DriveInRack",
                  "DriveThroughRack",
                  "HorizontalCarousel",
                  "Other",
                  "PalletFlowRack",
                  "PalletCarousel",
                  "PushBackRack",
                  "SelectiveShelving",
                  "ShelvingStorage",
                  "WorkCenter"
                ],
                "type": "string"
              },
              "LocFlag": {
                "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
                "enum": [
                  "None",
                  "CycleCountActive",
                  "SanitationActive",
                  "MaintenanceActive",
                  "ReceivingHoldoff"
                ],
                "type": "string"
              },
              "LocProcessingType": {
                "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "Pallet",
                  "Case",
                  "Piece"
                ],
                "type": "string"
              },
              "LocStatus": {
                "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "Ok",
                  "Hold",
                  "Damage"
                ],
                "type": "string"
              },
              "LocType": {
                "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
                "oneOf": [
                  {
                    "enum": [
                      "None",
                      "Other",
                      "Case",
                      "Pick",
                      "Pnd",
                      "Door",
                      "Pickto",
                      "Sort",
                      "SpeedPick",
                      "QC",
                      "Damage",
                      "Rtv",
                      "Destroy",
                      "Returns",
                      "Stage",
                      "Lost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                    "enum": [
                      "InTransit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                    "enum": [
                      "Pack"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                    "enum": [
                      "Consolidation"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LocationCodeGenRange": {
                "properties": {
                  "end": {
                    "format": "uint",
                    "minimum": 0.0,
                    "type": "integer"
                  },
                  "start": {
                    "format": "uint",
                    "minimum": 0.0,
                    "type": "integer"
                  }
                },
                "required": [
                  "end",
                  "start"
                ],
                "type": "object"
              },
              "LocationGeneratorAttributes": {
                "properties": {
                  "aisle_pfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "aisle_sfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "aisles": {
                    "$ref": "#/definitions/LocationCodeGenRange"
                  },
                  "level_pfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "level_sfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "levels": {
                    "$ref": "#/definitions/LocationCodeGenRange"
                  },
                  "loc_pfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "loc_sfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "locs": {
                    "$ref": "#/definitions/LocationCodeGenRange"
                  }
                },
                "required": [
                  "aisles",
                  "levels",
                  "locs"
                ],
                "type": "object"
              }
            },
            "description": "Backward-compatible generator wire data. Existing clients send only the flattened location fields; review clients also identify exclusions by CODE and the pattern they actually reviewed.",
            "properties": {
              "abc": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AbcRotationSpeed"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "aisle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bay": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "check_digit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "discard_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "exclude_codes": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "expected_pattern": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "footprint": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "generator_attributes": {
                "$ref": "#/definitions/LocationGeneratorAttributes"
              },
              "height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "loc_category": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocCategory"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_flag": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocFlag"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_processing_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocProcessingType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "max_cube_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_qty_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "mix_lot": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "mix_sku": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "putawayzone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "route_sequence": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "section": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stack_limit": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocStatus"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "x_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "y_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "z_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "generator_attributes"
            ],
            "title": "LocGenerationRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "Loc": {
              "description": "Basic location model description CRUDs",
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "aisle": {
                  "type": "string"
                },
                "bay": {
                  "format": "int32",
                  "type": "integer"
                },
                "check_digit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "discard_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "footprint": {
                  "description": "How many pallets stand on the floor here, and how high they stack. Their product is the location's capacity in PALLET POSITIONS — the only capacity a bulk bay really has. `0` on either means \"not configured\", the same reading the two capacities above get, and it is reported rather than treated as unlimited.",
                  "format": "int16",
                  "type": "integer"
                },
                "height": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "length": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "level": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "loc_category": {
                  "$ref": "#/definitions/LocCategory"
                },
                "loc_flag": {
                  "$ref": "#/definitions/LocFlag"
                },
                "loc_processing_type": {
                  "$ref": "#/definitions/LocProcessingType"
                },
                "loc_type": {
                  "$ref": "#/definitions/LocType"
                },
                "max_cube_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_qty_capacity": {
                  "description": "How much stock this location holds before it is full, in its own UOM. `0` = not configured, read the same way as the two capacities above.",
                  "format": "double",
                  "type": "number"
                },
                "max_weight_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mix_lot": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "mix_sku": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone": {
                  "type": "string"
                },
                "route_sequence": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "section": {
                  "description": "The run of positions this location belongs to — locations with no beam between them. `None` means it is its own section.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stack_limit": {
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/LocStatus"
                },
                "width": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "x_coord": {
                  "format": "double",
                  "type": "number"
                },
                "y_coord": {
                  "format": "double",
                  "type": "number"
                },
                "z_coord": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "aisle",
                "bay",
                "code",
                "footprint",
                "id",
                "loc_category",
                "loc_flag",
                "loc_processing_type",
                "loc_type",
                "max_qty_capacity",
                "mod_when",
                "mod_who",
                "putawayzone",
                "stack_limit",
                "status",
                "x_coord",
                "y_coord",
                "z_coord"
              ],
              "type": "object"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Loc"
          },
          "title": "Array_of_Loc",
          "type": "array"
        }
      },
      "summary": "Generate locations from a pattern (bulk create)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a33658232c33c2875c191b36bd81b1d9de2fcb8ca9ee761f38aeffe9b2f4233f",
      "x-quark-response-schema-hash": "sha256:2384cdf7d78eb649e4ab15936e55362495a14b09705c51685d24672c12d1a646",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "preview_gen_locs",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "LocCategory": {
                "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "NoPalletization",
                  "Asrs",
                  "CantileverRack",
                  "CartonFlow",
                  "DenseStorage",
                  "DoubleDeepRack",
                  "DriveInRack",
                  "DriveThroughRack",
                  "HorizontalCarousel",
                  "Other",
                  "PalletFlowRack",
                  "PalletCarousel",
                  "PushBackRack",
                  "SelectiveShelving",
                  "ShelvingStorage",
                  "WorkCenter"
                ],
                "type": "string"
              },
              "LocFlag": {
                "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
                "enum": [
                  "None",
                  "CycleCountActive",
                  "SanitationActive",
                  "MaintenanceActive",
                  "ReceivingHoldoff"
                ],
                "type": "string"
              },
              "LocProcessingType": {
                "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "None",
                  "Pallet",
                  "Case",
                  "Piece"
                ],
                "type": "string"
              },
              "LocStatus": {
                "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "Ok",
                  "Hold",
                  "Damage"
                ],
                "type": "string"
              },
              "LocType": {
                "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
                "oneOf": [
                  {
                    "enum": [
                      "None",
                      "Other",
                      "Case",
                      "Pick",
                      "Pnd",
                      "Door",
                      "Pickto",
                      "Sort",
                      "SpeedPick",
                      "QC",
                      "Damage",
                      "Rtv",
                      "Destroy",
                      "Returns",
                      "Stage",
                      "Lost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                    "enum": [
                      "InTransit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                    "enum": [
                      "Pack"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                    "enum": [
                      "Consolidation"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LocationCodeGenRange": {
                "properties": {
                  "end": {
                    "format": "uint",
                    "minimum": 0.0,
                    "type": "integer"
                  },
                  "start": {
                    "format": "uint",
                    "minimum": 0.0,
                    "type": "integer"
                  }
                },
                "required": [
                  "end",
                  "start"
                ],
                "type": "object"
              },
              "LocationGeneratorAttributes": {
                "properties": {
                  "aisle_pfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "aisle_sfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "aisles": {
                    "$ref": "#/definitions/LocationCodeGenRange"
                  },
                  "level_pfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "level_sfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "levels": {
                    "$ref": "#/definitions/LocationCodeGenRange"
                  },
                  "loc_pfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "loc_sfx": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "locs": {
                    "$ref": "#/definitions/LocationCodeGenRange"
                  }
                },
                "required": [
                  "aisles",
                  "levels",
                  "locs"
                ],
                "type": "object"
              }
            },
            "description": "Backward-compatible generator wire data. Existing clients send only the flattened location fields; review clients also identify exclusions by CODE and the pattern they actually reviewed.",
            "properties": {
              "abc": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AbcRotationSpeed"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "aisle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bay": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "check_digit": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "discard_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "exclude_codes": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "expected_pattern": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "footprint": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "generator_attributes": {
                "$ref": "#/definitions/LocationGeneratorAttributes"
              },
              "height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "loc_category": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocCategory"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_flag": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocFlag"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_processing_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocProcessingType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loc_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "max_cube_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_qty_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_weight_capacity": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "mix_lot": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "mix_sku": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "putawayzone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "route_sequence": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "section": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stack_limit": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LocStatus"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "x_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "y_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "z_coord": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "generator_attributes"
            ],
            "title": "LocGenerationRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocFlag": {
              "description": "LocFlag — operational temporary state (NOT location status). Migration 144 repurposed: dropped dead {Hold, Damage} (duplicated status, never used); replaced with operational state for PI hold use cases.",
              "enum": [
                "None",
                "CycleCountActive",
                "SanitationActive",
                "MaintenanceActive",
                "ReceivingHoldoff"
              ],
              "type": "string"
            },
            "LocForCreate": {
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "aisle": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bay": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "check_digit": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "discard_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "footprint": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "height": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "length": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "level": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "loc_category": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocCategory"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "loc_flag": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocFlag"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "loc_processing_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocProcessingType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "loc_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "max_cube_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_qty_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "max_weight_capacity": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mix_lot": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "mix_sku": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "route_sequence": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "section": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stack_limit": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "width": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "x_coord": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "y_coord": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "z_coord": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "code"
              ],
              "type": "object"
            },
            "LocProcessingType": {
              "description": "LocProcessingType represents the multiselect values for the location handling field\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_processing_type` (phase 2a) holds a `PropRule<LocProcessingType>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "Pallet",
                "Case",
                "Piece"
              ],
              "type": "string"
            },
            "LocStatus": {
              "description": "LocStatus - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_status` (phase 2a) holds a `PropRule<LocStatus>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "Ok",
                "Hold",
                "Damage"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "excluded_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "pattern": {
              "type": "string"
            },
            "rows": {
              "items": {
                "$ref": "#/definitions/LocForCreate"
              },
              "type": "array"
            },
            "total_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "excluded_count",
            "pattern",
            "rows",
            "total_count"
          ],
          "title": "LocationGenerationPreview",
          "type": "object"
        }
      },
      "summary": "Preview generated locations and per-location attributes without creating them",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a33658232c33c2875c191b36bd81b1d9de2fcb8ca9ee761f38aeffe9b2f4233f",
      "x-quark-response-schema-hash": "sha256:16316f9e7c6fb2bfcfd84bce7a4af529849b025d6adf46e52eee3449aa3403ad",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_loc",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count locations",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_loc_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "allow_mix": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "attrib_code": {
                "type": "string"
              },
              "location_code": {
                "type": "string"
              }
            },
            "required": [
              "attrib_code",
              "location_code"
            ],
            "title": "LocLotCommingleForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location_code": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "location_code",
            "mod_when",
            "mod_who"
          ],
          "title": "LocLotCommingle",
          "type": "object"
        }
      },
      "summary": "Create a location lot commingle rule",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "loc_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:444a682c12a80cd39ee97c079600c783a0b26c1da39407201f6cd83fd5e2b06d",
      "x-quark-response-schema-hash": "sha256:449fc24292e855316c24c341c306b278396793ed181dc52287ef38b5af5240b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_loc_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location_code": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "location_code",
            "mod_when",
            "mod_who"
          ],
          "title": "LocLotCommingle",
          "type": "object"
        }
      },
      "summary": "Get a location lot commingle rule by ID",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "loc_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:449fc24292e855316c24c341c306b278396793ed181dc52287ef38b5af5240b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_loc_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocLotCommingle": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_mix": {
                  "type": "boolean"
                },
                "attrib_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location_code": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_mix",
                "attrib_code",
                "id",
                "location_code",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LocLotCommingle"
          },
          "title": "Array_of_LocLotCommingle",
          "type": "array"
        }
      },
      "summary": "List location lot commingle rules (filtered)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "loc_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b4d72335b4c0e3075ac73940dc71bd0adacb104072b73b6b8c36472ddaf93cfb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_loc_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "allow_mix": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "attrib_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "LocLotCommingleForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location_code": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "location_code",
            "mod_when",
            "mod_who"
          ],
          "title": "LocLotCommingle",
          "type": "object"
        }
      },
      "summary": "Update a location lot commingle rule",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "loc_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4dc753a67c065a0d5344db86323f2c830cc70239c0b35f9245c770ab8cba7c7b",
      "x-quark-response-schema-hash": "sha256:449fc24292e855316c24c341c306b278396793ed181dc52287ef38b5af5240b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_loc_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location_code": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "location_code",
            "mod_when",
            "mod_who"
          ],
          "title": "LocLotCommingle",
          "type": "object"
        }
      },
      "summary": "Delete a location lot commingle rule",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "loc_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:449fc24292e855316c24c341c306b278396793ed181dc52287ef38b5af5240b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_loc_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count location lot commingle rules",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "loc_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_putawayzone_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "allow_mix": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "attrib_code": {
                "type": "string"
              },
              "putawayzone_code": {
                "type": "string"
              }
            },
            "required": [
              "attrib_code",
              "putawayzone_code"
            ],
            "title": "PutawayzoneLotCommingleForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone_code": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone_code"
          ],
          "title": "PutawayzoneLotCommingle",
          "type": "object"
        }
      },
      "summary": "Create a putawayzone lot commingle rule",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ed037ced3e75d5e5f4931f2867d35ab6e5a937e3b41c9032b6a35addb6d21366",
      "x-quark-response-schema-hash": "sha256:f50ec60f9884852710ae786ea9d9ae4aa14f147a3fca53718019299ff90310ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_putawayzone_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone_code": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone_code"
          ],
          "title": "PutawayzoneLotCommingle",
          "type": "object"
        }
      },
      "summary": "Get a putawayzone lot commingle rule by ID",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f50ec60f9884852710ae786ea9d9ae4aa14f147a3fca53718019299ff90310ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_putawayzone_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PutawayzoneLotCommingle": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_mix": {
                  "type": "boolean"
                },
                "attrib_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone_code": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_mix",
                "attrib_code",
                "id",
                "mod_when",
                "mod_who",
                "putawayzone_code"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PutawayzoneLotCommingle"
          },
          "title": "Array_of_PutawayzoneLotCommingle",
          "type": "array"
        }
      },
      "summary": "List putawayzone lot commingle rules (filtered)",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:2ecf2ef0339476ec98ca736db999f2fd96023d0484d24eb65b1d9ea802ace8bf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_putawayzone_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count putawayzone lot commingle rules",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_putawayzone_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "allow_mix": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "attrib_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "PutawayzoneLotCommingleForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone_code": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone_code"
          ],
          "title": "PutawayzoneLotCommingle",
          "type": "object"
        }
      },
      "summary": "Update a putawayzone lot commingle rule",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b237d94c0c72934695999150d31d8bdcf8f7c3dacd12c7bf8e391c4e8906b644",
      "x-quark-response-schema-hash": "sha256:f50ec60f9884852710ae786ea9d9ae4aa14f147a3fca53718019299ff90310ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_putawayzone_lot_commingle",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mix": {
              "type": "boolean"
            },
            "attrib_code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone_code": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_mix",
            "attrib_code",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone_code"
          ],
          "title": "PutawayzoneLotCommingle",
          "type": "object"
        }
      },
      "summary": "Delete a putawayzone lot commingle rule",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putawayzone_lot_commingle",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f50ec60f9884852710ae786ea9d9ae4aa14f147a3fca53718019299ff90310ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "PutawayClass": {
                "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "None",
                  "NoMix"
                ],
                "type": "string"
              },
              "SkuRotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              }
            },
            "description": "Used when creating a new SKU.\n\nContains all required and optional fields needed for SKU creation, excluding database-generated fields like `id`.\n\n# Examples\n\n``` use crate::model::sku::SkuForCreate; let sku_create = SkuForCreate::new(1, \"SKU001\", \"Example SKU\", 1); assert_eq!(sku_create.code, \"SKU001\"); ```",
            "properties": {
              "abc": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AbcRotationSpeed"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allocation_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "allow_multi_lot_on_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "barcode_format_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "best_by_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "cartonization_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "class": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "cube": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "default_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deliver_by_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "descr": {
                "type": "string"
              },
              "expire_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "gross_wgt": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "lot_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "max_age_on_rec": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "max_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "min_shelf_life_on_pick": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "min_shelf_life_on_rec": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "min_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "net_wgt": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "on_rec_copy_receipt_number": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "pick_instruction": {
                "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "positions_required": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "putaway_class": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PutawayClass"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "putaway_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "putaway_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "putawayzone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_hold_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "receipt_qc_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "replenishment_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "requires_temperature_capture": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "return_location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "rotate_by": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "rotation": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuRotation"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "shelf_life": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sku_group": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stack_limit": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "tare_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "warning_temperature_max": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "warning_temperature_min": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "descr",
              "owner_id",
              "pack_id"
            ],
            "title": "SkuForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "Sku",
          "type": "object"
        }
      },
      "summary": "Create a SKU master-data root after validating its packaging UOM.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8b76c653d5992b1e3967681b2ef5409256c0dfae77ba55cf73ecf7b01ed14765",
      "x-quark-response-schema-hash": "sha256:b201d67d7001b378d916d145020eb0d0e69c10ed08aa2e631d36297c24fc1dc6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_sku_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "PutawayClass": {
                "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "None",
                  "NoMix"
                ],
                "type": "string"
              },
              "SerialParseMode": {
                "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
                "enum": [
                  "None",
                  "Fixed",
                  "Bounded"
                ],
                "type": "string"
              },
              "SkuForCreate": {
                "additionalProperties": false,
                "description": "Used when creating a new SKU.\n\nContains all required and optional fields needed for SKU creation, excluding database-generated fields like `id`.\n\n# Examples\n\n``` use crate::model::sku::SkuForCreate; let sku_create = SkuForCreate::new(1, \"SKU001\", \"Example SKU\", 1); assert_eq!(sku_create.code, \"SKU001\"); ```",
                "properties": {
                  "abc": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/AbcRotationSpeed"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allocation_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "allow_multi_lot_on_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "barcode_format_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "best_by_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "cartonization_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "class": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "cube": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "default_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "deliver_by_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "descr": {
                    "type": "string"
                  },
                  "expire_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "gross_wgt": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "lot_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_age_on_rec": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_temperature": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "min_shelf_life_on_pick": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "min_shelf_life_on_rec": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "min_temperature": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "net_wgt": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "on_rec_copy_receipt_number": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "owner_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "pack_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "pack_location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pick_instruction": {
                    "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "positions_required": {
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "putaway_class": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PutawayClass"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "putaway_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "putaway_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "putawayzone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "receipt_hold_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "receipt_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "receipt_qc_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "replenishment_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "requires_temperature_capture": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "return_location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rotate_by": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rotation": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/SkuRotation"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "shelf_life": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "sku_group": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "stack_limit": {
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "tare_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "warning_temperature_max": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "warning_temperature_min": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "code",
                  "descr",
                  "owner_id",
                  "pack_id"
                ],
                "type": "object"
              },
              "SkuRotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              },
              "SkuSerialConfigForCreateInner": {
                "additionalProperties": false,
                "description": "Serial configuration without the parent identity. The aggregate command owns `sku_id`; accepting it from the caller would make identity propagation configurable in two places.",
                "properties": {
                  "allow_asn_pre_advised": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_deferred_capture": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_receive_capture": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "anomaly_block_severity": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "anomaly_max_per_lpn": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "anomaly_velocity_threshold_min": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "anomaly_vendor_surge_factor": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "check_digit_algorithm": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "continuous_serial_tracking": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "industry_profile": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "multi_serial_delimiter": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "multi_serial_fixed_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_episode_reassignment_mode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profile_mode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "require_unique_global": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "serial_auto_increment": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "serial_format": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serial_increment_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_increment_source_position": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_mask_format": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serial_parse_frequency": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_parse_mode": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/SerialParseMode"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "serial_parse_start_after": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_parse_start_position": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_scope": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serials_per_barcode": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "warranty_period_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            },
            "properties": {
              "serial_config": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuSerialConfigForCreateInner"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sku": {
                "$ref": "#/definitions/SkuForCreate"
              }
            },
            "required": [
              "sku"
            ],
            "title": "SkuFullForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            },
            "SkuSerialConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_asn_pre_advised": {
                  "type": "boolean"
                },
                "allow_deferred_capture": {
                  "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
                  "type": "boolean"
                },
                "allow_receive_capture": {
                  "type": "boolean"
                },
                "anomaly_block_severity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "anomaly_max_per_lpn": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_velocity_threshold_min": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_vendor_surge_factor": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "check_digit_algorithm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuous_serial_tracking": {
                  "description": "Master flag. If false — other fields ignored.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "industry_profile": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "multi_serial_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "multi_serial_fixed_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pick_episode_reassignment_mode": {
                  "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
                  "type": "string"
                },
                "profile_mode": {
                  "description": "Movement/capture coupling policy (ADR-090).",
                  "type": "string"
                },
                "require_unique_global": {
                  "type": "boolean"
                },
                "serial_auto_increment": {
                  "type": "boolean"
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_increment_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_increment_source_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_mask_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_parse_frequency": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_mode": {
                  "$ref": "#/definitions/SerialParseMode"
                },
                "serial_parse_start_after": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_start_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_scope": {
                  "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
                  "type": "string"
                },
                "serials_per_barcode": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warranty_period_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_asn_pre_advised",
                "allow_deferred_capture",
                "allow_receive_capture",
                "continuous_serial_tracking",
                "id",
                "mod_when",
                "mod_who",
                "pick_episode_reassignment_mode",
                "profile_mode",
                "require_unique_global",
                "serial_auto_increment",
                "serial_parse_mode",
                "serial_scope",
                "serials_per_barcode",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "serial_config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuSerialConfig"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "SkuFull",
          "type": "object"
        }
      },
      "summary": "Create a SKU and optional serial configuration atomically",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5a9c1200642bb93d27964069c160d82837e1269df1c148db3adef8f414b859b4",
      "x-quark-response-schema-hash": "sha256:54034efd9fefca572cb4707e279b21c90588dcf7e578bb6697dff6c3ee926ead",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_sku_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "PutawayClass": {
                "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "None",
                  "NoMix"
                ],
                "type": "string"
              },
              "SerialParseMode": {
                "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
                "enum": [
                  "None",
                  "Fixed",
                  "Bounded"
                ],
                "type": "string"
              },
              "SkuSerialConfigForCreateInner": {
                "additionalProperties": false,
                "description": "Serial configuration without the parent identity. The aggregate command owns `sku_id`; accepting it from the caller would make identity propagation configurable in two places.",
                "properties": {
                  "allow_asn_pre_advised": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_deferred_capture": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "allow_receive_capture": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "anomaly_block_severity": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "anomaly_max_per_lpn": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "anomaly_velocity_threshold_min": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "anomaly_vendor_surge_factor": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "check_digit_algorithm": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "continuous_serial_tracking": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "industry_profile": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "multi_serial_delimiter": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "multi_serial_fixed_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_episode_reassignment_mode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "profile_mode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "require_unique_global": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "serial_auto_increment": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "serial_format": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serial_increment_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_increment_source_position": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_mask_format": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serial_parse_frequency": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_parse_mode": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/SerialParseMode"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "serial_parse_start_after": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_parse_start_position": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_scope": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serials_per_barcode": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "warranty_period_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "SkuSerialConfigMutation": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuSerialConfigForCreateInner"
                  },
                  {
                    "properties": {
                      "data": {
                        "$ref": "#/definitions/SkuSerialConfigUpdateApi"
                      },
                      "id": {
                        "format": "int64",
                        "type": "integer"
                      }
                    },
                    "required": [
                      "data",
                      "id"
                    ],
                    "type": "object"
                  }
                ]
              },
              "SkuSerialConfigUpdateApi": {
                "additionalProperties": false,
                "properties": {
                  "allow_asn_pre_advised": {
                    "type": "boolean"
                  },
                  "allow_deferred_capture": {
                    "type": "boolean"
                  },
                  "allow_receive_capture": {
                    "type": "boolean"
                  },
                  "anomaly_block_severity": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "anomaly_max_per_lpn": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "anomaly_velocity_threshold_min": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "anomaly_vendor_surge_factor": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "check_digit_algorithm": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "continuous_serial_tracking": {
                    "type": "boolean"
                  },
                  "industry_profile": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "multi_serial_delimiter": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "multi_serial_fixed_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_episode_reassignment_mode": {
                    "oneOf": [
                      {
                        "enum": [
                          "Block",
                          "CancelAndRestart"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The open episode is handed over to the operator the work moved to.",
                        "enum": [
                          "Handover"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "profile_mode": {
                    "description": "Operational policy for stock whose serial capture is not complete yet.\n\nStored as VARCHAR so the profile remains an application-level policy and can evolve without a PostgreSQL enum migration.",
                    "oneOf": [
                      {
                        "description": "Every inventory movement requires a fully committed serial register.",
                        "enum": [
                          "Strict"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Capture may be deferred; only an unchanged full LPN may move while an episode follows that LPN atomically.",
                        "enum": [
                          "Flexible"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Serial tracking is disabled for movement-policy purposes.",
                        "enum": [
                          "NotTracked"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "require_unique_global": {
                    "type": "boolean"
                  },
                  "serial_auto_increment": {
                    "type": "boolean"
                  },
                  "serial_format": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serial_increment_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_increment_source_position": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_length": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_mask_format": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serial_parse_frequency": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_parse_mode": {
                    "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
                    "enum": [
                      "None",
                      "Fixed",
                      "Bounded"
                    ],
                    "type": "string"
                  },
                  "serial_parse_start_after": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_parse_start_position": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "serial_scope": {
                    "description": "Supported serial granularity at the public API boundary.",
                    "enum": [
                      "PerUnit",
                      "PerCase",
                      "PerPallet",
                      "PerInnerPack"
                    ],
                    "type": "string"
                  },
                  "serials_per_barcode": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "warranty_period_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "SkuUpdateApi": {
                "additionalProperties": false,
                "properties": {
                  "abc": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/AbcRotationSpeed"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "allocation_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "allow_multi_lot_on_lpn": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "barcode_format_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "best_by_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "cartonization_policy_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "class": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cube": {
                    "format": "double",
                    "type": "number"
                  },
                  "default_uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "deliver_by_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "descr": {
                    "type": "string"
                  },
                  "expire_days": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "gross_wgt": {
                    "format": "double",
                    "type": "number"
                  },
                  "lot_policy_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "max_age_on_rec": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_temperature": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "min_shelf_life_on_pick": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "min_shelf_life_on_rec": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "min_temperature": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "net_wgt": {
                    "format": "double",
                    "type": "number"
                  },
                  "on_rec_copy_receipt_number": {
                    "type": "boolean"
                  },
                  "pack_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "pack_location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pick_instruction": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "positions_required": {
                    "format": "int16",
                    "type": "integer"
                  },
                  "putaway_class": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PutawayClass"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "putaway_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "putaway_policy_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "putawayzone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "receipt_hold_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "receipt_policy_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "receipt_qc_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "replenishment_policy_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "requires_temperature_capture": {
                    "type": "boolean"
                  },
                  "return_location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "rotate_by": {
                    "type": "string"
                  },
                  "rotation": {
                    "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                    "enum": [
                      "Fifo",
                      "Lifo",
                      "Fefo"
                    ],
                    "type": "string"
                  },
                  "shelf_life": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "sku_group": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "stack_limit": {
                    "format": "int16",
                    "type": "integer"
                  },
                  "tare_weight": {
                    "format": "double",
                    "type": "number"
                  },
                  "warning_temperature_max": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "warning_temperature_min": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            },
            "properties": {
              "serial_config": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuSerialConfigMutation"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sku": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuUpdateApi"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "title": "SkuFullForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            },
            "SkuSerialConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_asn_pre_advised": {
                  "type": "boolean"
                },
                "allow_deferred_capture": {
                  "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
                  "type": "boolean"
                },
                "allow_receive_capture": {
                  "type": "boolean"
                },
                "anomaly_block_severity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "anomaly_max_per_lpn": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_velocity_threshold_min": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_vendor_surge_factor": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "check_digit_algorithm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuous_serial_tracking": {
                  "description": "Master flag. If false — other fields ignored.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "industry_profile": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "multi_serial_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "multi_serial_fixed_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pick_episode_reassignment_mode": {
                  "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
                  "type": "string"
                },
                "profile_mode": {
                  "description": "Movement/capture coupling policy (ADR-090).",
                  "type": "string"
                },
                "require_unique_global": {
                  "type": "boolean"
                },
                "serial_auto_increment": {
                  "type": "boolean"
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_increment_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_increment_source_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_mask_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_parse_frequency": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_mode": {
                  "$ref": "#/definitions/SerialParseMode"
                },
                "serial_parse_start_after": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_start_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_scope": {
                  "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
                  "type": "string"
                },
                "serials_per_barcode": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warranty_period_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_asn_pre_advised",
                "allow_deferred_capture",
                "allow_receive_capture",
                "continuous_serial_tracking",
                "id",
                "mod_when",
                "mod_who",
                "pick_episode_reassignment_mode",
                "profile_mode",
                "require_unique_global",
                "serial_auto_increment",
                "serial_parse_mode",
                "serial_scope",
                "serials_per_barcode",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "serial_config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuSerialConfig"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "SkuFull",
          "type": "object"
        }
      },
      "summary": "Update a SKU aggregate atomically",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:72f0ade59a8b29374396672a737e587ae75213bbdca38f270d65953a1aaac1a4",
      "x-quark-response-schema-hash": "sha256:54034efd9fefca572cb4707e279b21c90588dcf7e578bb6697dff6c3ee926ead",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "Sku",
          "type": "object"
        }
      },
      "summary": "Get a sku by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b201d67d7001b378d916d145020eb0d0e69c10ed08aa2e631d36297c24fc1dc6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            },
            "SkuSerialConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_asn_pre_advised": {
                  "type": "boolean"
                },
                "allow_deferred_capture": {
                  "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
                  "type": "boolean"
                },
                "allow_receive_capture": {
                  "type": "boolean"
                },
                "anomaly_block_severity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "anomaly_max_per_lpn": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_velocity_threshold_min": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_vendor_surge_factor": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "check_digit_algorithm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuous_serial_tracking": {
                  "description": "Master flag. If false — other fields ignored.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "industry_profile": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "multi_serial_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "multi_serial_fixed_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pick_episode_reassignment_mode": {
                  "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
                  "type": "string"
                },
                "profile_mode": {
                  "description": "Movement/capture coupling policy (ADR-090).",
                  "type": "string"
                },
                "require_unique_global": {
                  "type": "boolean"
                },
                "serial_auto_increment": {
                  "type": "boolean"
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_increment_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_increment_source_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_mask_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_parse_frequency": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_mode": {
                  "$ref": "#/definitions/SerialParseMode"
                },
                "serial_parse_start_after": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_start_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_scope": {
                  "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
                  "type": "string"
                },
                "serials_per_barcode": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warranty_period_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_asn_pre_advised",
                "allow_deferred_capture",
                "allow_receive_capture",
                "continuous_serial_tracking",
                "id",
                "mod_when",
                "mod_who",
                "pick_episode_reassignment_mode",
                "profile_mode",
                "require_unique_global",
                "serial_auto_increment",
                "serial_parse_mode",
                "serial_scope",
                "serials_per_barcode",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "serial_config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuSerialConfig"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "SkuFull",
          "type": "object"
        }
      },
      "summary": "Get SKU with its optional serial configuration",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:54034efd9fefca572cb4707e279b21c90588dcf7e578bb6697dff6c3ee926ead",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "Sku": {
              "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "active": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "allow_multi_lot_on_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "barcode_format_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "best_by_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "class": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "default_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "deliver_by_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "descr": {
                  "type": "string"
                },
                "expire_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "force_separate_lpn_per_lot": {
                  "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "gross_wgt": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_age_on_rec": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_shelf_life_on_pick": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "min_shelf_life_on_rec": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "min_temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "net_wgt": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "on_rec_copy_receipt_number": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pick_instruction": {
                  "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "positions_required": {
                  "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "putaway_class": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PutawayClass"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "putaway_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_hold_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "receipt_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requires_temperature_capture": {
                  "type": "boolean"
                },
                "return_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rotate_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shelf_life": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sku_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stack_limit": {
                  "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "tare_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "warning_temperature_max": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "warning_temperature_min": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "descr",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "requires_temperature_capture"
              ],
              "type": "object"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Sku"
          },
          "title": "Array_of_Sku",
          "type": "array"
        }
      },
      "summary": "List sku — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:8320983f9553e324fd305b15dee89ad66e1b06c3e0dccb11ffd21d06bf3462be",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AbcRotationSpeed": {
                "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
                "enum": [
                  "A",
                  "B",
                  "C"
                ],
                "type": "string"
              },
              "PutawayClass": {
                "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "None",
                  "NoMix"
                ],
                "type": "string"
              }
            },
            "properties": {
              "abc": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AbcRotationSpeed"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "active": {
                "type": "boolean"
              },
              "allocation_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "allow_multi_lot_on_lpn": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "barcode_format_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "best_by_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "cartonization_policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "class": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cube": {
                "format": "double",
                "type": "number"
              },
              "default_uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "deliver_by_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "descr": {
                "type": "string"
              },
              "expire_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "gross_wgt": {
                "format": "double",
                "type": "number"
              },
              "lot_policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "max_age_on_rec": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "max_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "min_shelf_life_on_pick": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "min_shelf_life_on_rec": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "min_temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "net_wgt": {
                "format": "double",
                "type": "number"
              },
              "on_rec_copy_receipt_number": {
                "type": "boolean"
              },
              "pack_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "pick_instruction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "positions_required": {
                "format": "int16",
                "type": "integer"
              },
              "putaway_class": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PutawayClass"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "putaway_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "putaway_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "putawayzone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_hold_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "receipt_qc_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "replenishment_policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "requires_temperature_capture": {
                "type": "boolean"
              },
              "return_location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "rotate_by": {
                "type": "string"
              },
              "rotation": {
                "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
                "enum": [
                  "Fifo",
                  "Lifo",
                  "Fefo"
                ],
                "type": "string"
              },
              "shelf_life": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sku_group": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stack_limit": {
                "format": "int16",
                "type": "integer"
              },
              "tare_weight": {
                "format": "double",
                "type": "number"
              },
              "warning_temperature_max": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "warning_temperature_min": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "title": "SkuUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "Sku",
          "type": "object"
        }
      },
      "summary": "Update mutable SKU attributes without changing owner or SKU code.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b5e73a2bd9e7c9fc2050175293d07fa28cfe811c0af154221d8734230a810703",
      "x-quark-response-schema-hash": "sha256:b201d67d7001b378d916d145020eb0d0e69c10ed08aa2e631d36297c24fc1dc6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "Sku",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced SKU and its owned serial configuration.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b201d67d7001b378d916d145020eb0d0e69c10ed08aa2e631d36297c24fc1dc6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_info",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "owner_id",
          "required": false,
          "schema": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "sku_code",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            }
          },
          "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "active": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allow_multi_lot_on_lpn": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "barcode_format_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "best_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "class": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "cube": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "default_uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "deliver_by_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "expire_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "force_separate_lpn_per_lot": {
              "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "gross_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_age_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "min_shelf_life_on_pick": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_shelf_life_on_rec": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "min_temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "net_wgt": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "on_rec_copy_receipt_number": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pick_instruction": {
              "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "positions_required": {
              "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "putaway_class": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PutawayClass"
                },
                {
                  "type": "null"
                }
              ]
            },
            "putaway_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_hold_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "receipt_qc_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "requires_temperature_capture": {
              "type": "boolean"
            },
            "return_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotate_by": {
              "type": [
                "string",
                "null"
              ]
            },
            "rotation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuRotation"
                },
                {
                  "type": "null"
                }
              ]
            },
            "shelf_life": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_group": {
              "type": [
                "string",
                "null"
              ]
            },
            "stack_limit": {
              "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "tare_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_max": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "warning_temperature_min": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "requires_temperature_capture"
          ],
          "title": "Sku",
          "type": "object"
        }
      },
      "summary": "Get SKU by sku_code + owner_id",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "sku",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:83241fe410af2d2bbf30cfe5ef25c0afb574f93f98265fc0b6e9f029188c4166",
      "x-quark-response-schema-hash": "sha256:b201d67d7001b378d916d145020eb0d0e69c10ed08aa2e631d36297c24fc1dc6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_audit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "changed_at": {
              "type": "string"
            },
            "changed_by": {
              "format": "int64",
              "type": "integer"
            },
            "field_name": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "new_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "old_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "changed_at",
            "changed_by",
            "field_name",
            "id",
            "sku_id"
          ],
          "title": "SkuAudit",
          "type": "object"
        }
      },
      "summary": "Get a sku_audit by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "sku_audit",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ff1062e392b2da5e27acd56c8953ca4b93d889b87ec7d33bd5722b1086776813",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_sku_audit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SkuAudit": {
              "properties": {
                "changed_at": {
                  "type": "string"
                },
                "changed_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "field_name": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "new_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "old_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "changed_at",
                "changed_by",
                "field_name",
                "id",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SkuAudit"
          },
          "title": "Array_of_SkuAudit",
          "type": "array"
        }
      },
      "summary": "List sku_audit — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "sku_audit",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:3c7cafdc397c61a947a5607a30f3f0b6f6d9990c02f8ab70470f69799728ea4e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "SkuBarcodeType": {
                "description": "EAN, UPC, GTIN, etc..",
                "enum": [
                  "None",
                  "Upc",
                  "Mni",
                  "Rtlin",
                  "Epcid",
                  "Crn",
                  "Gtin"
                ],
                "title": "SKU Barcode types",
                "type": "string"
              }
            },
            "description": "Public create contract for a barcode. `sku_id` owns identity; the legacy owner/code pair is optional compatibility evidence and must match it.",
            "properties": {
              "barcode": {
                "type": "string"
              },
              "barcode_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SkuBarcodeType"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "default_uom": {
                "type": "string"
              },
              "owner_id": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pack_id": {
                "format": "int64",
                "type": "integer"
              },
              "sku_code": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_id": {
                "format": "int64",
                "type": "integer"
              },
              "user_notes1": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "user_notes2": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "vendor_id": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "barcode",
              "default_uom",
              "pack_id",
              "sku_id"
            ],
            "title": "SkuBarcodeCreateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SkuBarcodeType": {
              "description": "EAN, UPC, GTIN, etc..",
              "enum": [
                "None",
                "Upc",
                "Mni",
                "Rtlin",
                "Epcid",
                "Crn",
                "Gtin"
              ],
              "title": "SKU Barcode types",
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": "string"
            },
            "barcode_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuBarcodeType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_uom": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_notes1": {
              "type": [
                "string",
                "null"
              ]
            },
            "user_notes2": {
              "type": [
                "string",
                "null"
              ]
            },
            "vendor_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "barcode",
            "default_uom",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "sku_id"
          ],
          "title": "SkuBarcode",
          "type": "object"
        }
      },
      "summary": "Attach a barcode to one SKU, deriving owner and SKU code from its id.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6eb2369ed325401b535e996e4d6ff3111cb205c08b9771fff9b66df4b5d44ce3",
      "x-quark-response-schema-hash": "sha256:82b0ce4c9ec5c65254983af19b357deff2bfb57bec25c4dec92ee2875d4b24d7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SkuBarcodeType": {
              "description": "EAN, UPC, GTIN, etc..",
              "enum": [
                "None",
                "Upc",
                "Mni",
                "Rtlin",
                "Epcid",
                "Crn",
                "Gtin"
              ],
              "title": "SKU Barcode types",
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": "string"
            },
            "barcode_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuBarcodeType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_uom": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_notes1": {
              "type": [
                "string",
                "null"
              ]
            },
            "user_notes2": {
              "type": [
                "string",
                "null"
              ]
            },
            "vendor_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "barcode",
            "default_uom",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "sku_id"
          ],
          "title": "SkuBarcode",
          "type": "object"
        }
      },
      "summary": "Get a sku_barcode by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:82b0ce4c9ec5c65254983af19b357deff2bfb57bec25c4dec92ee2875d4b24d7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SkuBarcode": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode": {
                  "type": "string"
                },
                "barcode_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuBarcodeType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_uom": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "user_notes1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_notes2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vendor_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "barcode",
                "default_uom",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "sku_id"
              ],
              "type": "object"
            },
            "SkuBarcodeType": {
              "description": "EAN, UPC, GTIN, etc..",
              "enum": [
                "None",
                "Upc",
                "Mni",
                "Rtlin",
                "Epcid",
                "Crn",
                "Gtin"
              ],
              "title": "SKU Barcode types",
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/SkuBarcode"
          },
          "title": "Array_of_SkuBarcode",
          "type": "array"
        }
      },
      "summary": "List sku_barcode — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:989b2c89cba400dfab3ddee345964c2c87cba64b942307e35e2a938f6d18fac7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "barcode": {
                "type": "string"
              },
              "barcode_type": {
                "description": "EAN, UPC, GTIN, etc..",
                "enum": [
                  "None",
                  "Upc",
                  "Mni",
                  "Rtlin",
                  "Epcid",
                  "Crn",
                  "Gtin"
                ],
                "title": "SKU Barcode types",
                "type": "string"
              },
              "default_uom": {
                "type": "string"
              },
              "pack_id": {
                "format": "int64",
                "type": "integer"
              },
              "user_notes1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "user_notes2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vendor_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "SkuBarcodeUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SkuBarcodeType": {
              "description": "EAN, UPC, GTIN, etc..",
              "enum": [
                "None",
                "Upc",
                "Mni",
                "Rtlin",
                "Epcid",
                "Crn",
                "Gtin"
              ],
              "title": "SKU Barcode types",
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": "string"
            },
            "barcode_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuBarcodeType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_uom": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_notes1": {
              "type": [
                "string",
                "null"
              ]
            },
            "user_notes2": {
              "type": [
                "string",
                "null"
              ]
            },
            "vendor_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "barcode",
            "default_uom",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "sku_id"
          ],
          "title": "SkuBarcode",
          "type": "object"
        }
      },
      "summary": "Update a SKU barcode without re-parenting it to another SKU or owner.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9f1a49792607a85ee7d1876ab231185222bf690b6e6795f83c33e4edc43cd25b",
      "x-quark-response-schema-hash": "sha256:82b0ce4c9ec5c65254983af19b357deff2bfb57bec25c4dec92ee2875d4b24d7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SkuBarcodeType": {
              "description": "EAN, UPC, GTIN, etc..",
              "enum": [
                "None",
                "Upc",
                "Mni",
                "Rtlin",
                "Epcid",
                "Crn",
                "Gtin"
              ],
              "title": "SKU Barcode types",
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": "string"
            },
            "barcode_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuBarcodeType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "default_uom": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "user_notes1": {
              "type": [
                "string",
                "null"
              ]
            },
            "user_notes2": {
              "type": [
                "string",
                "null"
              ]
            },
            "vendor_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "barcode",
            "default_uom",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "sku_id"
          ],
          "title": "SkuBarcode",
          "type": "object"
        }
      },
      "summary": "Delete a sku_barcode by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:82b0ce4c9ec5c65254983af19b357deff2bfb57bec25c4dec92ee2875d4b24d7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple sku_barcode by IDs — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_sku_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count sku_barcode — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_barcode",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "auto_detect_identifier": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "barcode_identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "chars_to_trim": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "check_digit_algorithm": {
                "description": "Slice S5 — optional on create; DB default \"None\" when omitted.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_ending_delimiter": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "descr": {
                "type": "string"
              },
              "format_group": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "parsing_rules": {
                "type": "string"
              }
            },
            "required": [
              "descr",
              "format_group",
              "name",
              "parsing_rules"
            ],
            "title": "BarcodeFormatForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_detect_identifier": {
              "type": "boolean"
            },
            "barcode_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "chars_to_trim": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit_algorithm": {
              "description": "Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.",
              "type": "string"
            },
            "default_ending_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "format_group": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "parsing_rules": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_detect_identifier",
            "chars_to_trim",
            "check_digit_algorithm",
            "descr",
            "format_group",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "parsing_rules"
          ],
          "title": "BarcodeFormat",
          "type": "object"
        }
      },
      "summary": "Create a new barcode_format — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ffdb4dfb56c6477bceb899008dad4c30240e6b334206a6ba30e5b8561a0a0ae7",
      "x-quark-response-schema-hash": "sha256:ef74f290a80371728c174b2f792010f35026273044ecaa98d0b83724d803d311",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_detect_identifier": {
              "type": "boolean"
            },
            "barcode_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "chars_to_trim": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit_algorithm": {
              "description": "Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.",
              "type": "string"
            },
            "default_ending_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "format_group": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "parsing_rules": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_detect_identifier",
            "chars_to_trim",
            "check_digit_algorithm",
            "descr",
            "format_group",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "parsing_rules"
          ],
          "title": "BarcodeFormat",
          "type": "object"
        }
      },
      "summary": "Get a barcode_format by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ef74f290a80371728c174b2f792010f35026273044ecaa98d0b83724d803d311",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "BarcodeFormat": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_detect_identifier": {
                  "type": "boolean"
                },
                "barcode_identifier": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "chars_to_trim": {
                  "format": "int32",
                  "type": "integer"
                },
                "check_digit_algorithm": {
                  "description": "Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.",
                  "type": "string"
                },
                "default_ending_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "descr": {
                  "type": "string"
                },
                "format_group": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "parsing_rules": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_detect_identifier",
                "chars_to_trim",
                "check_digit_algorithm",
                "descr",
                "format_group",
                "id",
                "mod_when",
                "mod_who",
                "name",
                "parsing_rules"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/BarcodeFormat"
          },
          "title": "Array_of_BarcodeFormat",
          "type": "array"
        }
      },
      "summary": "List barcode_format — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:da84516a95f25a7332c034c6e6b31d1dc2275a13a3021b9a8689e96f0f9f465d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "auto_detect_identifier": {
                "type": "boolean"
              },
              "barcode_identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "chars_to_trim": {
                "format": "int32",
                "type": "integer"
              },
              "check_digit_algorithm": {
                "type": "string"
              },
              "default_ending_delimiter": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "descr": {
                "type": "string"
              },
              "format_group": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "parsing_rules": {
                "type": "string"
              }
            },
            "title": "BarcodeFormatUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_detect_identifier": {
              "type": "boolean"
            },
            "barcode_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "chars_to_trim": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit_algorithm": {
              "description": "Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.",
              "type": "string"
            },
            "default_ending_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "format_group": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "parsing_rules": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_detect_identifier",
            "chars_to_trim",
            "check_digit_algorithm",
            "descr",
            "format_group",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "parsing_rules"
          ],
          "title": "BarcodeFormat",
          "type": "object"
        }
      },
      "summary": "Update a barcode format with explicit keep, clear and set semantics.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e8e7d27b832bc4766ed6a622742b1e0c8a58e51759bb76b7ac6fa33d0eb747e6",
      "x-quark-response-schema-hash": "sha256:ef74f290a80371728c174b2f792010f35026273044ecaa98d0b83724d803d311",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_detect_identifier": {
              "type": "boolean"
            },
            "barcode_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "chars_to_trim": {
              "format": "int32",
              "type": "integer"
            },
            "check_digit_algorithm": {
              "description": "Slice S5 — per-format check-digit algorithm. Stored as TEXT (\"None\" / \"Mod10\" / \"Mod43\") so adding new algorithms doesn't require a column enum migration. The business-logic `CheckDigitAlgorithm::from_str` parses it; unknown values surface as typed errors at validation time.",
              "type": "string"
            },
            "default_ending_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "descr": {
              "type": "string"
            },
            "format_group": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "parsing_rules": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_detect_identifier",
            "chars_to_trim",
            "check_digit_algorithm",
            "descr",
            "format_group",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "parsing_rules"
          ],
          "title": "BarcodeFormat",
          "type": "object"
        }
      },
      "summary": "Delete a barcode_format by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ef74f290a80371728c174b2f792010f35026273044ecaa98d0b83724d803d311",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple barcode_format by IDs — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_barcode_format",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count barcode_format — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "parse_barcode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "format_id",
          "required": false,
          "schema": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "format_name",
          "required": false,
          "schema": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "raw_barcode",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ParsedField": {
              "properties": {
                "app_identifier": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "data_element_name": {
                  "type": "string"
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "data_element_name",
                "sequence",
                "value"
              ],
              "type": "object"
            }
          },
          "properties": {
            "fields": {
              "items": {
                "$ref": "#/definitions/ParsedField"
              },
              "type": "array"
            },
            "format_name": {
              "type": "string"
            }
          },
          "required": [
            "fields",
            "format_name"
          ],
          "title": "ParseBarcodeResult",
          "type": "object"
        }
      },
      "summary": "Parse a raw barcode string using a named or ID-referenced format",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "barcode_format",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fd0df7f26ec2bf5cb7bc9ced9fb71a842e05d593df8c331f212d7ba4dc0a6347",
      "x-quark-response-schema-hash": "sha256:549989351abdca1761aa1c35d9dad43da72522de3bf28c25b57060e96d09ca2d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "add_decimal_at_place": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "barcode_format_id": {
                "format": "int64",
                "type": "integer"
              },
              "data_app_identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_element_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_group_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "data_length_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "date_field_format": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "delimiter_after": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "delimiter_before": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "prefix_trim_number": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "repeats_until_end": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "sequence": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "start_position": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "stop_position": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "suffix_trim_number": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "validation": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "barcode_format_id"
            ],
            "title": "BarcodeFormatDetailForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_decimal_at_place": {
              "format": "int32",
              "type": "integer"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode_format_id": {
              "format": "int64",
              "type": "integer"
            },
            "data_app_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_element_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_group_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "data_length_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_field_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_after": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_before": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "prefix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "repeats_until_end": {
              "type": "boolean"
            },
            "sequence": {
              "format": "int32",
              "type": "integer"
            },
            "start_position": {
              "format": "int32",
              "type": "integer"
            },
            "stop_position": {
              "format": "int32",
              "type": "integer"
            },
            "suffix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "validation": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_decimal_at_place",
            "add_when",
            "add_who",
            "barcode_format_id",
            "id",
            "mod_when",
            "mod_who",
            "prefix_trim_number",
            "repeats_until_end",
            "sequence",
            "start_position",
            "stop_position",
            "suffix_trim_number"
          ],
          "title": "BarcodeFormatDetail",
          "type": "object"
        }
      },
      "summary": "Create a new barcode_format_detail — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bcc9f5890f51ba2bd88358ef05bcac6428d76cb893c6acc345cfb652a92ebbfe",
      "x-quark-response-schema-hash": "sha256:b9f9670766a5a3ea07cc5d9be66bda6955ac69a7834f3ac5c4b1726d65b99fc7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_decimal_at_place": {
              "format": "int32",
              "type": "integer"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode_format_id": {
              "format": "int64",
              "type": "integer"
            },
            "data_app_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_element_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_group_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "data_length_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_field_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_after": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_before": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "prefix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "repeats_until_end": {
              "type": "boolean"
            },
            "sequence": {
              "format": "int32",
              "type": "integer"
            },
            "start_position": {
              "format": "int32",
              "type": "integer"
            },
            "stop_position": {
              "format": "int32",
              "type": "integer"
            },
            "suffix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "validation": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_decimal_at_place",
            "add_when",
            "add_who",
            "barcode_format_id",
            "id",
            "mod_when",
            "mod_who",
            "prefix_trim_number",
            "repeats_until_end",
            "sequence",
            "start_position",
            "stop_position",
            "suffix_trim_number"
          ],
          "title": "BarcodeFormatDetail",
          "type": "object"
        }
      },
      "summary": "Get a barcode_format_detail by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b9f9670766a5a3ea07cc5d9be66bda6955ac69a7834f3ac5c4b1726d65b99fc7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "BarcodeFormatDetail": {
              "properties": {
                "add_decimal_at_place": {
                  "format": "int32",
                  "type": "integer"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode_format_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "data_app_identifier": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "data_element_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "data_group_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "data_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "data_length_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "date_field_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delimiter_after": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delimiter_before": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "prefix_trim_number": {
                  "format": "int32",
                  "type": "integer"
                },
                "repeats_until_end": {
                  "type": "boolean"
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "start_position": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_position": {
                  "format": "int32",
                  "type": "integer"
                },
                "suffix_trim_number": {
                  "format": "int32",
                  "type": "integer"
                },
                "validation": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_decimal_at_place",
                "add_when",
                "add_who",
                "barcode_format_id",
                "id",
                "mod_when",
                "mod_who",
                "prefix_trim_number",
                "repeats_until_end",
                "sequence",
                "start_position",
                "stop_position",
                "suffix_trim_number"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/BarcodeFormatDetail"
          },
          "title": "Array_of_BarcodeFormatDetail",
          "type": "array"
        }
      },
      "summary": "List barcode_format_detail — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:55fcd8a5a0aa5a1e156d9f937cfd57ffde40cb3227b3cd43aa09ccb3582f1c13",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "add_decimal_at_place": {
                "format": "int32",
                "type": "integer"
              },
              "data_app_identifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_element_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_group_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "data_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "data_length_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "date_field_format": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "delimiter_after": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "delimiter_before": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot_policy_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "prefix_trim_number": {
                "format": "int32",
                "type": "integer"
              },
              "repeats_until_end": {
                "type": "boolean"
              },
              "sequence": {
                "format": "int32",
                "type": "integer"
              },
              "start_position": {
                "format": "int32",
                "type": "integer"
              },
              "stop_position": {
                "format": "int32",
                "type": "integer"
              },
              "suffix_trim_number": {
                "format": "int32",
                "type": "integer"
              },
              "validation": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "BarcodeFormatDetailUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_decimal_at_place": {
              "format": "int32",
              "type": "integer"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode_format_id": {
              "format": "int64",
              "type": "integer"
            },
            "data_app_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_element_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_group_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "data_length_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_field_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_after": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_before": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "prefix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "repeats_until_end": {
              "type": "boolean"
            },
            "sequence": {
              "format": "int32",
              "type": "integer"
            },
            "start_position": {
              "format": "int32",
              "type": "integer"
            },
            "stop_position": {
              "format": "int32",
              "type": "integer"
            },
            "suffix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "validation": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_decimal_at_place",
            "add_when",
            "add_who",
            "barcode_format_id",
            "id",
            "mod_when",
            "mod_who",
            "prefix_trim_number",
            "repeats_until_end",
            "sequence",
            "start_position",
            "stop_position",
            "suffix_trim_number"
          ],
          "title": "BarcodeFormatDetail",
          "type": "object"
        }
      },
      "summary": "Update a barcode format detail with explicit keep, clear and set semantics.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:972c955653d2e08228f3098efc970fe2252a6cb47c6a75b56ff710dc47fb899e",
      "x-quark-response-schema-hash": "sha256:b9f9670766a5a3ea07cc5d9be66bda6955ac69a7834f3ac5c4b1726d65b99fc7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_decimal_at_place": {
              "format": "int32",
              "type": "integer"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode_format_id": {
              "format": "int64",
              "type": "integer"
            },
            "data_app_identifier": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_element_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_group_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "data_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "data_length_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_field_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_after": {
              "type": [
                "string",
                "null"
              ]
            },
            "delimiter_before": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "prefix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "repeats_until_end": {
              "type": "boolean"
            },
            "sequence": {
              "format": "int32",
              "type": "integer"
            },
            "start_position": {
              "format": "int32",
              "type": "integer"
            },
            "stop_position": {
              "format": "int32",
              "type": "integer"
            },
            "suffix_trim_number": {
              "format": "int32",
              "type": "integer"
            },
            "validation": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_decimal_at_place",
            "add_when",
            "add_who",
            "barcode_format_id",
            "id",
            "mod_when",
            "mod_who",
            "prefix_trim_number",
            "repeats_until_end",
            "sequence",
            "start_position",
            "stop_position",
            "suffix_trim_number"
          ],
          "title": "BarcodeFormatDetail",
          "type": "object"
        }
      },
      "summary": "Delete a barcode_format_detail by ID — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b9f9670766a5a3ea07cc5d9be66bda6955ac69a7834f3ac5c4b1726d65b99fc7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple barcode_format_detail by IDs — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_barcode_format_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count barcode_format_detail — CRUD.",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "next_barcode_format_detail_sequence",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "barcode_format_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int32",
          "title": "int32",
          "type": "integer"
        }
      },
      "summary": "Get next sequence value for a barcode format detail",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "barcode_format_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:dec42a155c12f575fb7e4977e2d5cdf5d8127480e1cd6fccadb40a2776f27fdf",
      "x-quark-response-schema-hash": "sha256:da524f1eba84dffe1c65662faf62fd1849e4693873ee91466061a908d19492d5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "generate_check_digit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "location_code",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "check_digit": {
              "type": "string"
            }
          },
          "required": [
            "check_digit"
          ],
          "title": "CheckDigitResult",
          "type": "object"
        }
      },
      "summary": "Compute check digit for a location code",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "check_digit",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:17401e4224f2b2c88b5a1036f2bc9e618b52b83fb13d9486de5d41541b5ea17f",
      "x-quark-response-schema-hash": "sha256:ee63842fa94ead4ed460f09f1b2b7e5958ba46b928e174f485536a7e71a8f1c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_next_key",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "counter_name",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        },
        {
          "name": "scope",
          "required": false,
          "schema": {
            "default": null,
            "description": "Optional partition key. Global counters omit it; child sequences use the saved parent's stable identity (for example a receipt id).",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "size",
          "required": false,
          "schema": {
            "default": null,
            "description": "Output width. Existing callers omit it and retain the ten-digit format.",
            "format": "uint",
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "String",
          "type": "string"
        }
      },
      "summary": "Get next global or scoped counter value",
      "tags": [
        {
          "name": "master_data"
        }
      ],
      "x-quark-context": "master_data",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "key",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:01ec072f65179017acfb73937f26b0ae8889f4ea3797b5d4ca43d85c3e2efcac",
      "x-quark-response-schema-hash": "sha256:f3afdc6f1d6964bf9de3d0d8d42b125954bbc6fa4c7bc4ad74dc20eb00890214",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_lot_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label_best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_creation": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotCreationPolicy"
                }
              ],
              "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "required_best_by_date": {
              "type": "boolean"
            },
            "required_delivery_by_date": {
              "type": "boolean"
            },
            "required_expiration_date": {
              "type": "boolean"
            },
            "required_manufactured_date": {
              "type": "boolean"
            },
            "show_best_by_date": {
              "type": "boolean"
            },
            "show_delivery_by_date": {
              "type": "boolean"
            },
            "show_expiration_date": {
              "type": "boolean"
            },
            "show_manufactured_date": {
              "type": "boolean"
            },
            "show_on_pick_best_by_date": {
              "type": "boolean"
            },
            "show_on_pick_delivery_by_date": {
              "type": "boolean"
            },
            "show_on_pick_expiration_date": {
              "type": "boolean"
            },
            "show_on_pick_manufactured_date": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
              "type": "boolean"
            },
            "verification_best_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_delivery_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_expiration_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_manufactured_date": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "lot_creation",
            "mod_when",
            "mod_who",
            "required_best_by_date",
            "required_delivery_by_date",
            "required_expiration_date",
            "required_manufactured_date",
            "show_best_by_date",
            "show_delivery_by_date",
            "show_expiration_date",
            "show_manufactured_date",
            "show_on_pick_best_by_date",
            "show_on_pick_delivery_by_date",
            "show_on_pick_expiration_date",
            "show_on_pick_manufactured_date",
            "verification_best_by_date",
            "verification_delivery_by_date",
            "verification_expiration_date",
            "verification_manufactured_date",
            "version"
          ],
          "title": "LotPolicy",
          "type": "object"
        }
      },
      "summary": "Get a lot_policy by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ea8a74d254f10d84bced832f76d6c8fe6bc12956bed8a0bee6b29147a6e367b4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_lot_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label_best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_creation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotCreationPolicy"
                    }
                  ],
                  "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_best_by_date": {
                  "type": "boolean"
                },
                "required_delivery_by_date": {
                  "type": "boolean"
                },
                "required_expiration_date": {
                  "type": "boolean"
                },
                "required_manufactured_date": {
                  "type": "boolean"
                },
                "show_best_by_date": {
                  "type": "boolean"
                },
                "show_delivery_by_date": {
                  "type": "boolean"
                },
                "show_expiration_date": {
                  "type": "boolean"
                },
                "show_manufactured_date": {
                  "type": "boolean"
                },
                "show_on_pick_best_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_delivery_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_expiration_date": {
                  "type": "boolean"
                },
                "show_on_pick_manufactured_date": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
                  "type": "boolean"
                },
                "verification_best_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_delivery_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_expiration_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_manufactured_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "lot_creation",
                "mod_when",
                "mod_who",
                "required_best_by_date",
                "required_delivery_by_date",
                "required_expiration_date",
                "required_manufactured_date",
                "show_best_by_date",
                "show_delivery_by_date",
                "show_expiration_date",
                "show_manufactured_date",
                "show_on_pick_best_by_date",
                "show_on_pick_delivery_by_date",
                "show_on_pick_expiration_date",
                "show_on_pick_manufactured_date",
                "verification_best_by_date",
                "verification_delivery_by_date",
                "verification_expiration_date",
                "verification_manufactured_date",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LotPolicy"
          },
          "title": "Array_of_LotPolicy",
          "type": "array"
        }
      },
      "summary": "List lot_policy — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:72c23b991161924e890a8e3d7694a1a21654b508c7c10ae4050ae6970033e85b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_lot_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label_best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_creation": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotCreationPolicy"
                }
              ],
              "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "required_best_by_date": {
              "type": "boolean"
            },
            "required_delivery_by_date": {
              "type": "boolean"
            },
            "required_expiration_date": {
              "type": "boolean"
            },
            "required_manufactured_date": {
              "type": "boolean"
            },
            "show_best_by_date": {
              "type": "boolean"
            },
            "show_delivery_by_date": {
              "type": "boolean"
            },
            "show_expiration_date": {
              "type": "boolean"
            },
            "show_manufactured_date": {
              "type": "boolean"
            },
            "show_on_pick_best_by_date": {
              "type": "boolean"
            },
            "show_on_pick_delivery_by_date": {
              "type": "boolean"
            },
            "show_on_pick_expiration_date": {
              "type": "boolean"
            },
            "show_on_pick_manufactured_date": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
              "type": "boolean"
            },
            "verification_best_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_delivery_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_expiration_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_manufactured_date": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "lot_creation",
            "mod_when",
            "mod_who",
            "required_best_by_date",
            "required_delivery_by_date",
            "required_expiration_date",
            "required_manufactured_date",
            "show_best_by_date",
            "show_delivery_by_date",
            "show_expiration_date",
            "show_manufactured_date",
            "show_on_pick_best_by_date",
            "show_on_pick_delivery_by_date",
            "show_on_pick_expiration_date",
            "show_on_pick_manufactured_date",
            "verification_best_by_date",
            "verification_delivery_by_date",
            "verification_expiration_date",
            "verification_manufactured_date",
            "version"
          ],
          "title": "LotPolicy",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced lot policy and all of its owned attributes.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ea8a74d254f10d84bced832f76d6c8fe6bc12956bed8a0bee6b29147a6e367b4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_lot_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete unreferenced lot policies and all of their owned attributes.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_lot_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count lot_policy — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_lot_policy_attribute",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attrib_code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "override_allowed": {
              "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
              "type": "boolean"
            },
            "physical_verification": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
            },
            "required": {
              "type": "boolean"
            },
            "show": {
              "type": "boolean"
            },
            "show_on_pick": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
              "type": "boolean"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attrib_code",
            "id",
            "lot_policy_id",
            "mod_when",
            "mod_who",
            "override_allowed",
            "physical_verification",
            "required",
            "show",
            "show_on_pick"
          ],
          "title": "LotPolicyAttribute",
          "type": "object"
        }
      },
      "summary": "Get a lot_policy_attribute by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b1f164ad1503bc8e585a54efa5a7bfc78c025151c48980e89cc68cea14f5566a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_lot_policy_attribute",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPolicyAttribute": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "override_allowed": {
                  "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
                  "type": "boolean"
                },
                "physical_verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
                },
                "required": {
                  "type": "boolean"
                },
                "show": {
                  "type": "boolean"
                },
                "show_on_pick": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
                  "type": "boolean"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attrib_code",
                "id",
                "lot_policy_id",
                "mod_when",
                "mod_who",
                "override_allowed",
                "physical_verification",
                "required",
                "show",
                "show_on_pick"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LotPolicyAttribute"
          },
          "title": "Array_of_LotPolicyAttribute",
          "type": "array"
        }
      },
      "summary": "List lot_policy_attribute — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:d9b39fee60c33bed307a60be80fe60d46331426b3ac4ea2e139b123b1002ab86",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_lot_policy_attribute",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count lot_policy_attribute — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_policy_config_view",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label_best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_creation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotCreationPolicy"
                    }
                  ],
                  "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_best_by_date": {
                  "type": "boolean"
                },
                "required_delivery_by_date": {
                  "type": "boolean"
                },
                "required_expiration_date": {
                  "type": "boolean"
                },
                "required_manufactured_date": {
                  "type": "boolean"
                },
                "show_best_by_date": {
                  "type": "boolean"
                },
                "show_delivery_by_date": {
                  "type": "boolean"
                },
                "show_expiration_date": {
                  "type": "boolean"
                },
                "show_manufactured_date": {
                  "type": "boolean"
                },
                "show_on_pick_best_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_delivery_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_expiration_date": {
                  "type": "boolean"
                },
                "show_on_pick_manufactured_date": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
                  "type": "boolean"
                },
                "verification_best_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_delivery_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_expiration_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_manufactured_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "lot_creation",
                "mod_when",
                "mod_who",
                "required_best_by_date",
                "required_delivery_by_date",
                "required_expiration_date",
                "required_manufactured_date",
                "show_best_by_date",
                "show_delivery_by_date",
                "show_expiration_date",
                "show_manufactured_date",
                "show_on_pick_best_by_date",
                "show_on_pick_delivery_by_date",
                "show_on_pick_expiration_date",
                "show_on_pick_manufactured_date",
                "verification_best_by_date",
                "verification_delivery_by_date",
                "verification_expiration_date",
                "verification_manufactured_date",
                "version"
              ],
              "type": "object"
            },
            "LotPolicyAttribute": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "override_allowed": {
                  "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
                  "type": "boolean"
                },
                "physical_verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
                },
                "required": {
                  "type": "boolean"
                },
                "show": {
                  "type": "boolean"
                },
                "show_on_pick": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
                  "type": "boolean"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attrib_code",
                "id",
                "lot_policy_id",
                "mod_when",
                "mod_who",
                "override_allowed",
                "physical_verification",
                "required",
                "show",
                "show_on_pick"
              ],
              "type": "object"
            }
          },
          "properties": {
            "attributes": {
              "items": {
                "$ref": "#/definitions/LotPolicyAttribute"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/LotPolicy"
            }
          },
          "required": [
            "attributes",
            "policy"
          ],
          "title": "LotPolicyAggregateView",
          "type": "object"
        }
      },
      "summary": "Read a lot policy and all of its custom attributes as one configuration.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:58b6e24003e0777da8032e322909a6bd9b50af1f2c3c59551f6d1d4f599b2abf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_policy_config_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Nothing: a new-lot policy template depends on no argument.",
            "title": "LotPolicyConfigTemplateInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "additionalProperties": false,
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPolicyAttributeDraft": {
              "additionalProperties": false,
              "properties": {
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "default": null,
                  "description": "Existing row identity. `None` means add a new custom attribute.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "override_allowed": {
                  "type": "boolean"
                },
                "physical_verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "default": "NotVerifiable"
                },
                "required": {
                  "type": "boolean"
                },
                "show": {
                  "type": "boolean"
                },
                "show_on_pick": {
                  "default": false,
                  "description": "Optional on the wire, like the root's pick fields.",
                  "type": "boolean"
                }
              },
              "required": [
                "attrib_code",
                "override_allowed",
                "required",
                "show"
              ],
              "type": "object"
            },
            "LotPolicyRootDraft": {
              "additionalProperties": false,
              "properties": {
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_creation": {
                  "$ref": "#/definitions/LotCreationPolicy"
                },
                "required_best_by_date": {
                  "type": "boolean"
                },
                "required_delivery_by_date": {
                  "type": "boolean"
                },
                "required_expiration_date": {
                  "type": "boolean"
                },
                "required_manufactured_date": {
                  "type": "boolean"
                },
                "show_best_by_date": {
                  "type": "boolean"
                },
                "show_delivery_by_date": {
                  "type": "boolean"
                },
                "show_expiration_date": {
                  "type": "boolean"
                },
                "show_manufactured_date": {
                  "type": "boolean"
                },
                "show_on_pick_best_by_date": {
                  "default": false,
                  "type": "boolean"
                },
                "show_on_pick_delivery_by_date": {
                  "default": false,
                  "type": "boolean"
                },
                "show_on_pick_expiration_date": {
                  "default": false,
                  "type": "boolean"
                },
                "show_on_pick_manufactured_date": {
                  "default": false,
                  "type": "boolean"
                },
                "verification_best_by_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "default": "NotVerifiable"
                },
                "verification_delivery_by_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "default": "NotVerifiable"
                },
                "verification_expiration_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "default": "NotVerifiable"
                },
                "verification_manufactured_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "default": "NotVerifiable"
                }
              },
              "required": [
                "lot_creation",
                "required_best_by_date",
                "required_delivery_by_date",
                "required_expiration_date",
                "required_manufactured_date",
                "show_best_by_date",
                "show_delivery_by_date",
                "show_expiration_date",
                "show_manufactured_date"
              ],
              "type": "object"
            }
          },
          "properties": {
            "attributes": {
              "items": {
                "$ref": "#/definitions/LotPolicyAttributeDraft"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/LotPolicyRootDraft"
            }
          },
          "required": [
            "attributes",
            "policy"
          ],
          "title": "LotPolicyAggregateDraft",
          "type": "object"
        }
      },
      "summary": "The draft a new lot policy starts from.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:07e4c57005d2a832089064123d65e279de52374e6b2ad3f3de93bc9e493a1629",
      "x-quark-response-schema-hash": "sha256:d46ca1f7e5284d43562fda3b73e54f28bc1b019ac4f1c80cbcbdade1db4df815",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_lot_policy_attribute_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attrib_code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "override_allowed": {
              "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
              "type": "boolean"
            },
            "physical_verification": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
            },
            "required": {
              "type": "boolean"
            },
            "show": {
              "type": "boolean"
            },
            "show_on_pick": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
              "type": "boolean"
            },
            "version": {
              "description": "Version of the aggregate root read with this attribute.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attrib_code",
            "id",
            "lot_policy_id",
            "mod_when",
            "mod_who",
            "override_allowed",
            "physical_verification",
            "required",
            "show",
            "show_on_pick",
            "version"
          ],
          "title": "LotPolicyAttributeFormView",
          "type": "object"
        }
      },
      "summary": "Get one lot-policy attribute with its aggregate version.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:e96cda5d1add05c6185c78e4d7762d9bba5b931a34c100630a1b737bd8bd7e60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_policy_config_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "LotCreationPolicy": {
                "oneOf": [
                  {
                    "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                    "enum": [
                      "Existing"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                    "enum": [
                      "PerReceipt"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                    "enum": [
                      "PerReceiveEvent"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LotPhysicalVerification": {
                "oneOf": [
                  {
                    "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                    "enum": [
                      "NotVerifiable"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator compares the value printed on the goods with the card.",
                    "enum": [
                      "Visual"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The value is read from a barcode on the goods.",
                    "enum": [
                      "Barcode"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Either of the two.",
                    "enum": [
                      "VisualOrBarcode"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LotPolicyAggregateDraft": {
                "additionalProperties": false,
                "properties": {
                  "attributes": {
                    "items": {
                      "$ref": "#/definitions/LotPolicyAttributeDraft"
                    },
                    "type": "array"
                  },
                  "policy": {
                    "$ref": "#/definitions/LotPolicyRootDraft"
                  }
                },
                "required": [
                  "attributes",
                  "policy"
                ],
                "type": "object"
              },
              "LotPolicyAttributeDraft": {
                "additionalProperties": false,
                "properties": {
                  "attrib_code": {
                    "type": "string"
                  },
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "default": null,
                    "description": "Existing row identity. `None` means add a new custom attribute.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "label": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "override_allowed": {
                    "type": "boolean"
                  },
                  "physical_verification": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "show": {
                    "type": "boolean"
                  },
                  "show_on_pick": {
                    "default": false,
                    "description": "Optional on the wire, like the root's pick fields.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "attrib_code",
                  "override_allowed",
                  "required",
                  "show"
                ],
                "type": "object"
              },
              "LotPolicyRootDraft": {
                "additionalProperties": false,
                "properties": {
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_best_by_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_delivery_by_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_expiration_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_manufactured_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lot_creation": {
                    "$ref": "#/definitions/LotCreationPolicy"
                  },
                  "required_best_by_date": {
                    "type": "boolean"
                  },
                  "required_delivery_by_date": {
                    "type": "boolean"
                  },
                  "required_expiration_date": {
                    "type": "boolean"
                  },
                  "required_manufactured_date": {
                    "type": "boolean"
                  },
                  "show_best_by_date": {
                    "type": "boolean"
                  },
                  "show_delivery_by_date": {
                    "type": "boolean"
                  },
                  "show_expiration_date": {
                    "type": "boolean"
                  },
                  "show_manufactured_date": {
                    "type": "boolean"
                  },
                  "show_on_pick_best_by_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "show_on_pick_delivery_by_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "show_on_pick_expiration_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "show_on_pick_manufactured_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "verification_best_by_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "verification_delivery_by_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "verification_expiration_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "verification_manufactured_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  }
                },
                "required": [
                  "lot_creation",
                  "required_best_by_date",
                  "required_delivery_by_date",
                  "required_expiration_date",
                  "required_manufactured_date",
                  "show_best_by_date",
                  "show_delivery_by_date",
                  "show_expiration_date",
                  "show_manufactured_date"
                ],
                "type": "object"
              }
            },
            "properties": {
              "code": {
                "type": "string"
              },
              "data": {
                "$ref": "#/definitions/LotPolicyAggregateDraft"
              }
            },
            "required": [
              "code",
              "data"
            ],
            "title": "LotPolicyAggregateForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label_best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_creation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotCreationPolicy"
                    }
                  ],
                  "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_best_by_date": {
                  "type": "boolean"
                },
                "required_delivery_by_date": {
                  "type": "boolean"
                },
                "required_expiration_date": {
                  "type": "boolean"
                },
                "required_manufactured_date": {
                  "type": "boolean"
                },
                "show_best_by_date": {
                  "type": "boolean"
                },
                "show_delivery_by_date": {
                  "type": "boolean"
                },
                "show_expiration_date": {
                  "type": "boolean"
                },
                "show_manufactured_date": {
                  "type": "boolean"
                },
                "show_on_pick_best_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_delivery_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_expiration_date": {
                  "type": "boolean"
                },
                "show_on_pick_manufactured_date": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
                  "type": "boolean"
                },
                "verification_best_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_delivery_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_expiration_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_manufactured_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "lot_creation",
                "mod_when",
                "mod_who",
                "required_best_by_date",
                "required_delivery_by_date",
                "required_expiration_date",
                "required_manufactured_date",
                "show_best_by_date",
                "show_delivery_by_date",
                "show_expiration_date",
                "show_manufactured_date",
                "show_on_pick_best_by_date",
                "show_on_pick_delivery_by_date",
                "show_on_pick_expiration_date",
                "show_on_pick_manufactured_date",
                "verification_best_by_date",
                "verification_delivery_by_date",
                "verification_expiration_date",
                "verification_manufactured_date",
                "version"
              ],
              "type": "object"
            },
            "LotPolicyAttribute": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "override_allowed": {
                  "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
                  "type": "boolean"
                },
                "physical_verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
                },
                "required": {
                  "type": "boolean"
                },
                "show": {
                  "type": "boolean"
                },
                "show_on_pick": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
                  "type": "boolean"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attrib_code",
                "id",
                "lot_policy_id",
                "mod_when",
                "mod_who",
                "override_allowed",
                "physical_verification",
                "required",
                "show",
                "show_on_pick"
              ],
              "type": "object"
            }
          },
          "properties": {
            "attributes": {
              "items": {
                "$ref": "#/definitions/LotPolicyAttribute"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/LotPolicy"
            }
          },
          "required": [
            "attributes",
            "policy"
          ],
          "title": "LotPolicyAggregateView",
          "type": "object"
        }
      },
      "summary": "Create a complete lot-policy configuration atomically.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:651a2996fb4dbc31e6fc069cc2301dd77bfd694ceb83ee69beff4cfd0aafbeb9",
      "x-quark-response-schema-hash": "sha256:58b6e24003e0777da8032e322909a6bd9b50af1f2c3c59551f6d1d4f599b2abf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_policy_config_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "LotCreationPolicy": {
                "oneOf": [
                  {
                    "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                    "enum": [
                      "Existing"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                    "enum": [
                      "PerReceipt"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                    "enum": [
                      "PerReceiveEvent"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LotPhysicalVerification": {
                "oneOf": [
                  {
                    "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                    "enum": [
                      "NotVerifiable"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator compares the value printed on the goods with the card.",
                    "enum": [
                      "Visual"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The value is read from a barcode on the goods.",
                    "enum": [
                      "Barcode"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Either of the two.",
                    "enum": [
                      "VisualOrBarcode"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LotPolicyAttributeDraft": {
                "additionalProperties": false,
                "properties": {
                  "attrib_code": {
                    "type": "string"
                  },
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "default": null,
                    "description": "Existing row identity. `None` means add a new custom attribute.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "label": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "override_allowed": {
                    "type": "boolean"
                  },
                  "physical_verification": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "show": {
                    "type": "boolean"
                  },
                  "show_on_pick": {
                    "default": false,
                    "description": "Optional on the wire, like the root's pick fields.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "attrib_code",
                  "override_allowed",
                  "required",
                  "show"
                ],
                "type": "object"
              },
              "LotPolicyRootDraft": {
                "additionalProperties": false,
                "properties": {
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_best_by_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_delivery_by_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_expiration_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_manufactured_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lot_creation": {
                    "$ref": "#/definitions/LotCreationPolicy"
                  },
                  "required_best_by_date": {
                    "type": "boolean"
                  },
                  "required_delivery_by_date": {
                    "type": "boolean"
                  },
                  "required_expiration_date": {
                    "type": "boolean"
                  },
                  "required_manufactured_date": {
                    "type": "boolean"
                  },
                  "show_best_by_date": {
                    "type": "boolean"
                  },
                  "show_delivery_by_date": {
                    "type": "boolean"
                  },
                  "show_expiration_date": {
                    "type": "boolean"
                  },
                  "show_manufactured_date": {
                    "type": "boolean"
                  },
                  "show_on_pick_best_by_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "show_on_pick_delivery_by_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "show_on_pick_expiration_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "show_on_pick_manufactured_date": {
                    "default": false,
                    "type": "boolean"
                  },
                  "verification_best_by_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "verification_delivery_by_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "verification_expiration_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  },
                  "verification_manufactured_date": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      }
                    ],
                    "default": "NotVerifiable"
                  }
                },
                "required": [
                  "lot_creation",
                  "required_best_by_date",
                  "required_delivery_by_date",
                  "required_expiration_date",
                  "required_manufactured_date",
                  "show_best_by_date",
                  "show_delivery_by_date",
                  "show_expiration_date",
                  "show_manufactured_date"
                ],
                "type": "object"
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "additionalProperties": false,
                "definitions": {
                  "LotCreationPolicy": {
                    "oneOf": [
                      {
                        "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                        "enum": [
                          "Existing"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                        "enum": [
                          "PerReceipt"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                        "enum": [
                          "PerReceiveEvent"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "LotPhysicalVerification": {
                    "oneOf": [
                      {
                        "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                        "enum": [
                          "NotVerifiable"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The operator compares the value printed on the goods with the card.",
                        "enum": [
                          "Visual"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The value is read from a barcode on the goods.",
                        "enum": [
                          "Barcode"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Either of the two.",
                        "enum": [
                          "VisualOrBarcode"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "LotPolicyAttributeDraft": {
                    "additionalProperties": false,
                    "properties": {
                      "attrib_code": {
                        "type": "string"
                      },
                      "descr": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "default": null,
                        "description": "Existing row identity. `None` means add a new custom attribute.",
                        "format": "int64",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "label": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "override_allowed": {
                        "type": "boolean"
                      },
                      "physical_verification": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/LotPhysicalVerification"
                          }
                        ],
                        "default": "NotVerifiable"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "show": {
                        "type": "boolean"
                      },
                      "show_on_pick": {
                        "default": false,
                        "description": "Optional on the wire, like the root's pick fields.",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "attrib_code",
                      "override_allowed",
                      "required",
                      "show"
                    ],
                    "type": "object"
                  },
                  "LotPolicyRootDraft": {
                    "additionalProperties": false,
                    "properties": {
                      "descr": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "label_best_by_date": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "label_delivery_by_date": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "label_expiration_date": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "label_manufactured_date": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "lot_creation": {
                        "$ref": "#/definitions/LotCreationPolicy"
                      },
                      "required_best_by_date": {
                        "type": "boolean"
                      },
                      "required_delivery_by_date": {
                        "type": "boolean"
                      },
                      "required_expiration_date": {
                        "type": "boolean"
                      },
                      "required_manufactured_date": {
                        "type": "boolean"
                      },
                      "show_best_by_date": {
                        "type": "boolean"
                      },
                      "show_delivery_by_date": {
                        "type": "boolean"
                      },
                      "show_expiration_date": {
                        "type": "boolean"
                      },
                      "show_manufactured_date": {
                        "type": "boolean"
                      },
                      "show_on_pick_best_by_date": {
                        "default": false,
                        "type": "boolean"
                      },
                      "show_on_pick_delivery_by_date": {
                        "default": false,
                        "type": "boolean"
                      },
                      "show_on_pick_expiration_date": {
                        "default": false,
                        "type": "boolean"
                      },
                      "show_on_pick_manufactured_date": {
                        "default": false,
                        "type": "boolean"
                      },
                      "verification_best_by_date": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/LotPhysicalVerification"
                          }
                        ],
                        "default": "NotVerifiable"
                      },
                      "verification_delivery_by_date": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/LotPhysicalVerification"
                          }
                        ],
                        "default": "NotVerifiable"
                      },
                      "verification_expiration_date": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/LotPhysicalVerification"
                          }
                        ],
                        "default": "NotVerifiable"
                      },
                      "verification_manufactured_date": {
                        "allOf": [
                          {
                            "$ref": "#/definitions/LotPhysicalVerification"
                          }
                        ],
                        "default": "NotVerifiable"
                      }
                    },
                    "required": [
                      "lot_creation",
                      "required_best_by_date",
                      "required_delivery_by_date",
                      "required_expiration_date",
                      "required_manufactured_date",
                      "show_best_by_date",
                      "show_delivery_by_date",
                      "show_expiration_date",
                      "show_manufactured_date"
                    ],
                    "type": "object"
                  }
                },
                "properties": {
                  "attributes": {
                    "items": {
                      "$ref": "#/definitions/LotPolicyAttributeDraft"
                    },
                    "type": "array"
                  },
                  "policy": {
                    "$ref": "#/definitions/LotPolicyRootDraft"
                  }
                },
                "required": [
                  "attributes",
                  "policy"
                ],
                "title": "LotPolicyAggregateDraft",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label_best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label_manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_creation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotCreationPolicy"
                    }
                  ],
                  "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_best_by_date": {
                  "type": "boolean"
                },
                "required_delivery_by_date": {
                  "type": "boolean"
                },
                "required_expiration_date": {
                  "type": "boolean"
                },
                "required_manufactured_date": {
                  "type": "boolean"
                },
                "show_best_by_date": {
                  "type": "boolean"
                },
                "show_delivery_by_date": {
                  "type": "boolean"
                },
                "show_expiration_date": {
                  "type": "boolean"
                },
                "show_manufactured_date": {
                  "type": "boolean"
                },
                "show_on_pick_best_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_delivery_by_date": {
                  "type": "boolean"
                },
                "show_on_pick_expiration_date": {
                  "type": "boolean"
                },
                "show_on_pick_manufactured_date": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
                  "type": "boolean"
                },
                "verification_best_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_delivery_by_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_expiration_date": {
                  "$ref": "#/definitions/LotPhysicalVerification"
                },
                "verification_manufactured_date": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "lot_creation",
                "mod_when",
                "mod_who",
                "required_best_by_date",
                "required_delivery_by_date",
                "required_expiration_date",
                "required_manufactured_date",
                "show_best_by_date",
                "show_delivery_by_date",
                "show_expiration_date",
                "show_manufactured_date",
                "show_on_pick_best_by_date",
                "show_on_pick_delivery_by_date",
                "show_on_pick_expiration_date",
                "show_on_pick_manufactured_date",
                "verification_best_by_date",
                "verification_delivery_by_date",
                "verification_expiration_date",
                "verification_manufactured_date",
                "version"
              ],
              "type": "object"
            },
            "LotPolicyAttribute": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "override_allowed": {
                  "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
                  "type": "boolean"
                },
                "physical_verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
                },
                "required": {
                  "type": "boolean"
                },
                "show": {
                  "type": "boolean"
                },
                "show_on_pick": {
                  "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
                  "type": "boolean"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attrib_code",
                "id",
                "lot_policy_id",
                "mod_when",
                "mod_who",
                "override_allowed",
                "physical_verification",
                "required",
                "show",
                "show_on_pick"
              ],
              "type": "object"
            }
          },
          "properties": {
            "attributes": {
              "items": {
                "$ref": "#/definitions/LotPolicyAttribute"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/LotPolicy"
            }
          },
          "required": [
            "attributes",
            "policy"
          ],
          "title": "LotPolicyAggregateView",
          "type": "object"
        }
      },
      "summary": "Save a complete lot-policy configuration without overwriting a newer edit.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:457a92b0ad11076a6004dda84f06f2e466f73dbc0445dd15157c1fb262611b9f",
      "x-quark-response-schema-hash": "sha256:58b6e24003e0777da8032e322909a6bd9b50af1f2c3c59551f6d1d4f599b2abf",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_lot_policy_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LotCreationPolicy": {
                "oneOf": [
                  {
                    "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                    "enum": [
                      "Existing"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                    "enum": [
                      "PerReceipt"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                    "enum": [
                      "PerReceiveEvent"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LotPhysicalVerification": {
                "oneOf": [
                  {
                    "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                    "enum": [
                      "NotVerifiable"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator compares the value printed on the goods with the card.",
                    "enum": [
                      "Visual"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The value is read from a barcode on the goods.",
                    "enum": [
                      "Barcode"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Either of the two.",
                    "enum": [
                      "VisualOrBarcode"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "code": {
                "type": "string"
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label_best_by_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label_delivery_by_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label_expiration_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label_manufactured_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot_creation": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LotCreationPolicy"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "required_best_by_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "required_delivery_by_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "required_expiration_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "required_manufactured_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_best_by_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_delivery_by_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_expiration_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_manufactured_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_on_pick_best_by_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_on_pick_delivery_by_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_on_pick_expiration_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "show_on_pick_manufactured_date": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "verification_best_by_date": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LotPhysicalVerification"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verification_delivery_by_date": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LotPhysicalVerification"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verification_expiration_date": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LotPhysicalVerification"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verification_manufactured_date": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LotPhysicalVerification"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "LotPolicyForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label_best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_creation": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotCreationPolicy"
                }
              ],
              "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "required_best_by_date": {
              "type": "boolean"
            },
            "required_delivery_by_date": {
              "type": "boolean"
            },
            "required_expiration_date": {
              "type": "boolean"
            },
            "required_manufactured_date": {
              "type": "boolean"
            },
            "show_best_by_date": {
              "type": "boolean"
            },
            "show_delivery_by_date": {
              "type": "boolean"
            },
            "show_expiration_date": {
              "type": "boolean"
            },
            "show_manufactured_date": {
              "type": "boolean"
            },
            "show_on_pick_best_by_date": {
              "type": "boolean"
            },
            "show_on_pick_delivery_by_date": {
              "type": "boolean"
            },
            "show_on_pick_expiration_date": {
              "type": "boolean"
            },
            "show_on_pick_manufactured_date": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
              "type": "boolean"
            },
            "verification_best_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_delivery_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_expiration_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_manufactured_date": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "lot_creation",
            "mod_when",
            "mod_who",
            "required_best_by_date",
            "required_delivery_by_date",
            "required_expiration_date",
            "required_manufactured_date",
            "show_best_by_date",
            "show_delivery_by_date",
            "show_expiration_date",
            "show_manufactured_date",
            "show_on_pick_best_by_date",
            "show_on_pick_delivery_by_date",
            "show_on_pick_expiration_date",
            "show_on_pick_manufactured_date",
            "verification_best_by_date",
            "verification_delivery_by_date",
            "verification_expiration_date",
            "verification_manufactured_date",
            "version"
          ],
          "title": "LotPolicy",
          "type": "object"
        }
      },
      "summary": "Create a lot policy from the metadata form.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:320b52c990fd50a3c70ab074ffc86e407e155947636e43e7dbbf76642a78ae45",
      "x-quark-response-schema-hash": "sha256:ea8a74d254f10d84bced832f76d6c8fe6bc12956bed8a0bee6b29147a6e367b4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_lot_policy_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "LotCreationPolicy": {
                "oneOf": [
                  {
                    "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                    "enum": [
                      "Existing"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                    "enum": [
                      "PerReceipt"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                    "enum": [
                      "PerReceiveEvent"
                    ],
                    "type": "string"
                  }
                ]
              },
              "LotPhysicalVerification": {
                "oneOf": [
                  {
                    "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                    "enum": [
                      "NotVerifiable"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator compares the value printed on the goods with the card.",
                    "enum": [
                      "Visual"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The value is read from a barcode on the goods.",
                    "enum": [
                      "Barcode"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Either of the two.",
                    "enum": [
                      "VisualOrBarcode"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "definitions": {
                  "LotCreationPolicy": {
                    "oneOf": [
                      {
                        "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                        "enum": [
                          "Existing"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                        "enum": [
                          "PerReceipt"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                        "enum": [
                          "PerReceiveEvent"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "LotPhysicalVerification": {
                    "oneOf": [
                      {
                        "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                        "enum": [
                          "NotVerifiable"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The operator compares the value printed on the goods with the card.",
                        "enum": [
                          "Visual"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The value is read from a barcode on the goods.",
                        "enum": [
                          "Barcode"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Either of the two.",
                        "enum": [
                          "VisualOrBarcode"
                        ],
                        "type": "string"
                      }
                    ]
                  }
                },
                "properties": {
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_best_by_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_delivery_by_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_expiration_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label_manufactured_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lot_creation": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/LotCreationPolicy"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "required_best_by_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "required_delivery_by_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "required_expiration_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "required_manufactured_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_best_by_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_delivery_by_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_expiration_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_manufactured_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_on_pick_best_by_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_on_pick_delivery_by_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_on_pick_expiration_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_on_pick_manufactured_date": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "verification_best_by_date": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification_delivery_by_date": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification_expiration_date": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "verification_manufactured_date": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "title": "LotPolicyForUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotCreationPolicy": {
              "oneOf": [
                {
                  "description": "Как было до миграции 351: искать партию по атрибутам, и завести новую только если ничего не подошло. Два физически разных прихода с одинаковыми атрибутами попадают в ОДНУ партию.",
                  "enum": [
                    "Existing"
                  ],
                  "type": "string"
                },
                {
                  "description": "Одна партия на приёмку: все приёмы одного документа кладутся в неё.",
                  "enum": [
                    "PerReceipt"
                  ],
                  "type": "string"
                },
                {
                  "description": "Своя партия на КАЖДЫЙ физический приход. Остатки разных приходов не сольются: партия входит в ключ слияния наравне с владельцем, товаром, упаковкой, единицей, ячейкой и контейнером.",
                  "enum": [
                    "PerReceiveEvent"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label_best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "label_manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_creation": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotCreationPolicy"
                }
              ],
              "description": "КОГДА рождается новая партия (миграция 351).\n\nЭто единственное место, где такое решение записано. До 351 его не принимал никто: партия бралась по совпадению атрибутов, и совпадение молча означало «это тот же товар из того же прихода»."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "required_best_by_date": {
              "type": "boolean"
            },
            "required_delivery_by_date": {
              "type": "boolean"
            },
            "required_expiration_date": {
              "type": "boolean"
            },
            "required_manufactured_date": {
              "type": "boolean"
            },
            "show_best_by_date": {
              "type": "boolean"
            },
            "show_delivery_by_date": {
              "type": "boolean"
            },
            "show_expiration_date": {
              "type": "boolean"
            },
            "show_manufactured_date": {
              "type": "boolean"
            },
            "show_on_pick_best_by_date": {
              "type": "boolean"
            },
            "show_on_pick_delivery_by_date": {
              "type": "boolean"
            },
            "show_on_pick_expiration_date": {
              "type": "boolean"
            },
            "show_on_pick_manufactured_date": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Only a date captured on receipt can be shown: `chk_lot_policy_pick_dates_need_receipt`.",
              "type": "boolean"
            },
            "verification_best_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_delivery_by_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_expiration_date": {
              "$ref": "#/definitions/LotPhysicalVerification"
            },
            "verification_manufactured_date": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the date on the goods. Anything but `NotVerifiable` needs the date shown on pick: `chk_lot_policy_verified_dates_are_shown`."
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "lot_creation",
            "mod_when",
            "mod_who",
            "required_best_by_date",
            "required_delivery_by_date",
            "required_expiration_date",
            "required_manufactured_date",
            "show_best_by_date",
            "show_delivery_by_date",
            "show_expiration_date",
            "show_manufactured_date",
            "show_on_pick_best_by_date",
            "show_on_pick_delivery_by_date",
            "show_on_pick_expiration_date",
            "show_on_pick_manufactured_date",
            "verification_best_by_date",
            "verification_delivery_by_date",
            "verification_expiration_date",
            "verification_manufactured_date",
            "version"
          ],
          "title": "LotPolicy",
          "type": "object"
        }
      },
      "summary": "Update lot-policy settings from the metadata form.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2cf3b222d247f94fcc3334ab0de67b9a540e83c8cbf30e20a29fd6c45c106b43",
      "x-quark-response-schema-hash": "sha256:ea8a74d254f10d84bced832f76d6c8fe6bc12956bed8a0bee6b29147a6e367b4",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_lot_policy_attribute_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LotPhysicalVerification": {
                "oneOf": [
                  {
                    "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                    "enum": [
                      "NotVerifiable"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator compares the value printed on the goods with the card.",
                    "enum": [
                      "Visual"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The value is read from a barcode on the goods.",
                    "enum": [
                      "Barcode"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Either of the two.",
                    "enum": [
                      "VisualOrBarcode"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "attrib_code": {
                "type": "string"
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot_policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "override_allowed": {
                "type": "boolean"
              },
              "physical_verification": {
                "$ref": "#/definitions/LotPhysicalVerification"
              },
              "required": {
                "type": "boolean"
              },
              "show": {
                "type": "boolean"
              },
              "show_on_pick": {
                "type": "boolean"
              }
            },
            "required": [
              "attrib_code",
              "lot_policy_id",
              "override_allowed",
              "physical_verification",
              "required",
              "show",
              "show_on_pick"
            ],
            "title": "LotPolicyAttributesForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attrib_code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "override_allowed": {
              "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
              "type": "boolean"
            },
            "physical_verification": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
            },
            "required": {
              "type": "boolean"
            },
            "show": {
              "type": "boolean"
            },
            "show_on_pick": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
              "type": "boolean"
            },
            "version": {
              "description": "Version of the aggregate root read with this attribute.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attrib_code",
            "id",
            "lot_policy_id",
            "mod_when",
            "mod_who",
            "override_allowed",
            "physical_verification",
            "required",
            "show",
            "show_on_pick",
            "version"
          ],
          "title": "LotPolicyAttributeFormView",
          "type": "object"
        }
      },
      "summary": "Add one custom attribute through the metadata form.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:527aff5d00b442d982b60529515d81295aa8ee882478ad262412a500303ef289",
      "x-quark-response-schema-hash": "sha256:e96cda5d1add05c6185c78e4d7762d9bba5b931a34c100630a1b737bd8bd7e60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_lot_policy_attribute_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "LotPhysicalVerification": {
                "oneOf": [
                  {
                    "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                    "enum": [
                      "NotVerifiable"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator compares the value printed on the goods with the card.",
                    "enum": [
                      "Visual"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The value is read from a barcode on the goods.",
                    "enum": [
                      "Barcode"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Either of the two.",
                    "enum": [
                      "VisualOrBarcode"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "definitions": {
                  "LotPhysicalVerification": {
                    "oneOf": [
                      {
                        "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                        "enum": [
                          "NotVerifiable"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The operator compares the value printed on the goods with the card.",
                        "enum": [
                          "Visual"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "The value is read from a barcode on the goods.",
                        "enum": [
                          "Barcode"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Either of the two.",
                        "enum": [
                          "VisualOrBarcode"
                        ],
                        "type": "string"
                      }
                    ]
                  }
                },
                "properties": {
                  "attrib_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "label": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "override_allowed": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "physical_verification": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/LotPhysicalVerification"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "required": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "show_on_pick": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "title": "LotPolicyAttributesForUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attrib_code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "override_allowed": {
              "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
              "type": "boolean"
            },
            "physical_verification": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
            },
            "required": {
              "type": "boolean"
            },
            "show": {
              "type": "boolean"
            },
            "show_on_pick": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
              "type": "boolean"
            },
            "version": {
              "description": "Version of the aggregate root read with this attribute.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attrib_code",
            "id",
            "lot_policy_id",
            "mod_when",
            "mod_who",
            "override_allowed",
            "physical_verification",
            "required",
            "show",
            "show_on_pick",
            "version"
          ],
          "title": "LotPolicyAttributeFormView",
          "type": "object"
        }
      },
      "summary": "Update one custom lot-policy attribute through the metadata form.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a176d89e4ac066ad535609f9b59592142cb4894ff8c4301da1fdd8e31044f3a8",
      "x-quark-response-schema-hash": "sha256:e96cda5d1add05c6185c78e4d7762d9bba5b931a34c100630a1b737bd8bd7e60",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "delete_lot_policy_attribute_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attrib_code": {
              "type": "string"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "override_allowed": {
              "description": "Phase 1 (migration 083). Per Decisions Log D-27.",
              "type": "boolean"
            },
            "physical_verification": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotPhysicalVerification"
                }
              ],
              "description": "How the operator can check the value on the goods. Anything but `NotVerifiable` needs `show_on_pick`: `chk_lot_policy_attribute_verified_is_shown`."
            },
            "required": {
              "type": "boolean"
            },
            "show": {
              "type": "boolean"
            },
            "show_on_pick": {
              "description": "Shown on the pick card (spec 2026-10-04 §8). Needs `show`: `chk_lot_policy_attribute_pick_needs_receipt`.",
              "type": "boolean"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attrib_code",
            "id",
            "lot_policy_id",
            "mod_when",
            "mod_who",
            "override_allowed",
            "physical_verification",
            "required",
            "show",
            "show_on_pick"
          ],
          "title": "LotPolicyAttribute",
          "type": "object"
        }
      },
      "summary": "Delete one custom attribute through the metadata form.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b1f164ad1503bc8e585a54efa5a7bfc78c025151c48980e89cc68cea14f5566a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_lot_policy_attribute_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete selected custom attributes through the metadata list.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "AllowError": {
                "enum": [
                  "Allow",
                  "HardError",
                  "Warning"
                ],
                "type": "string"
              }
            },
            "properties": {
              "asn_po_qty_discrepancy": {
                "$ref": "#/definitions/AllowError"
              },
              "code": {
                "type": "string"
              },
              "date_deviation_check": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AllowError"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "excess_error": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "excess_error_percent": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "excess_message": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "excess_override": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "excess_override_percent": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "no_sku_on_asn": {
                "$ref": "#/definitions/AllowError"
              },
              "no_sku_on_po": {
                "$ref": "#/definitions/AllowError"
              },
              "po_excess_error": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "po_excess_error_percent": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "po_excess_message": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "po_excess_override": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "po_excess_override_percent": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "po_qty_validation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "po_shortage_message": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "po_shortage_override": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "po_shortage_override_percent": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty_pack_multiple_check": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AllowError"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "qty_validation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_without_asn": {
                "$ref": "#/definitions/AllowError"
              },
              "receipt_without_lpn": {
                "$ref": "#/definitions/AllowError"
              },
              "receipt_without_po": {
                "$ref": "#/definitions/AllowError"
              },
              "shortage_message": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "shortage_override": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "shortage_override_percent": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "asn_po_qty_discrepancy",
              "code",
              "no_sku_on_asn",
              "no_sku_on_po",
              "receipt_without_asn",
              "receipt_without_lpn",
              "receipt_without_po"
            ],
            "title": "ReceiptPolicyForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "asn_po_qty_discrepancy": {
              "$ref": "#/definitions/AllowError"
            },
            "code": {
              "type": "string"
            },
            "date_deviation_check": {
              "$ref": "#/definitions/AllowError"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "excess_error": {
              "type": "boolean"
            },
            "excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "excess_message": {
              "type": "boolean"
            },
            "excess_override": {
              "type": "boolean"
            },
            "excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "no_sku_on_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "no_sku_on_po": {
              "$ref": "#/definitions/AllowError"
            },
            "po_excess_error": {
              "type": "boolean"
            },
            "po_excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_excess_message": {
              "type": "boolean"
            },
            "po_excess_override": {
              "type": "boolean"
            },
            "po_excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_qty_validation": {
              "type": "string"
            },
            "po_shortage_message": {
              "type": "boolean"
            },
            "po_shortage_override": {
              "type": "boolean"
            },
            "po_shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_pack_multiple_check": {
              "$ref": "#/definitions/AllowError"
            },
            "qty_validation": {
              "type": "string"
            },
            "receipt_without_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_lpn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_po": {
              "$ref": "#/definitions/AllowError"
            },
            "shortage_message": {
              "type": "boolean"
            },
            "shortage_override": {
              "type": "boolean"
            },
            "shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "asn_po_qty_discrepancy",
            "code",
            "date_deviation_check",
            "excess_error",
            "excess_message",
            "excess_override",
            "id",
            "mod_when",
            "mod_who",
            "no_sku_on_asn",
            "no_sku_on_po",
            "po_excess_error",
            "po_excess_message",
            "po_excess_override",
            "po_qty_validation",
            "po_shortage_message",
            "po_shortage_override",
            "qty_pack_multiple_check",
            "qty_validation",
            "receipt_without_asn",
            "receipt_without_lpn",
            "receipt_without_po",
            "shortage_message",
            "shortage_override",
            "version"
          ],
          "title": "ReceiptPolicy",
          "type": "object"
        }
      },
      "summary": "Create a complete receipt-policy configuration.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e51d83e8ffbffc781054e9cba654457afaa262f83220e503236e0b836dee4e64",
      "x-quark-response-schema-hash": "sha256:292ec5d02ed97cad86a32e001bb428097c65a950405cc707911387f6f7339bed",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "asn_po_qty_discrepancy": {
              "$ref": "#/definitions/AllowError"
            },
            "code": {
              "type": "string"
            },
            "date_deviation_check": {
              "$ref": "#/definitions/AllowError"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "excess_error": {
              "type": "boolean"
            },
            "excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "excess_message": {
              "type": "boolean"
            },
            "excess_override": {
              "type": "boolean"
            },
            "excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "no_sku_on_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "no_sku_on_po": {
              "$ref": "#/definitions/AllowError"
            },
            "po_excess_error": {
              "type": "boolean"
            },
            "po_excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_excess_message": {
              "type": "boolean"
            },
            "po_excess_override": {
              "type": "boolean"
            },
            "po_excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_qty_validation": {
              "type": "string"
            },
            "po_shortage_message": {
              "type": "boolean"
            },
            "po_shortage_override": {
              "type": "boolean"
            },
            "po_shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_pack_multiple_check": {
              "$ref": "#/definitions/AllowError"
            },
            "qty_validation": {
              "type": "string"
            },
            "receipt_without_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_lpn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_po": {
              "$ref": "#/definitions/AllowError"
            },
            "shortage_message": {
              "type": "boolean"
            },
            "shortage_override": {
              "type": "boolean"
            },
            "shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "asn_po_qty_discrepancy",
            "code",
            "date_deviation_check",
            "excess_error",
            "excess_message",
            "excess_override",
            "id",
            "mod_when",
            "mod_who",
            "no_sku_on_asn",
            "no_sku_on_po",
            "po_excess_error",
            "po_excess_message",
            "po_excess_override",
            "po_qty_validation",
            "po_shortage_message",
            "po_shortage_override",
            "qty_pack_multiple_check",
            "qty_validation",
            "receipt_without_asn",
            "receipt_without_lpn",
            "receipt_without_po",
            "shortage_message",
            "shortage_override",
            "version"
          ],
          "title": "ReceiptPolicy",
          "type": "object"
        }
      },
      "summary": "Get a receipt_policy by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:292ec5d02ed97cad86a32e001bb428097c65a950405cc707911387f6f7339bed",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "ReceiptPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "asn_po_qty_discrepancy": {
                  "$ref": "#/definitions/AllowError"
                },
                "code": {
                  "type": "string"
                },
                "date_deviation_check": {
                  "$ref": "#/definitions/AllowError"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "excess_error": {
                  "type": "boolean"
                },
                "excess_error_percent": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "excess_message": {
                  "type": "boolean"
                },
                "excess_override": {
                  "type": "boolean"
                },
                "excess_override_percent": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "no_sku_on_asn": {
                  "$ref": "#/definitions/AllowError"
                },
                "no_sku_on_po": {
                  "$ref": "#/definitions/AllowError"
                },
                "po_excess_error": {
                  "type": "boolean"
                },
                "po_excess_error_percent": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_excess_message": {
                  "type": "boolean"
                },
                "po_excess_override": {
                  "type": "boolean"
                },
                "po_excess_override_percent": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_qty_validation": {
                  "type": "string"
                },
                "po_shortage_message": {
                  "type": "boolean"
                },
                "po_shortage_override": {
                  "type": "boolean"
                },
                "po_shortage_override_percent": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "qty_pack_multiple_check": {
                  "$ref": "#/definitions/AllowError"
                },
                "qty_validation": {
                  "type": "string"
                },
                "receipt_without_asn": {
                  "$ref": "#/definitions/AllowError"
                },
                "receipt_without_lpn": {
                  "$ref": "#/definitions/AllowError"
                },
                "receipt_without_po": {
                  "$ref": "#/definitions/AllowError"
                },
                "shortage_message": {
                  "type": "boolean"
                },
                "shortage_override": {
                  "type": "boolean"
                },
                "shortage_override_percent": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "asn_po_qty_discrepancy",
                "code",
                "date_deviation_check",
                "excess_error",
                "excess_message",
                "excess_override",
                "id",
                "mod_when",
                "mod_who",
                "no_sku_on_asn",
                "no_sku_on_po",
                "po_excess_error",
                "po_excess_message",
                "po_excess_override",
                "po_qty_validation",
                "po_shortage_message",
                "po_shortage_override",
                "qty_pack_multiple_check",
                "qty_validation",
                "receipt_without_asn",
                "receipt_without_lpn",
                "receipt_without_po",
                "shortage_message",
                "shortage_override",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptPolicy"
          },
          "title": "Array_of_ReceiptPolicy",
          "type": "array"
        }
      },
      "summary": "List receipt_policy — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:78fd7dd08adf32b15a50857be8a63a28965d0408fa6d4cf1d5a5df8e7657b40d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "additionalProperties": false,
                "description": "Partial edit of the receipt-policy configuration.\n\n`code` is deliberately absent because it identifies the policy. Nullable text and percentages keep omitted/clear/set distinct; every other field rejects JSON null.",
                "properties": {
                  "asn_po_qty_discrepancy": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "date_deviation_check": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "excess_error": {
                    "type": "boolean"
                  },
                  "excess_error_percent": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "excess_message": {
                    "type": "boolean"
                  },
                  "excess_override": {
                    "type": "boolean"
                  },
                  "excess_override_percent": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "no_sku_on_asn": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "no_sku_on_po": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "po_excess_error": {
                    "type": "boolean"
                  },
                  "po_excess_error_percent": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "po_excess_message": {
                    "type": "boolean"
                  },
                  "po_excess_override": {
                    "type": "boolean"
                  },
                  "po_excess_override_percent": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "po_qty_validation": {
                    "type": "string"
                  },
                  "po_shortage_message": {
                    "type": "boolean"
                  },
                  "po_shortage_override": {
                    "type": "boolean"
                  },
                  "po_shortage_override_percent": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "qty_pack_multiple_check": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "qty_validation": {
                    "type": "string"
                  },
                  "receipt_without_asn": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "receipt_without_lpn": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "receipt_without_po": {
                    "enum": [
                      "Allow",
                      "HardError",
                      "Warning"
                    ],
                    "type": "string"
                  },
                  "shortage_message": {
                    "type": "boolean"
                  },
                  "shortage_override": {
                    "type": "boolean"
                  },
                  "shortage_override_percent": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                },
                "title": "ReceiptPolicyConfigUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "asn_po_qty_discrepancy": {
              "$ref": "#/definitions/AllowError"
            },
            "code": {
              "type": "string"
            },
            "date_deviation_check": {
              "$ref": "#/definitions/AllowError"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "excess_error": {
              "type": "boolean"
            },
            "excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "excess_message": {
              "type": "boolean"
            },
            "excess_override": {
              "type": "boolean"
            },
            "excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "no_sku_on_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "no_sku_on_po": {
              "$ref": "#/definitions/AllowError"
            },
            "po_excess_error": {
              "type": "boolean"
            },
            "po_excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_excess_message": {
              "type": "boolean"
            },
            "po_excess_override": {
              "type": "boolean"
            },
            "po_excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_qty_validation": {
              "type": "string"
            },
            "po_shortage_message": {
              "type": "boolean"
            },
            "po_shortage_override": {
              "type": "boolean"
            },
            "po_shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_pack_multiple_check": {
              "$ref": "#/definitions/AllowError"
            },
            "qty_validation": {
              "type": "string"
            },
            "receipt_without_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_lpn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_po": {
              "$ref": "#/definitions/AllowError"
            },
            "shortage_message": {
              "type": "boolean"
            },
            "shortage_override": {
              "type": "boolean"
            },
            "shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "asn_po_qty_discrepancy",
            "code",
            "date_deviation_check",
            "excess_error",
            "excess_message",
            "excess_override",
            "id",
            "mod_when",
            "mod_who",
            "no_sku_on_asn",
            "no_sku_on_po",
            "po_excess_error",
            "po_excess_message",
            "po_excess_override",
            "po_qty_validation",
            "po_shortage_message",
            "po_shortage_override",
            "qty_pack_multiple_check",
            "qty_validation",
            "receipt_without_asn",
            "receipt_without_lpn",
            "receipt_without_po",
            "shortage_message",
            "shortage_override",
            "version"
          ],
          "title": "ReceiptPolicy",
          "type": "object"
        }
      },
      "summary": "Update a receipt policy without overwriting a newer configuration.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1d631c864a214125ddfefd9199d38ea514a47a580716eb29be516cee1842026c",
      "x-quark-response-schema-hash": "sha256:292ec5d02ed97cad86a32e001bb428097c65a950405cc707911387f6f7339bed",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "receipt_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "delete_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "asn_po_qty_discrepancy": {
              "$ref": "#/definitions/AllowError"
            },
            "code": {
              "type": "string"
            },
            "date_deviation_check": {
              "$ref": "#/definitions/AllowError"
            },
            "descr": {
              "type": [
                "string",
                "null"
              ]
            },
            "excess_error": {
              "type": "boolean"
            },
            "excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "excess_message": {
              "type": "boolean"
            },
            "excess_override": {
              "type": "boolean"
            },
            "excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "no_sku_on_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "no_sku_on_po": {
              "$ref": "#/definitions/AllowError"
            },
            "po_excess_error": {
              "type": "boolean"
            },
            "po_excess_error_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_excess_message": {
              "type": "boolean"
            },
            "po_excess_override": {
              "type": "boolean"
            },
            "po_excess_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_qty_validation": {
              "type": "string"
            },
            "po_shortage_message": {
              "type": "boolean"
            },
            "po_shortage_override": {
              "type": "boolean"
            },
            "po_shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_pack_multiple_check": {
              "$ref": "#/definitions/AllowError"
            },
            "qty_validation": {
              "type": "string"
            },
            "receipt_without_asn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_lpn": {
              "$ref": "#/definitions/AllowError"
            },
            "receipt_without_po": {
              "$ref": "#/definitions/AllowError"
            },
            "shortage_message": {
              "type": "boolean"
            },
            "shortage_override": {
              "type": "boolean"
            },
            "shortage_override_percent": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "asn_po_qty_discrepancy",
            "code",
            "date_deviation_check",
            "excess_error",
            "excess_message",
            "excess_override",
            "id",
            "mod_when",
            "mod_who",
            "no_sku_on_asn",
            "no_sku_on_po",
            "po_excess_error",
            "po_excess_message",
            "po_excess_override",
            "po_qty_validation",
            "po_shortage_message",
            "po_shortage_override",
            "qty_pack_multiple_check",
            "qty_validation",
            "receipt_without_asn",
            "receipt_without_lpn",
            "receipt_without_po",
            "shortage_message",
            "shortage_override",
            "version"
          ],
          "title": "ReceiptPolicy",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced receipt-policy configuration.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:292ec5d02ed97cad86a32e001bb428097c65a950405cc707911387f6f7339bed",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete unreferenced receipt-policy configurations.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_receipt_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count receipt_policy — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "receipt_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AllowError": {
                "enum": [
                  "Allow",
                  "HardError",
                  "Warning"
                ],
                "type": "string"
              },
              "InventoryTrackingGranularity": {
                "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
                "enum": [
                  "Aggregate",
                  "Pallet",
                  "Case"
                ],
                "type": "string"
              },
              "ReceiptStatus": {
                "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
                "enum": [
                  "Open",
                  "InProgress",
                  "OnHold",
                  "Closed",
                  "Cancelled"
                ],
                "type": "string"
              },
              "ReceiptType": {
                "oneOf": [
                  {
                    "enum": [
                      "Normal",
                      "CustomerReturn",
                      "Sscc",
                      "CaseLevel"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Receiving Without ASN, assigned by the server.",
                    "enum": [
                      "NoAsn"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Goods arriving from another facility of the same company.",
                    "enum": [
                      "InterFacilityTransfer"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "actual_ship_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "arrival_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "close_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "door": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "driver_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "effective_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_receipt_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inventory_tracking_granularity": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryTrackingGranularity"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ADR-046 D-69b — set by `CreateCaseLevelAsn` from the cascade (ASN payload || operator UI || owner_config default || `Aggregate`). NULL here means \"let the SQL DEFAULT 'Aggregate' apply\"."
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "planned_ship_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "po_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "promised_ship_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_number": {
                "type": "string"
              },
              "receipt_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ReceiptType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rma": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scheduled_ship_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ReceiptStatus"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_volume": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "trailer_plate": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trailer_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "unplanned_case_on_asn": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AllowError"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ADR-046 OQ-03 — set by `CreateCaseLevelAsn` from the cascade when granularity != Aggregate. Hard-error at the command layer when granularity != Aggregate AND value remains None."
              },
              "vehicle_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "vehicle_plate": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "owner_id",
              "receipt_number"
            ],
            "title": "ReceiptForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
          "properties": {
            "actual_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "arrival_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "cancel_summary": {
              "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "close_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "close_summary": {
              "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
            },
            "door": {
              "type": [
                "string",
                "null"
              ]
            },
            "driver_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "expected_receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                }
              ],
              "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "planned_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "promised_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "scheduled_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "supplier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_volume": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "trailer_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "trailer_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
            },
            "vehicle_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "vehicle_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "id",
            "inventory_tracking_granularity",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_number",
            "receipt_type",
            "status",
            "version"
          ],
          "title": "General Receipt model",
          "type": "object"
        }
      },
      "summary": "Create a new receipt — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b8bdd5bbfa70002c36cd8d9678c098f23657180a25d2255df04b409a7d21ba6f",
      "x-quark-response-schema-hash": "sha256:77fa07f2356d6c2eb3368d686cdd1629575ee2e3109d5cb2fc9aaa305bcca43d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
          "properties": {
            "actual_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "arrival_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "cancel_summary": {
              "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "close_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "close_summary": {
              "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
            },
            "door": {
              "type": [
                "string",
                "null"
              ]
            },
            "driver_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "expected_receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                }
              ],
              "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "planned_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "promised_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "scheduled_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "supplier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_volume": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "trailer_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "trailer_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
            },
            "vehicle_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "vehicle_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "id",
            "inventory_tracking_granularity",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_number",
            "receipt_type",
            "status",
            "version"
          ],
          "title": "General Receipt model",
          "type": "object"
        }
      },
      "summary": "Get a receipt by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:77fa07f2356d6c2eb3368d686cdd1629575ee2e3109d5cb2fc9aaa305bcca43d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "Receipt": {
              "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
              "properties": {
                "actual_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "arrival_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancel_summary": {
                  "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_summary": {
                  "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
                },
                "door": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_tracking_granularity": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    }
                  ],
                  "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "promised_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "supplier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_volume": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trailer_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trailer_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
                },
                "vehicle_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vehicle_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "id",
                "inventory_tracking_granularity",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_number",
                "receipt_type",
                "status",
                "version"
              ],
              "title": "General Receipt model",
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Receipt"
          },
          "title": "Array_of_Receipt",
          "type": "array"
        }
      },
      "summary": "List receipt — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:a64a5822e27c60e29e1679a348cd0e7babf219cb81cfa5386ec2c2e17a00f509",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "What a client may change on a receipt header: reference, party and planning data, and nothing the receipt is judged by.\n\nDeliberately NOT [`ReceiptForUpdate`]. That struct carries `status`, `completion`, `close_summary` and `cancel_summary` — correctly, because Close, Cancel, PutOnHold and ReleaseFromHold write them — and handing it to the wire turned the generic CRUD update into a second, unguarded way to move a receipt:\n\n```text update_receipt{ status: \"Closed\", completion: \"Full\" } → 200 OK ```\n\nNo state machine, no version, and no summary of what happened: a receipt could be closed with no `close_summary`, cancelled with no `cancel_summary`, or pulled back out of a terminal state into `Open`. `update_receipt` is granted to OPERATOR by the seeder's operational-entity rule, so it was not even an admin-only hole. Same shape as the line-level hole PR #436 closed — this is the half it left open.\n\nThe fields are absent by CONSTRUCTION rather than filtered at runtime: one that cannot be deserialized cannot be reintroduced by someone extending a mapping function. They move only through their own commands.\n\nAlso absent, each for its own reason: - `owner_id`, `receipt_number` — identity, fixed when the receipt is created. - `close_date` — stamped by Close, alongside the summary it belongs to.\n\n`deny_unknown_fields` is the point, not a detail: serde's default is to IGNORE what it does not know, so a client sending `status: \"Closed\"` would get `200 OK` and a response showing the old status — the write silently dropped, the caller convinced it landed. For the field the whole lifecycle turns on, refusing loudly is the only honest answer.",
            "properties": {
              "actual_ship_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "arrival_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "door": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "driver_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_receipt_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "planned_ship_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "po_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "promised_ship_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_type": {
                "oneOf": [
                  {
                    "enum": [
                      "Normal",
                      "CustomerReturn",
                      "Sscc",
                      "CaseLevel"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Receiving Without ASN, assigned by the server.",
                    "enum": [
                      "NoAsn"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Goods arriving from another facility of the same company.",
                    "enum": [
                      "InterFacilityTransfer"
                    ],
                    "type": "string"
                  }
                ]
              },
              "rma": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scheduled_ship_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "supplier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_volume": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "total_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "trailer_plate": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trailer_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vehicle_date": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "vehicle_plate": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "ReceiptUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
          "properties": {
            "actual_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "arrival_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "cancel_summary": {
              "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "close_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "close_summary": {
              "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
            },
            "door": {
              "type": [
                "string",
                "null"
              ]
            },
            "driver_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "expected_receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                }
              ],
              "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "planned_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "promised_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "scheduled_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "supplier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_volume": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "trailer_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "trailer_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
            },
            "vehicle_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "vehicle_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "id",
            "inventory_tracking_granularity",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_number",
            "receipt_type",
            "status",
            "version"
          ],
          "title": "General Receipt model",
          "type": "object"
        }
      },
      "summary": "Update the reference data on a receipt — refused once it is Closed or Cancelled.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1e6eda5cdb71bc6503268a8c6c941c571fc1426e2b248bc435c4205781ae7a6e",
      "x-quark-response-schema-hash": "sha256:77fa07f2356d6c2eb3368d686cdd1629575ee2e3109d5cb2fc9aaa305bcca43d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
          "properties": {
            "actual_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "arrival_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "cancel_summary": {
              "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "close_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "close_summary": {
              "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
            },
            "door": {
              "type": [
                "string",
                "null"
              ]
            },
            "driver_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "expected_receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                }
              ],
              "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "planned_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "promised_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "scheduled_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "supplier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_volume": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "trailer_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "trailer_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
            },
            "vehicle_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "vehicle_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "id",
            "inventory_tracking_granularity",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_number",
            "receipt_type",
            "status",
            "version"
          ],
          "title": "General Receipt model",
          "type": "object"
        }
      },
      "summary": "Delete a receipt atomically; refuses when any line has received quantity.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:77fa07f2356d6c2eb3368d686cdd1629575ee2e3109d5cb2fc9aaa305bcca43d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete receipts atomically; refuses the batch when any line has received quantity.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count receipt — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_receipt_by_number",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "ReceiptType": {
                "oneOf": [
                  {
                    "enum": [
                      "Normal",
                      "CustomerReturn",
                      "Sscc",
                      "CaseLevel"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Receiving Without ASN, assigned by the server.",
                    "enum": [
                      "NoAsn"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Goods arriving from another facility of the same company.",
                    "enum": [
                      "InterFacilityTransfer"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "kind": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ReceiptType"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Optional filter by `receipt_type`. When `None` the lookup matches any type. When `Some(t)` and the row exists with a different type, the response is `null` (treated as not-found, the same as if the number were missing entirely)."
              },
              "number": {
                "description": "`receipt.receipt_number` — UNIQUE per warehouse, used by RF / UI scan-and-go flows.",
                "type": "string"
              }
            },
            "required": [
              "number"
            ],
            "title": "FindReceiptByNumberInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/Receipt"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "Receipt": {
              "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
              "properties": {
                "actual_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "arrival_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancel_summary": {
                  "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_summary": {
                  "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
                },
                "door": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_tracking_granularity": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    }
                  ],
                  "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "promised_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "supplier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_volume": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trailer_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trailer_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
                },
                "vehicle_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vehicle_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "id",
                "inventory_tracking_granularity",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_number",
                "receipt_type",
                "status",
                "version"
              ],
              "title": "General Receipt model",
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "title": "Nullable_Receipt"
        }
      },
      "summary": "Find receipt by receipt_number; optional kind filter",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2d38aa50ae4638af4dd82c5fc8a3f6bf4d13792361bebace87273879e1f2ad1a",
      "x-quark-response-schema-hash": "sha256:c20baa77f05bd1e7d67b3f2e1d6adf145c9b2a48351871c6b9e3a0cf0ce16228",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_receipt_by_rma",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "rma_number": {
                "description": "RMA reference as the operator scans / types it. Two upstream sources of this string can both legitimately appear: 1. ERP wrote the value into `receipt.rma` when creating the Customer Return — the dedicated RMA column. 2. ERP integration posted the value via `external_receipt_number` because that's the field their integration mapper happens to use. We accept either.",
                "type": "string"
              }
            },
            "required": [
              "rma_number"
            ],
            "title": "FindReceiptByRmaInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/Receipt"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "Receipt": {
              "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
              "properties": {
                "actual_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "arrival_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancel_summary": {
                  "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_summary": {
                  "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
                },
                "door": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_tracking_granularity": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    }
                  ],
                  "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "promised_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "supplier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_volume": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trailer_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trailer_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
                },
                "vehicle_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vehicle_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "id",
                "inventory_tracking_granularity",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_number",
                "receipt_type",
                "status",
                "version"
              ],
              "title": "General Receipt model",
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "title": "Nullable_Receipt"
        }
      },
      "summary": "Find Customer Return by RMA reference (receipt.rma OR external_receipt_number, scoped to receipt_type=CustomerReturn)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cea8b5013f5ebd6321563e3377c3d8c77e013fc8b097aff0f9f3505e745f8c69",
      "x-quark-response-schema-hash": "sha256:c20baa77f05bd1e7d67b3f2e1d6adf145c9b2a48351871c6b9e3a0cf0ce16228",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_receipt_line_by_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "owner_id": {
                "description": "Optional. If `None` the BMC matches any owner — reasonable default for single-tenant warehouses or when caller knows the receipt already disambiguates owner. RF flows that scan inside an owner-scoped receipt header should pass it explicitly.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "receipt_id",
              "sku_code"
            ],
            "title": "FindReceiptLineBySkuInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/ReceiptDetail"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
                },
                "container_id": {
                  "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "type": "string"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_line_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_code": {
                  "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_attr_check_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotAttrCheckMode"
                    }
                  ],
                  "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_detail_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "qty_adjusted": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_damaged": {
                  "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_expected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_received": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_rejected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_line_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "return_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "return_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "target_disposition": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptTargetDisposition"
                    }
                  ],
                  "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "to_container_id": {
                  "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "to_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom_received": {
                  "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "effective_date",
                "id",
                "lot_attr_check_mode",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_id",
                "receipt_line_number",
                "receipt_type",
                "sku",
                "status",
                "target_disposition",
                "version"
              ],
              "type": "object"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "title": "Nullable_ReceiptDetail"
        }
      },
      "summary": "Find receipt_detail by (receipt_id, sku_code) — single row; null if absent",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:21c25e26492d742de8e6c320f40d5e73e405ea2ca41dac1282842ef46953b548",
      "x-quark-response-schema-hash": "sha256:92b7055bdbcfd919b5b79fac32c165ad5e170f12297e53eda62af07e093351bc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "validate_lpn_unused",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "lpn_code": {
                "description": "`container.code` to check — what an operator scans / types as an LPN.",
                "type": "string"
              }
            },
            "required": [
              "lpn_code"
            ],
            "title": "ValidateLpnUnusedInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "container_id": {
              "description": "The matching container.id when one exists with this code, regardless of usage state. Caller can use this to short-circuit a subsequent container lookup.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "is_unused": {
              "description": "True when the LPN code is safe to assign to a fresh receipt.",
              "type": "boolean"
            },
            "reason": {
              "description": "Human-readable reason when `is_unused = false`. One of: - \"container is Active and carries N units of inventory\" - \"container exists with status InTransit\" `None` when `is_unused = true`.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "is_unused"
          ],
          "title": "ValidateLpnUnusedResult",
          "type": "object"
        }
      },
      "summary": "Check if an LPN code is free to assign (no live inventory under that container)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3469506eeecd6bb92349668f978ff7f7e1d1c3cbe038eff0e493a9fe5e7d48a8",
      "x-quark-response-schema-hash": "sha256:2a17d7a86bbdb943220b922f698de82dfb9dc2eafae4b2a29b5f0b30fdad61b0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_printer_for_context",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "owner_id": {
                "description": "Optional. When `None` the Owner-scope tier is skipped.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "user_id": {
                "format": "int64",
                "type": "integer"
              },
              "warehouse_id": {
                "description": "Warehouse the assignment is being looked up in. The wh_schema in `Ctx` already binds the search to a single warehouse's `printer_assignments` table, so this id is mainly used to match `scope_type='Warehouse'` rows.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "user_id",
              "warehouse_id"
            ],
            "title": "FindPrinterForContextInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "matched_scope": {
              "description": "Which scope tier resolved — for the UI to surface \"you're using the warehouse-default printer\" type messages. None paired with printer_id=None means no assignment exists at all.",
              "type": [
                "string",
                "null"
              ]
            },
            "printer_id": {
              "description": "The chosen printer_id, or None when no assignment matches at any scope level.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "title": "FindPrinterForContextResult",
          "type": "object"
        }
      },
      "summary": "Resolve a printer for (user, owner, warehouse) via the User→Owner→Warehouse priority chain",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bb5f885cbaba1b2dd95811d23d70f3acbd04f522dd94f4ec8b973822cb70c743",
      "x-quark-response-schema-hash": "sha256:bb8bac68d2c4ddc3f13fc6b894c8d05b620b36c2041e84b10bf8ca2d3366cfa0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_summary",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "GetReceiptSummaryInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptSummaryLine": {
              "properties": {
                "damaged": {
                  "format": "double",
                  "type": "number"
                },
                "ordered": {
                  "format": "double",
                  "type": "number"
                },
                "over": {
                  "description": "max(0, received - ordered). Always >= 0.",
                  "format": "double",
                  "type": "number"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_line_number": {
                  "type": "string"
                },
                "received": {
                  "format": "double",
                  "type": "number"
                },
                "rejected": {
                  "format": "double",
                  "type": "number"
                },
                "short": {
                  "description": "max(0, ordered - received). Always >= 0.",
                  "format": "double",
                  "type": "number"
                },
                "sku": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "damaged",
                "ordered",
                "over",
                "receipt_detail_id",
                "receipt_line_number",
                "received",
                "rejected",
                "short",
                "sku",
                "status"
              ],
              "type": "object"
            }
          },
          "properties": {
            "can_close": {
              "description": "True when no exceptions exist AND status is not already terminal. This is a *hint* for the UI — the actual close decision still goes through `CloseReceipt` which honours `ALLOW_CLOSE_WITH_DISCREPANCY` and supervisor-override code 71 (D-21).",
              "type": "boolean"
            },
            "completion": {
              "type": [
                "string",
                "null"
              ]
            },
            "exception_lines": {
              "description": "Count of detail lines that have any of: short>0, over>0, damaged>0, rejected>0. Used by the close-confirmation UI to surface a single \"N exceptions\" badge.",
              "format": "int64",
              "type": "integer"
            },
            "lines": {
              "description": "Per-line breakdown. Empty when receipt has no detail rows yet.",
              "items": {
                "$ref": "#/definitions/ReceiptSummaryLine"
              },
              "type": "array"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_number": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "total_damaged": {
              "description": "Sum of `lines[].damaged`.",
              "format": "double",
              "type": "number"
            },
            "total_ordered": {
              "description": "Sum of `lines[].ordered`.",
              "format": "double",
              "type": "number"
            },
            "total_received": {
              "description": "Sum of `lines[].received`.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "can_close",
            "exception_lines",
            "lines",
            "receipt_id",
            "receipt_number",
            "status",
            "total_damaged",
            "total_ordered",
            "total_received"
          ],
          "title": "ReceiptSummary",
          "type": "object"
        }
      },
      "summary": "Receipt summary for close confirmation: per-line ordered/received/short/over/damaged + totals + can_close hint",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4b3f8cbc5ec43e85f29e5a1af70206c62898dbff179442017f7d7ef020bae7ee",
      "x-quark-response-schema-hash": "sha256:7a6ffcfc22256b5bee6babc9ae9cab76374aea4a935f0115ace48343625e8e8e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "GetReceiptFullInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptAudit": {
              "properties": {
                "changed_at": {
                  "type": "string"
                },
                "changed_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "field_name": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "new_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "old_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "changed_at",
                "changed_by",
                "field_name",
                "id",
                "receipt_id"
              ],
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
                },
                "container_id": {
                  "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "type": "string"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_line_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_code": {
                  "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_attr_check_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotAttrCheckMode"
                    }
                  ],
                  "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_detail_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "qty_adjusted": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_damaged": {
                  "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_expected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_received": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_rejected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_line_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "return_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "return_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "target_disposition": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptTargetDisposition"
                    }
                  ],
                  "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "to_container_id": {
                  "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "to_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom_received": {
                  "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "effective_date",
                "id",
                "lot_attr_check_mode",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_id",
                "receipt_line_number",
                "receipt_type",
                "sku",
                "status",
                "target_disposition",
                "version"
              ],
              "type": "object"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
          "properties": {
            "actual_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "arrival_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "cancel_summary": {
              "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "close_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "close_summary": {
              "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
            },
            "door": {
              "type": [
                "string",
                "null"
              ]
            },
            "driver_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "expected_receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                }
              ],
              "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
            },
            "last_audit_event": {
              "anyOf": [
                {
                  "$ref": "#/definitions/ReceiptAudit"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Most recent audit row for the receipt; None when nothing audited yet. Caller can render \"last touched at X by user Y\" from this without a follow-up roundtrip."
            },
            "lines": {
              "description": "All receipt_detail rows for this receipt, sorted by line_number.",
              "items": {
                "$ref": "#/definitions/ReceiptDetail"
              },
              "type": "array"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "planned_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "promised_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "scheduled_ship_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "supplier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_volume": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "total_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "trailer_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "trailer_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "unplanned_case_on_asn": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ],
              "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
            },
            "vehicle_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "vehicle_plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "id",
            "inventory_tracking_granularity",
            "lines",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_number",
            "receipt_type",
            "status",
            "version"
          ],
          "title": "General Receipt model",
          "type": "object"
        }
      },
      "summary": "Receipt envelope: header + lines + last audit row in one roundtrip",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:759eaf5538eccce9e190fc4461427e434e044eca12c0d2252f3e8cc4a1cd7d13",
      "x-quark-response-schema-hash": "sha256:ee73361cd07612121f1006e9338573cd7a9189293b7ab5d7890ee69b01ff53db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_envelope",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "owner_code": {
                "default": null,
                "description": "Business owner code (e.g. \"OWNER002\"). Used by RCBLIND01 / any flow where the operator scans / picks by code rather than id. Server resolves to `owner_id` via OwnerBmc lookup; not-found → typed Validation error. Exactly one of (`owner_id`, `owner_code`) is required.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "default": null,
                "description": "Numeric owner id. Preferred when the caller already has it (RCASN01SKU resolves it via the ASN lookup). Mutually exclusive with `owner_code` — `owner_id` wins when both are supplied.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "receipt_id": {
                "default": null,
                "description": "Optional receipt context. When the SKU is scanned *against an ASN* (RCASN01SKU passes `display.receipt_id`), the envelope resolves the matching receipt line and pre-fills / locks its expected lot attributes (ADR-050). Blind receive (RCBLIND01) omits it → plain prompt, no pre-fill.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "sku_code"
            ],
            "title": "GetSkuEnvelopeInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "LotAttributePrompt": {
              "description": "One operator-facing lot-attribute slot on a receive line screen, with the ASN-expected pre-fill and strict-lock resolved (ADR-050). Wire DTO — not a `lot_policy_attribute` row.",
              "properties": {
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_date": {
                  "description": "`true` → this slot is a DATE, not free text: one of the four date columns `lot_policy` carries (`DATE_ATTRIBUTE_CODES`), folded in as a synthetic slot so RF and the web prompt for it alongside the custom attributes.\n\nThe server has always known this and never said it, so every renderer drew a text box and the operator typed a date into it by hand — `parse_date` then accepted or silently dropped whatever arrived. The flag does not change what is sent (still a string in `lot_attributes`); it lets a screen offer the right control for it.",
                  "type": "boolean"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "readonly": {
                  "description": "`true` → operator may not edit. The line is strict-match (D-65) AND there is an expected value to enforce. Blank slots stay editable even on a strict line (nothing to lock).",
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "value": {
                  "description": "ASN-expected value for this attribute on the scanned line, when the line carries one. `None` → blank input.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "attrib_code",
                "is_date",
                "readonly",
                "required"
              ],
              "type": "object"
            },
            "Pack": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "items": {
                  "items": {
                    "$ref": "#/definitions/PackItem"
                  },
                  "type": "array"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "descr",
                "id",
                "items",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            },
            "PackItem": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "base_qty": {
                  "format": "double",
                  "type": "number"
                },
                "cartonize": {
                  "type": "boolean"
                },
                "catch_weight_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "child_pack_item_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cube": {
                  "format": "double",
                  "type": "number"
                },
                "height": {
                  "format": "double",
                  "type": "number"
                },
                "hierarchy_level": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "description": "ADR-045 §3 — append-only convention. UI dropdowns filter to `is_active=true`; FK lookups from receipt_detail / inventory_balances* continue to resolve regardless. Editing a pack means inserting a new row + flipping the old one's flag, not UPDATE-ing master values.",
                  "type": "boolean"
                },
                "is_catch_weight": {
                  "type": "boolean"
                },
                "is_dual_uom": {
                  "type": "boolean"
                },
                "length": {
                  "format": "double",
                  "type": "number"
                },
                "max_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "nominal_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_hi": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_ti": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_height": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_length": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_wood_width": {
                  "format": "double",
                  "type": "number"
                },
                "qty_per_child": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "replenish": {
                  "type": "boolean"
                },
                "rotation_rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RotationRule"
                    }
                  ],
                  "description": "Как этот уровень разрешено поворачивать при укладке в коробку. Правило стоит здесь, а не на товаре: в коробку кладут упаковку, и «этой стороной вверх» пишут на ней."
                },
                "secondary_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_as_is": {
                  "description": "Explicit factory packaging. Mutually exclusive with `cartonize`.",
                  "type": "boolean"
                },
                "uom": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                },
                "width": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "base_qty",
                "cartonize",
                "cube",
                "height",
                "hierarchy_level",
                "id",
                "is_active",
                "is_catch_weight",
                "is_dual_uom",
                "length",
                "mod_when",
                "mod_who",
                "pack_id",
                "pack_revision_id",
                "pallet_hi",
                "pallet_ti",
                "pallet_wood_height",
                "pallet_wood_length",
                "pallet_wood_width",
                "replenish",
                "rotation_rule",
                "ship_as_is",
                "uom",
                "weight",
                "width"
              ],
              "type": "object"
            },
            "PutawayClass": {
              "description": "`PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `PutawayClass` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "None",
                "NoMix"
              ],
              "type": "string"
            },
            "RotationRule": {
              "oneOf": [
                {
                  "description": "Все шесть ориентаций.",
                  "enum": [
                    "All90"
                  ],
                  "type": "string"
                },
                {
                  "description": "Только естественное положение.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "«Этой стороной вверх».",
                  "enum": [
                    "UprightOnly"
                  ],
                  "type": "string"
                }
              ]
            },
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            },
            "Sku": {
              "description": "Represents a Stock Keeping Unit (SKU), the core entity for inventory items.\n\nEach SKU contains information about the item, its ownership, packaging, classification, fulfillment parameters, and policy references. Timestamps track creation and modification.\n\n# Fields - `id`: Unique SKU identifier. - `external_id`: Optional external reference. - `owner_id`: Owner's identifier. - `code`: SKU code, unique per owner. - `descr`: Description of the SKU. - `pack_id`: Reference to packaging. - `gross_wgt`, `net_wgt`, `cube`: Physical characteristics. - `abc`: ABC rotation speed classification. - `class`, `active`, `sku_group`: Classification and grouping. - `*_policy_id`: Various policy references (allocation, replenishment, etc.). - `on_rec_copy_receipt_number`: Copy receipt number on receipt. - `putaway_loc`, `putawayzone`, `receipt_qc_loc`: Putaway Location details. - `putaway_class`: Putaway class. - `rotation`: SKU rotation policy. - `shelf_life`, `min_shelf_life_on_pick`, `min_shelf_life_on_rec`: Shelf life parameters. - `receipt_hold_code`, `expire_days`, `deliver_by_days`, `best_by_days`: Expiry and delivery codes. - `allow_multi_lot_on_lpn`: Allow multiple lots on license plate number. - `force_separate_lpn_per_lot`: This SKU demands its own container per lot. - `add_who`, `add_when`, `mod_who`, `mod_when`: Audit fields for creation and modification.",
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "active": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allocation_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "allow_multi_lot_on_lpn": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "barcode_format_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "best_by_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cartonization_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "class": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "default_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "deliver_by_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "descr": {
                  "type": "string"
                },
                "expire_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "force_separate_lpn_per_lot": {
                  "description": "The same prohibition as `allow_multi_lot_on_lpn = false`, asked of the ARRIVING SKU instead of the ones already on the pallet. See [`DEFAULT_FORCE_SEPARATE_LPN_PER_LOT`] for why both exist.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "gross_wgt": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_age_on_rec": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "min_shelf_life_on_pick": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "min_shelf_life_on_rec": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "min_temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "net_wgt": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "on_rec_copy_receipt_number": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pick_instruction": {
                  "description": "Standing pick instruction for this item (wms-app 044): shown on every pick of it and acknowledged before the pick commits (RF `PICKINS`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "positions_required": {
                  "description": "How many adjacent positions of one section this item occupies. `1` is an ordinary item; more means the whole section must be free and its dimensions are measured together.",
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "putaway_class": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PutawayClass"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "putaway_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "putaway_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_hold_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "receipt_qc_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "replenishment_policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requires_temperature_capture": {
                  "type": "boolean"
                },
                "return_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rotate_by": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rotation": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuRotation"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shelf_life": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sku_group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stack_limit": {
                  "description": "How high this item may be stacked, whatever the rack allows. `0` is no opinion; the engine takes the minimum of this and `location.stack_limit`, so an item may lower the rack's limit and never raise it.",
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "tare_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "warning_temperature_max": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "warning_temperature_min": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "descr",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "requires_temperature_capture"
              ],
              "type": "object"
            },
            "SkuBarcode": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode": {
                  "type": "string"
                },
                "barcode_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SkuBarcodeType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_uom": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "user_notes1": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_notes2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vendor_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "barcode",
                "default_uom",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "sku_id"
              ],
              "type": "object"
            },
            "SkuBarcodeType": {
              "description": "EAN, UPC, GTIN, etc..",
              "enum": [
                "None",
                "Upc",
                "Mni",
                "Rtlin",
                "Epcid",
                "Crn",
                "Gtin"
              ],
              "title": "SKU Barcode types",
              "type": "string"
            },
            "SkuRotation": {
              "description": "Represents SKU rotation policy, determining the order in which stock is picked.\n\n- `Fifo`: First-In-First-Out rotation. - `Lifo`: Last-In-First-Out rotation.\n\nUsed to specify how items are rotated in inventory management.\n\n# Examples\n\n``` use crate::model::sku::SkuRotation; let rotation = SkuRotation::Fifo; assert_eq!(rotation.to_string(), \"Fifo\"); ``` `PartialEq`/`Eq` are unconditional (not `cfg(test)`): a putaway step now compares `SkuRotation` values outside tests too, via `PropRule::matches` (phase 2b product criteria).",
              "enum": [
                "Fifo",
                "Lifo",
                "Fefo"
              ],
              "type": "string"
            },
            "SkuSerialConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_asn_pre_advised": {
                  "type": "boolean"
                },
                "allow_deferred_capture": {
                  "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
                  "type": "boolean"
                },
                "allow_receive_capture": {
                  "type": "boolean"
                },
                "anomaly_block_severity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "anomaly_max_per_lpn": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_velocity_threshold_min": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_vendor_surge_factor": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "check_digit_algorithm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuous_serial_tracking": {
                  "description": "Master flag. If false — other fields ignored.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "industry_profile": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "multi_serial_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "multi_serial_fixed_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pick_episode_reassignment_mode": {
                  "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
                  "type": "string"
                },
                "profile_mode": {
                  "description": "Movement/capture coupling policy (ADR-090).",
                  "type": "string"
                },
                "require_unique_global": {
                  "type": "boolean"
                },
                "serial_auto_increment": {
                  "type": "boolean"
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_increment_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_increment_source_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_mask_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_parse_frequency": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_mode": {
                  "$ref": "#/definitions/SerialParseMode"
                },
                "serial_parse_start_after": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_start_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_scope": {
                  "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
                  "type": "string"
                },
                "serials_per_barcode": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warranty_period_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_asn_pre_advised",
                "allow_deferred_capture",
                "allow_receive_capture",
                "continuous_serial_tracking",
                "id",
                "mod_when",
                "mod_who",
                "pick_episode_reassignment_mode",
                "profile_mode",
                "require_unique_global",
                "serial_auto_increment",
                "serial_parse_mode",
                "serial_scope",
                "serials_per_barcode",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "properties": {
            "barcodes": {
              "description": "All active barcodes for this SKU. Empty Vec when none registered; caller can fall back to scanning by sku.code directly.",
              "items": {
                "$ref": "#/definitions/SkuBarcode"
              },
              "type": "array"
            },
            "expected_lpn": {
              "description": "The LPN RF prefills To LPN with: the supplier's expected LPN, when every open line of this SKU on the receipt that offers one offers the same one — a line offers its expected LPN unless it was already received into ANOTHER LPN. `None` when no line offers one, lines offer different ones, and on a blind scan (no `receipt_id`) — the operator scans the label and the cascade finds the line by it. Rule: `wms_inbound::service::receipt::expected_lpn`.",
              "type": [
                "string",
                "null"
              ]
            },
            "lot_policy_attributes": {
              "description": "Lot-attribute prompt for this SKU (`show=true` attrs only). When the scan is against an ASN (`receipt_id` supplied + a matching line), each entry is pre-filled with the line's expected `value` and `readonly` on a Strict line (ADR-050); otherwise blank + editable. Empty when the SKU has no lot_policy. RF prompts the operator for these before submitting receive_blind / receive_against_asn — required attrs left unsupplied fail server-side validation.",
              "items": {
                "$ref": "#/definitions/LotAttributePrompt"
              },
              "type": "array"
            },
            "owner_id": {
              "description": "Resolved owner id. Always set on a successful response. Surfaced so callers that started with `owner_code` (RCBLIND01, slice C.5) can copy the numeric id into `display.owner_id` for the rest of the chain — the LINE call still wants i64 on the wire. Callers that already had `owner_id` (RCASN01SKU) can ignore the field.",
              "format": "int64",
              "type": "integer"
            },
            "pack": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Pack"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Default Pack tied to `sku.pack_id`. RF shows `pack.code` (or `pack.descr`) on receive screens so the operator sees a name instead of a meaningless integer. None only if the pack row vanished (referential-integrity break) — normal operation always returns it."
            },
            "serial_config": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SkuSerialConfig"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Per-SKU serial-tracking configuration. None when no row exists yet — the SKU is not serial-tracked (or hasn't been configured)."
            },
            "sku": {
              "$ref": "#/definitions/Sku"
            }
          },
          "required": [
            "barcodes",
            "lot_policy_attributes",
            "owner_id",
            "sku"
          ],
          "title": "SkuEnvelope",
          "type": "object"
        }
      },
      "summary": "SKU envelope: sku + serial_config + barcodes for receive-flow round-trip elimination",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:040a03a9aa7ce4762916b6fad6bb3c99f086f491e3267682fb19a47e127f1382",
      "x-quark-response-schema-hash": "sha256:993a0927475fc50992e88dd5a98c157dc29c770bd1457b67fa0fbf129e65ebf2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "assign_lpn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "format_id": {
                "description": "Catalog spec mentions a numeric `format_id`. Per Container Spec §3.3 + §5 the actual format is OwnerConfig.auto_generate_lpn_format (a string template) — not a numeric id. This field is accepted for backwards-compat with the catalog but currently ignored; generation uses the global `code_counter.container_code` sequence via `GenKey::get(CounterName::ContainerCode)` which is owner- agnostic and warehouse-scoped (per typed `Ctx::data_scope`).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "description": "How many LPN codes to mint in this batch. `None` or `Some(0)` returns an empty Vec (no-op). `Some(n)` returns exactly n codes. Bulk-allocate when the operator is about to receive a multi-pallet shipment — saves N round-trips compared to calling once per pallet.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sku_id": {
                "description": "Informational only — recorded in event payloads / audit when this becomes a tracked allocation. Today the SKU is not used by the generator but the API accepts it so callers can keep their payload stable through future enhancements.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "AssignLpnInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "lpns": {
              "description": "Newly minted LPN codes, in the order they were drawn from the sequence. Each is a 10-char zero-padded numeric string — guaranteed unique within this warehouse schema and never reused.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "lpns"
          ],
          "title": "AssignLpnResult",
          "type": "object"
        }
      },
      "summary": "Mint N fresh LPN codes from the warehouse container_code sequence (FOR-UPDATE-locked, no collisions)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b6e8b0425a70142e54ea032cafb648dc04a3e97f00c51a8aa3060cd9af606fc4",
      "x-quark-response-schema-hash": "sha256:08455a76d69d32953ef865dc982e2ef51ff080baf98781b21bdadbbd5f425f72",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_owner_damage_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "owner_id": {
                "description": "`owners.id` of the SKU's owner. Resolved upstream by the caller (e.g. `Receipt::owner_id` for a damage report tied to a receipt).",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "owner_id"
            ],
            "title": "GetOwnerDamagePolicyInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/OwnerDamagePolicy"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "OwnerDamagePolicy": {
              "description": "Damage routing policy for an owner's incoming inventory.\n\nSourced from `owner_config.damage_{minor|major|total}_action`. ReportDamage (Catalog 10) consults this row to decide what to do with a damaged unit: `None` (keep), `Hold` (release-blocked), or `Reject` (return to vendor).\n\nReturned as a flat shape (no nested `OwnerConfig`) so RF clients don't pay the deserialization cost of fields they ignore.",
              "properties": {
                "damage_major_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_minor_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "damage_total_action": {
                  "$ref": "#/definitions/DamageAction"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "damage_major_action",
                "damage_minor_action",
                "damage_total_action",
                "owner_id"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_OwnerDamagePolicy"
        }
      },
      "summary": "Damage routing policy for an owner (None/Hold/Reject per severity)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b78d353e6f6a9fe2909d704ba700300dc6fee86329334e158d9f9ee161b33adb",
      "x-quark-response-schema-hash": "sha256:bdd96b4730dfdcd172343e2b48daf26bf5b37b447be53eff1cbc067f47db81d5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_my_open_receipts",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "description": "Cap on rows returned. `None` defaults to 50 — enough for an RF \"my open\" list without paging. Hard upper bound is 500 to keep the response small for radio-network clients.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "user_id": {
                "description": "Receipts created by this user (`receipt.add_who`). RF \"my work\" view filters by the operator's id; supervisors pass another user id to peek at someone else's queue.",
                "format": "int64",
                "type": "integer"
              },
              "warehouse_id": {
                "description": "Warehouse scope is already implicit in `Ctx.wh_schema` — the row list is restricted to that schema's `receipt` table. The id is accepted on the input so callers can keep their payload symmetric with other RF endpoints; it is not currently used in the WHERE clause (the schema bind is sufficient).",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "user_id",
              "warehouse_id"
            ],
            "title": "ListMyOpenReceiptsInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "Receipt": {
              "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
              "properties": {
                "actual_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "arrival_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancel_summary": {
                  "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_summary": {
                  "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
                },
                "door": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_tracking_granularity": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    }
                  ],
                  "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "promised_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "supplier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_volume": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trailer_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trailer_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
                },
                "vehicle_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vehicle_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "id",
                "inventory_tracking_granularity",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_number",
                "receipt_type",
                "status",
                "version"
              ],
              "title": "General Receipt model",
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Receipt"
          },
          "title": "Array_of_Receipt",
          "type": "array"
        }
      },
      "summary": "List non-terminal receipts created by a user (RF 'my open' landing list)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:db5f43453cc834311fd4195e26bcd718a8f1fbd4233a1cc997aa5a115c8b6b8f",
      "x-quark-response-schema-hash": "sha256:a64a5822e27c60e29e1679a348cd0e7babf219cb81cfa5386ec2c2e17a00f509",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_hold_history",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "GetReceiptHoldHistoryInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptHoldEvent": {
              "description": "Audit-trail entry surfaced for the receipt OnHold timeline.\n\nSourced from `receipt_audit` rows where `field_name='status'` and either `old_value='OnHold'` or `new_value='OnHold'` — i.e. transitions into or out of the hold state. Returned in chronological order so the UI can render a simple timeline (\"placed on hold by U at T1, released by V at T2\").\n\nNote: this surfaces *receipt-level* status changes, not the deeper per-balance `inventory_hold` rows (those are cross-cutting and hard to attribute to a single receipt without a transaction-log walk — out of scope here).",
              "properties": {
                "audit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "changed_at": {
                  "description": "RFC 3339 in UTC.",
                  "format": "date-time",
                  "type": "string"
                },
                "changed_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "direction": {
                  "description": "`\"placed\"` when transitioning *into* OnHold, `\"released\"` when transitioning *out of* OnHold. Lets the UI choose the right icon without re-checking old/new values client-side.",
                  "type": "string"
                },
                "new_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "old_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "audit_id",
                "changed_at",
                "changed_by",
                "direction"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptHoldEvent"
          },
          "title": "Array_of_ReceiptHoldEvent",
          "type": "array"
        }
      },
      "summary": "Receipt OnHold history (place/release events) sourced from receipt_audit status field",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e36e6094a5db1da1c3bc49cd5caaf7d51860ba1ffd7eed91eb63a81fee5dbf63",
      "x-quark-response-schema-hash": "sha256:bf01677fbdc6884dda99e78aa6f507b1b42703ed4bbcd2962e68b8f4dac99663",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_detail_history",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_detail_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_detail_id"
            ],
            "title": "GetReceiptDetailHistoryInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptDetailHistoryEvent": {
              "description": "One historical event for a receipt_detail line. Combines two upstream sources into a single timeline:\n\n- **`audit`**: `receipt_audit` row tied to the parent receipt. Header audit covers status changes (Open→InProgress→OnHold→Closed) and completion transitions that affect this line indirectly. - **`txn`**: `transaction_log` row whose `source_code` matches the parent receipt's `receipt_number` and whose `sku_code` matches the detail line's SKU. This is the inventory-level evidence (deposits into a bin, hold placements, etc.) that the detail line generated.\n\nWe do NOT have a `receipt_detail_audit` table today, so this is the closest thing to a per-line history. UI can group by `event_kind`.",
              "properties": {
                "actor_user_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "at": {
                  "description": "RFC 3339 in UTC.",
                  "format": "date-time",
                  "type": "string"
                },
                "event_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "event_kind": {
                  "description": "`\"audit\"` (header-level field change) or `\"txn\"` (inventory move).",
                  "type": "string"
                },
                "label": {
                  "description": "For `audit`: the field that changed (e.g. `status`, `completion`). For `txn`: the transaction_type code (e.g. `Receive`, `Hold`).",
                  "type": "string"
                },
                "new_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "old_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "at",
                "event_id",
                "event_kind",
                "label"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptDetailHistoryEvent"
          },
          "title": "Array_of_ReceiptDetailHistoryEvent",
          "type": "array"
        }
      },
      "summary": "Per-line history: header audit + matching transaction_log entries (no detail-audit table; this is the closest available)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b4169ba78ecfa0ca80c5c80e12f2317ec017a571d1d9850aefd053e11dc11479",
      "x-quark-response-schema-hash": "sha256:8f76c75eae0ed6f44829e69a073f2a7cbc18389214c30f48aed67f8f6fd1c18d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_close_blockers",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "GetCloseBlockersInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CloseBlocker": {
              "description": "Reasons why CloseReceipt would reject a request right now. Each element is a discrete blocker — UI shows a checklist so the operator can clear them one by one. Empty Vec = receipt is currently closeable (the actual close still goes through the CloseReceipt command, which honours `ALLOW_CLOSE_WITH_DISCREPANCY` and supervisor-override D-21; this endpoint is a *hint* for the UI, not the authoritative gate).",
              "properties": {
                "code": {
                  "description": "Stable code: `\"already_terminal\"`, `\"open_serial_episode\"`, `\"qty_mismatch\"`, `\"pending_damage\"`. Lets UI render a localized label without parsing the message.",
                  "type": "string"
                },
                "count": {
                  "description": "Optional count when the blocker is plural (for example, three unresolved episodes).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CloseBlocker"
          },
          "title": "Array_of_CloseBlocker",
          "type": "array"
        }
      },
      "summary": "Reasons CloseReceipt would refuse: terminal status, unresolved serial capture, qty mismatch, pending damage",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:91fa3c085d84750de05b0aa1ab880fd02c0d4dea3e1854b39fd180dfb9389158",
      "x-quark-response-schema-hash": "sha256:138705a75b66476fa040a54e861ae4e8c2b7bbde4dca617f5e426ac39ca844b4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_cancel_blockers",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "GetCancelBlockersInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CancelBlocker": {
              "properties": {
                "code": {
                  "description": "Stable code: `\"already_terminal\"`, `\"completion_not_pending\"`, `\"received_qty_present\"`. Per Decisions Log D-19: cancel is allowed only when nothing has been received against the receipt yet.",
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CancelBlocker"
          },
          "title": "Array_of_CancelBlocker",
          "type": "array"
        }
      },
      "summary": "Reasons CancelReceipt would refuse (D-19): terminal status, non-Pending completion, received qty present",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f9cd565f0273cdf93cbb66b9c63e53b012fce26c246bc7434bc6cdcf6ac89024",
      "x-quark-response-schema-hash": "sha256:b638635eccd6dc8c9bcf9b13e47e22a0c86d42032d147b8acaa16b4f8d02d38a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lookup_asn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "description": "1-indexed page number. Default 1.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "page_size": {
                "description": "Page size. Default 50, capped at 200.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "q": {
                "description": "Optional substring on `receipt_number` or `external_receipt_number`. `None` returns the full window of recent ASN headers.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "LookupAsnInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AsnHeader": {
              "properties": {
                "completion": {
                  "type": "string"
                },
                "expected_receipt_date": {
                  "description": "RFC 3339 in UTC; RF shows it in the viewer's own zone.",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_code": {
                  "type": "string"
                },
                "owner_company": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_number": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "completion",
                "id",
                "owner_code",
                "owner_company",
                "owner_id",
                "receipt_number",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AsnHeader"
          },
          "title": "Array_of_AsnHeader",
          "type": "array"
        }
      },
      "summary": "Search non-terminal ASN headers by number / external_number; predefined filters for the receive-against-ASN UI",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:daa0c7e62b7403d1e02345f39ca4804ea17e9d54d565a06fac53b87166c99acd",
      "x-quark-response-schema-hash": "sha256:0ba261679d653d5a226b0dbb99e4bb6621c10236bb893c76258db6c2e9c682bc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "search_asns",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "description": "1-indexed page number. Default 1.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "page_size": {
                "description": "Page size. Default 50, capped at 200.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "q": {
                "description": "Optional substring on `receipt_number` or `external_receipt_number`. `None` returns the full window of recent ASN headers.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "LookupAsnInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AsnHeader": {
              "properties": {
                "completion": {
                  "type": "string"
                },
                "expected_receipt_date": {
                  "description": "RFC 3339 in UTC; RF shows it in the viewer's own zone.",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_code": {
                  "type": "string"
                },
                "owner_company": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_number": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "completion",
                "id",
                "owner_code",
                "owner_company",
                "owner_id",
                "receipt_number",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AsnHeader"
          },
          "title": "Array_of_AsnHeader",
          "type": "array"
        }
      },
      "summary": "Substring search of non-terminal ASN headers (alias for lookup_asn; used by RCASN01 F2 picker)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:daa0c7e62b7403d1e02345f39ca4804ea17e9d54d565a06fac53b87166c99acd",
      "x-quark-response-schema-hash": "sha256:0ba261679d653d5a226b0dbb99e4bb6621c10236bb893c76258db6c2e9c682bc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_asn_by_number",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_number": {
                "description": "Exact receipt_number (e.g. \"0000000100\"). Matched by equality, not substring — scan-flow on RCASN01 hands a single scanned barcode and expects a single result.",
                "type": "string"
              }
            },
            "required": [
              "receipt_number"
            ],
            "title": "GetAsnByNumberInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenEpisodeBrief": {
              "description": "Minimal episode shape — only the fields RF needs for the resume branch (id + detail context + progress counters).",
              "properties": {
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty",
                "receipt_detail_id",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "AsnHeader plus per-receipt qty roll-ups. Used by `get_asn_by_number` (scan-flow exact match) to feed RCASN01SUM progress widget without a separate aggregate RPC.",
          "properties": {
            "completion": {
              "type": "string"
            },
            "expected_receipt_date": {
              "description": "RFC 3339 in UTC; RF shows it in the viewer's own zone.",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "description": "`receipt.inventory_tracking_granularity` (`Aggregate` | `Pallet` | `Case`). RCCASE01 (case-level entry screen) reads this to decide whether to push the case-scan loop or surface a typed error (\"ASN is Aggregate — use Receive Against ASN instead\"). RCASN01 ignores it (Aggregate is the implicit default).",
              "type": "string"
            },
            "open_episode": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenEpisodeBrief"
                },
                {
                  "type": "null"
                }
              ],
              "description": "First Open / InProgress / AwaitingConfirmation serial-capture episode attached to any detail of this receipt, if any. Null when none. RCASN01 / RCASN01SUM check this on entry / resume to surface the spec §10.13 recovery flow — re-route the operator straight into RCSN01 with prior progress instead of restarting capture."
            },
            "owner_code": {
              "type": "string"
            },
            "owner_company": {
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty_expected_total": {
              "format": "double",
              "type": "number"
            },
            "qty_received_total": {
              "format": "double",
              "type": "number"
            },
            "receipt_number": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "version": {
              "description": "OCC version (per CLAUDE.md classifier rules) — receipt is a stateful entity, downstream commands (`receipt_close` / `receipt_cancel` / `receipt_adjust_received_qty`) carry this on submit. RCASN01's `onResponseReceive.set` reads `response.version → display.receipt_version`; without it the rule silently resolved to undefined and any later stateful_command was sent without OCC protection.\n\nLives on `AsnDetails`, NOT on `AsnHeader`, because only the \"read full ASN to operate on it\" path needs the version. The F2 picker (`lookup_asn`/`search_asns`) lists candidates only — the operator picks one and then the flow fetches details via `get_asn_by_number`. Exposing version on every picker row was the \"version just in case from frontend\" anti-pattern.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "completion",
            "id",
            "inventory_tracking_granularity",
            "owner_code",
            "owner_company",
            "owner_id",
            "qty_expected_total",
            "qty_received_total",
            "receipt_number",
            "status",
            "version"
          ],
          "title": "AsnDetails",
          "type": "object"
        }
      },
      "summary": "Exact-match resolver for a scanned ASN — single receipt or DocumentNotFound; used by RCASN01 autoSubmit",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3776b07306b65c70c079dfdd101f414974bd03b9b4d6d61c0818c747bf7328e9",
      "x-quark-response-schema-hash": "sha256:41a7400a94a659daa59a3d70b1900acced401946feeb89a7e2f5f1a65cd85563",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_open_blind_receipts",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "owner_id": {
                "description": "Optional owner filter — when present, restricts to that owner's blind receipts.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "warehouse_id": {
                "description": "Compatibility field used by existing RF payloads. The authorized warehouse still comes from `Ctx`; this value must agree with it.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "warehouse_id"
            ],
            "title": "ListOpenBlindReceiptsInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "Receipt": {
              "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
              "properties": {
                "actual_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "arrival_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancel_summary": {
                  "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_summary": {
                  "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
                },
                "door": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_tracking_granularity": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    }
                  ],
                  "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "promised_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "supplier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_volume": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trailer_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trailer_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
                },
                "vehicle_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vehicle_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "id",
                "inventory_tracking_granularity",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_number",
                "receipt_type",
                "status",
                "version"
              ],
              "title": "General Receipt model",
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Receipt"
          },
          "title": "Array_of_Receipt",
          "type": "array"
        }
      },
      "summary": "List open NoAsn receipts for the Receive Blind landing screen",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ca258b6a8bf094549540d2441a58a2a011adb758ac0b87c4612188b657fa0c2a",
      "x-quark-response-schema-hash": "sha256:a64a5822e27c60e29e1679a348cd0e7babf219cb81cfa5386ec2c2e17a00f509",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_damage_severity_codes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "EmptyInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CodeListEntry": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "display_order": {
                  "format": "int16",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "description",
                "display_order"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CodeListEntry"
          },
          "title": "Array_of_CodeListEntry",
          "type": "array"
        }
      },
      "summary": "Active damage severity codes (Minor/Major/Total) — code_list_id 1006",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:626f04c7c3e95d196c8268db70611c2d78308a23c83b2ccea380977fa377af32",
      "x-quark-response-schema-hash": "sha256:7351e3ade7857da5208a60d8ec9683357ad849b5a5ac0c961fdd6d39b3ae00af",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_damage_action_codes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "EmptyInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CodeListEntry": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "display_order": {
                  "format": "int16",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "description",
                "display_order"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CodeListEntry"
          },
          "title": "Array_of_CodeListEntry",
          "type": "array"
        }
      },
      "summary": "Active damage action codes (None/Hold/Reject) — code_list_id 1005",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:626f04c7c3e95d196c8268db70611c2d78308a23c83b2ccea380977fa377af32",
      "x-quark-response-schema-hash": "sha256:7351e3ade7857da5208a60d8ec9683357ad849b5a5ac0c961fdd6d39b3ae00af",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_shortage_reasons",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "EmptyInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ActiveCodeListValue": {
              "description": "One offerable value of a code list: what to send, what to show, where it sits in the list. The three columns a picker needs — deliberately not the whole [`CodeListValue`] row, whose audit columns and ids no caller of [`CodeListValueBmc::list_active_by_list_code`] has any use for.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "display_order": {
                  "format": "int16",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "description",
                "display_order"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ActiveCodeListValue"
          },
          "title": "Array_of_ActiveCodeListValue",
          "type": "array"
        }
      },
      "summary": "Shortage reasons for a short ASN receive — code list `shortage_reason`",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:626f04c7c3e95d196c8268db70611c2d78308a23c83b2ccea380977fa377af32",
      "x-quark-response-schema-hash": "sha256:77190b43c7677770092820f9c43ffe6f63cfa0ceca9b165d3fc6547db37c3482",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "search_open_lpns",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "description": "Page size. Default 30, capped at 100 — the picker is a window, not a report.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "q": {
                "description": "Optional substring on the plate's code. `None` returns the newest window of plates.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "SearchOpenLpnsInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenLpn": {
              "description": "One plate as the receive dialog's picker draws it.\n\nThree fields, and only three on purpose. The picker used to receive the parts — location, SKUs, quantity — and join them itself, which meant the dialog held the separator, and a separator is text a person reads. The line is composed in SQL now (`lpn::search_open`), beside the one the location source composes, so the two lists in this dialog read alike. `lots` travelled the wire and nothing ever read it.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "display": {
                  "description": "The plate in one line; `None` when it has nothing to say about itself.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "residents_refuse_another_lot": {
                  "description": "The plate already holds stock whose SKU is configured to refuse a second lot on one plate. A PREDICTION, not the verdict — see `lpn::search_open`.",
                  "type": "boolean"
                }
              },
              "required": [
                "code",
                "residents_refuse_another_lot"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OpenLpn"
          },
          "title": "Array_of_OpenLpn",
          "type": "array"
        }
      },
      "summary": "Plates a receive may be sent to, by code substring — the Receive dialog's LPN picker. Excludes Disposed (terminal). `residents_refuse_another_lot` predicts the commingle rule from the plate's own residents; the landing authority stays commingle_check.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:291856d868c63c4cf533d98d44ce8d9c9805fe4318122b1cf777f518a8a836be",
      "x-quark-response-schema-hash": "sha256:2ded4211bd710a4049c9443e0d8fbfefd88b6e3efd28f3a70f7a25ffdb7e75ef",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_qty_adjust_reasons",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "EmptyInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ActiveCodeListValue": {
              "description": "One offerable value of a code list: what to send, what to show, where it sits in the list. The three columns a picker needs — deliberately not the whole [`CodeListValue`] row, whose audit columns and ids no caller of [`CodeListValueBmc::list_active_by_list_code`] has any use for.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "display_order": {
                  "format": "int16",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "description",
                "display_order"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ActiveCodeListValue"
          },
          "title": "Array_of_ActiveCodeListValue",
          "type": "array"
        }
      },
      "summary": "Reasons for adjusting a received qty — code list `qty_adjust_reason`",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:626f04c7c3e95d196c8268db70611c2d78308a23c83b2ccea380977fa377af32",
      "x-quark-response-schema-hash": "sha256:77190b43c7677770092820f9c43ffe6f63cfa0ceca9b165d3fc6547db37c3482",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_open_customer_returns",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "owner_id": {
                "description": "Optional owner filter — when present, restricts to that owner's open customer returns.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "q": {
                "description": "Substring match against `receipt.rma` (case-insensitive). `None` or empty → all open returns within the limit. rf-go's F2 picker always sends this as `q` (model.go `triggerLookupValues`).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "ListOpenCustomerReturnsInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            },
            "Receipt": {
              "description": "## 'RMA' Field: Return Merchandise Authorization, <p>In WMS terms, an RMA receipt refers to the process of receiving returned goods into the warehouse that were previously shipped to a customer. It is a structured way to handle customer returns.</p> # Key Aspects of RMA in WMS | Aspect            | Description                                                              | | ----------------- | ------------------------------------------------------------------------ | | **Purpose**       | To manage and track the return of products from customers or stores.     | | **Authorization** | Usually issued by a customer service or sales system before the return.  | | **Receipt Type**  | RMA receipts are often a **distinct type of inbound receipt**.           | | **Validation**    | WMS verifies returned items against the authorized RMA before receiving. | | **Disposition**   | Returned items may be **restocked**, **scrapped**, or **quarantined**.   |",
              "properties": {
                "actual_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "arrival_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancel_summary": {
                  "description": "Per Decisions Log D-19. JSON snapshot at CancelReceipt time."
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "close_summary": {
                  "description": "Per Decisions Log D-18. JSON snapshot at CloseReceipt time. Immutable after close."
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated from details on every receive command."
                },
                "door": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "driver_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_tracking_granularity": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryTrackingGranularity"
                    }
                  ],
                  "description": "ADR-046 D-69b — frozen at creation. Aggregate (default) preserves pre-case-level behaviour; Pallet/Case enable case-scanning flow."
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "promised_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_ship_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "supplier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_volume": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "total_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trailer_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trailer_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "unplanned_case_on_asn": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllowError"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "ADR-046 OQ-03 — what to do when scan hits a case not on ASN. NULL when granularity = Aggregate (cases not scanned)."
                },
                "vehicle_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "vehicle_plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per Decisions Log D-07. Optimistic-lock. Incremented via `ReceiptRepository::update_with_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "id",
                "inventory_tracking_granularity",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_number",
                "receipt_type",
                "status",
                "version"
              ],
              "title": "General Receipt model",
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Receipt"
          },
          "title": "Array_of_Receipt",
          "type": "array"
        }
      },
      "summary": "List open Customer Returns (CustomerReturn type, NOT Closed/Cancelled) for the RCRTN01 F2 picker",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:759994c4290253c1726e5af633c41407fb5d3fed2177230d3b8002701f0d32a6",
      "x-quark-response-schema-hash": "sha256:a64a5822e27c60e29e1679a348cd0e7babf219cb81cfa5386ec2c2e17a00f509",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_adjust_qty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "new_qty_received": {
                "description": "New `qty_received` the operator wants to set on the line. The dry-run rejects when this would push the line into \"received less than already picked / allocated\" territory (no negative inventory).",
                "format": "double",
                "type": "number"
              },
              "receipt_detail_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "new_qty_received",
              "receipt_detail_id"
            ],
            "title": "PreValidateAdjustQtyInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run AdjustQty: terminal-status / negative-qty / picked-qty mismatch checks",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2cffb17620729bca6b523403ee58a55f96417609750e859d0fd4039b6568d087",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "allow_discrepancy": {
                "description": "Defaults to false. Set true to mirror CloseReceipt's `ALLOW_CLOSE_WITH_DISCREPANCY` system setting + supervisor override (D-21) — the `qty_mismatch` blocker is then downgraded to a warning (still surfaced in `reasons`, but `can_proceed=true`).",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "PreValidateCloseInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run CloseReceipt — wraps get_close_blockers with the D-21 allow_discrepancy override",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7aa06dc7f0d804db1abfbac4fa720db6817111b61859a6f52871494aed36143b",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "PreValidateCancelInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run CancelReceipt — derived from get_cancel_blockers (D-19 rules)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1a7098d0a504bfb256fca39bbb7001d9572c48d70b6c5f0a3240ec4df6143d2d",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_put_on_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "PreValidatePutOnHoldInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run PutOnHold — refuses on terminal status; surfaces 'already on hold' as a noop hint",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8acdc4d9492bf08223727d1981388bb1538a761f4c170910e5baf23914bf218d",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_report_damage",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "qty_damaged": {
                "description": "Damaged qty the operator wants to record. Must be > 0 and must not exceed `qty_received - qty_damaged_already - qty_rejected` (you cannot damage more than has actually arrived and isn't already accounted for).",
                "format": "double",
                "type": "number"
              },
              "receipt_detail_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "qty_damaged",
              "receipt_detail_id"
            ],
            "title": "PreValidateReportDamageInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run ReportDamage: terminal-status / non-positive qty / damage exceeds unallocated received qty",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9d876aee4c9370911790969796a6ab75d63f3c334da3106a7aab67ebf564dd0c",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_receive_against_asn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "external_lot": {
                "default": null,
                "description": "Optional supplier-side lot ID (cascade tier 4).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "description": "Required — the receipt the operator is working against.",
                "format": "int64",
                "type": "integer"
              },
              "serial_numbers": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "shortage_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "description": "The operator's scan: a SKU code or one of its barcodes (any GTIN width). The cascade keys on the SKU code it resolves to.",
                "type": "string"
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_lpn": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "qty",
              "receipt_id",
              "sku_code"
            ],
            "title": "PreValidateReceiveAgainstAsnInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run ReceiveAgainstAsn: receipt status / qty > 0 / temperature / pack-multiple / dates / serials / lot attrs vs expected / hold conditions",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cf4a70783380b3cf9ad900c590609588f21f57ec9eb3efa3bb9f31c53fb56201",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_receive_blind_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_id": {
                "description": "Optional override; falls back to receipt.owner_id when omitted.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "serial_numbers": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_lpn": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "qty",
              "receipt_id",
              "sku_code"
            ],
            "title": "PreValidateReceiveBlindLineInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run ReceiveBlindLine: receipt status / qty / SKU + owner / pipeline (no expected lot attrs comparison)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e7c4e026c8ea79d7c847a290a1edab8bd2fea47d252f51c23224c6a85d78a315",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_receive_return",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "condition": {
                "description": "One of `Resaleable | NeedsRefurb | Damaged | Discard`. The dry-run short-circuits the SKU validation pipeline on `Damaged`/`Discard` (those don't enter inventory) and only enforces qty + SKU lookup.",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "sku_code": {
                "type": "string"
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_lpn": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "condition",
              "owner_id",
              "qty",
              "sku_code"
            ],
            "title": "PreValidateReceiveReturnInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run ReceiveReturn: qty / SKU lookup / pipeline (Resaleable+NeedsRefurb only) — Damaged/Discard skip pipeline",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:df77ef7b5e1daf75a0f2e1886e048d60f2282995a5bf6712f3d86f428d61c821",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_receive_against_asn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageInfo": {
                "properties": {
                  "reason_code": {
                    "type": "string"
                  },
                  "reason_description": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "severity": {
                    "$ref": "#/definitions/DamageSeverity"
                  },
                  "vendor_responsibility": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason_code",
                  "severity"
                ],
                "type": "object"
              },
              "DamageSeverity": {
                "description": "Per migration 084 + D-26. Damage classification.",
                "oneOf": [
                  {
                    "enum": [
                      "Minor",
                      "Major",
                      "Total"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                    "enum": [
                      "Cosmetic"
                    ],
                    "type": "string"
                  }
                ]
              },
              "TargetContainerSpec": {
                "oneOf": [
                  {
                    "description": "No container — loose units.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Resolve an existing container by code.",
                    "properties": {
                      "Existing": {
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "Existing"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.",
                    "properties": {
                      "NewPallet": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sscc": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a new case, optionally nested under an existing pallet.",
                    "properties": {
                      "NewCase": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_pallet_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewCase"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Add a new case as child of an existing pallet.",
                    "properties": {
                      "AddCaseToPallet": {
                        "properties": {
                          "new_case_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pallet_code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pallet_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "AddCaseToPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Cross-dock staging container (Phase 2 cross-dock; outbound order ref).",
                    "properties": {
                      "CrossDock": {
                        "properties": {
                          "outbound_order_id": {
                            "format": "int64",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "CrossDock"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "damage_info": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageInfo"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "UC-RCV-09 — ASN F4 damage hot-key sub-flow. When the operator inside an ASN summary marks goods as damaged, RF sends nested DamageInfo here. Auto-fired ReportDamage attaches the audit row to the synth-line that the cascade lookup creates for unplanned damaged units. (Planned-line UPDATE path doesn't propagate yet — rare in practice; tracked as a follow-up.)"
              },
              "external_lot": {
                "default": null,
                "description": "Supplier-side lot ID scanned by the operator (cascade tier 4). Optional — most receives don't carry one.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "override_grant_id": {
                "default": null,
                "description": "A supervisor's grant (`supervisor_override_grant`) authorising a capability-gated override on the LINE this receive books onto — a shortage (28) or an excess (27) — for an operator who does not hold the capability. Its pairs must be `{code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"}`, where the line is the one the cascade resolves this scan to; a refused receive names that exact pair in `context.pairs`. A receive that opens a new (synthetic) line cannot be authorised by grant. The authoriser recorded is the grant's, never a field of this request. Optional: a caller who holds the capability keeps acknowledging with the bare code in `acknowledged_overrides`, exactly as before. See `shared::override_grant`.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "pack_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "printer_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "serial_numbers": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "shortage_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "description": "SKU code from the operator's scan — the cascade keys on it. Mandatory: per ADR-047 the receive API takes business-level identifiers only (no `receipt_detail_id` leaks). The system resolves to a target `receipt_detail` row internally via `cascade_lookup`, or creates a synthetic line when no open ASN line matches.",
                "type": "string"
              },
              "target_container": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/TargetContainerSpec"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Phase 4 — preferred container intent. Resolved to a container_id at the deposit/event boundary via `ContainerService::resolve_or_create`. When `None`, the command falls back to `to_lpn` (legacy path)."
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_loc": {
                "type": "string"
              },
              "to_lpn": {
                "description": "Legacy LPN-string input (Phase 1-3). Still accepted for backward compatibility; ignored when `target_container` is populated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "default": null,
                "description": "ADR-045 §1 — operator-entered native UOM. For ASN flow, falls back to `receipt_detail.uom` (line-level expected) → `sku.default_uom`.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "qty",
              "receipt_id",
              "sku_code",
              "to_loc"
            ],
            "title": "ReceiveAgainstAsn",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HoldInfo": {
              "description": "Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "scope": {
                  "$ref": "#/definitions/HoldScope"
                }
              },
              "required": [
                "code",
                "reason",
                "scope"
              ],
              "type": "object"
            },
            "HoldScope": {
              "oneOf": [
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lpn"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lot"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Loc"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "OpenEpisodeState": {
              "description": "The capture episode as it stands after this receive folded into it.\n\nNamed like the shapes the wire already carries for exactly this purpose — `OpenEpisodeBrief` on `get_asn_by_number` and `OpenEpisodeRow` on `list_open_episodes_for_receipt` — so a client reads one vocabulary wherever it meets an episode. Those two live in app-server, which a domain crate may not depend on, so the names travel rather than the type.\n\n**Why the result must carry it.** `serials_to_collect_qty` is what THIS call owes. A second receive on the same line folds into the same episode (`ensure_open_episode_for_deferred_receive`), so the episode's total is the sum and its `captured_qty` may already be non-zero. A client drawing a progress panel from the receive answer had only the increment to read, and the web dialog opened it on \"0 of <increment>\" — an invented zero and the wrong total, both healing on the first scan because `capture_serial` answers with the episode's own numbers.",
              "properties": {
                "captured_qty": {
                  "description": "Serials already captured against this episode.",
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "description": "Serials the episode expects in total — the sum across every receive that folded into it, not this call's share.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty"
              ],
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            }
          },
          "properties": {
            "collect_serials": {
              "description": "Backend-driven gate for the `RCSN01` serial-capture loop (ADR-062, G-12). `true` when the SKU is serial-tracked (`sku_serial_config.continuous_serial_tracking`) AND the operator did NOT pass `serial_numbers` inline on this call — i.e. the deferred capture flow is needed. Seed routes RCSN01 only when this is `true`.",
              "type": "boolean"
            },
            "completion_detail": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "completion_header": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "holds_applied": {
              "description": "D-28 — auto-holds applied to LPN during this receive. Empty if none.",
              "items": {
                "$ref": "#/definitions/HoldInfo"
              },
              "type": "array"
            },
            "line_number": {
              "type": "string"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "open_episode": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenEpisodeState"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The capture episode this receive opened or folded into, with what it now holds in total. A progress panel reads THIS, never the increment above: a second receive on the same line sums into one episode."
            },
            "owner_id": {
              "description": "Owner that owns the just-received line. Surfaced so RCSN01 / its status bar can render `owner / sku / lot` without a second round-trip; future `capture_serial` validation will also cross- check the operator's session against this.",
              "format": "int64",
              "type": "integer"
            },
            "qty_received": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "serials_to_collect_qty": {
              "description": "How many serials the operator must collect to satisfy the just- received line. `qty as u32` (floored — serial-tracked SKUs are always integer-unit). Zero when `collect_serials` is `false`.\n\nTHIS call's obligation. The episode may hold more — see `open_episode`.",
              "format": "uint32",
              "minimum": 0.0,
              "type": "integer"
            },
            "sku_code": {
              "description": "SKU code of the just-received line (matches `receipt_detail.sku`). Same rationale as `owner_id` — keeps the deferred loop screen self-sufficient.",
              "type": "string"
            },
            "sku_id": {
              "description": "SKU primary key. Needed by clients that want to query `sku_serial_config` (anomaly thresholds, parse mode, etc.) without first resolving by code + owner.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "collect_serials",
            "completion_detail",
            "completion_header",
            "holds_applied",
            "line_number",
            "new_version",
            "owner_id",
            "qty_received",
            "receipt_detail_id",
            "receipt_id",
            "serials_to_collect_qty",
            "sku_code",
            "sku_id"
          ],
          "title": "ReceiveAgainstAsnResult",
          "type": "object"
        }
      },
      "summary": "Receive against an existing ASN line (D-22).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3a90b3fcb553933dff548a6c69aadbc2080015f2b031ea4b4e8354cba686fd1b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:d28b1c7dd187fa000353f0e01cea477f383f81aa7a843817b80033fc77cc2a9b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "cancel_reason": {
                "type": "string"
              },
              "expected_receipt_version": {
                "description": "Receipt-header OCC version (per the `expected_<entity>_version` naming convention shared with `AdjustReceivedQty::expected_line_version` and `SetDamageDisposition::expected_damage_version`).",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "cancel_reason",
              "expected_receipt_version",
              "idempotency_key",
              "receipt_id"
            ],
            "title": "CancelReceipt",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "cancel_summary": true,
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "cancel_summary",
            "new_version",
            "receipt_id"
          ],
          "title": "CancelReceiptResult",
          "type": "object"
        }
      },
      "summary": "Cancel a receipt (D-19, completion=Pending only).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:efa29f753fd1acfc77e7a0ac18543fb7f0daf163133c2b4ee7833e1574ed2f92",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:4760e5dca812c55a3d0622efdbf1be489e824ca5509562ee441b7c74782747fa",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "receipt",
          "id_field": "receipt_id",
          "version_field": "expected_receipt_version"
        }
      ]
    },
    {
      "name": "receipt_put_on_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "comments": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hold_reason_code": {
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "hold_reason_code",
              "idempotency_key",
              "receipt_id"
            ],
            "title": "PutOnHold",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "details_held": {
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "details_held",
            "new_version",
            "receipt_id"
          ],
          "title": "PutOnHoldResult",
          "type": "object"
        }
      },
      "summary": "Put a receipt on hold (cascades to non-terminal details).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:49820a7b60beea3c87846dd63bbab08ae8a4f5827bffc678741e47f15dae243a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7cd8ed44fc9566c0714b4b4469fd0ae09c75455e0ad37c8e6df8b68c5976a87a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_release_from_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "release_comments": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "receipt_id"
            ],
            "title": "ReleaseFromHold",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "details_released": {
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "details_released",
            "new_version",
            "receipt_id"
          ],
          "title": "ReleaseFromHoldResult",
          "type": "object"
        }
      },
      "summary": "Release a receipt from hold.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0d18aa385b6f44e14d00d8bffa3f4429202eb1d4b33a172f01b617000053ca8d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:12e4f538b24fb736cfa7a0216bca51bacbfff19c7a8facfe7af45a8be7bc970f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_report_damage",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageSeverity": {
                "description": "Per migration 084 + D-26. Damage classification.",
                "oneOf": [
                  {
                    "enum": [
                      "Minor",
                      "Major",
                      "Total"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                    "enum": [
                      "Cosmetic"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "damaged_qty": {
                "format": "double",
                "type": "number"
              },
              "dest_loc": {
                "default": null,
                "description": "Optional destination location for an auto-triggered Move primitive (Move Spec §0 D-9, Kanban M-115). When populated: - severity=Major  → MoveCommand(source_type=MoveToQc, dest_loc=...) - severity=Total  → MoveCommand(source_type=MoveToDamage, dest_loc=...) - severity=Minor  → no move regardless of dest_loc. When `None` → legacy behavior (damage row + lpn hold only, no physical move). Caller (operator UI / future allocation policy epic) resolves which location to use; MoveCommand never resolves itself.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "photo_attachment_ids": {
                "description": "Ключи объектов, которые оператор уже загрузил по подписанным ссылкам (`receipt_damage_photo_upload_url`). Ложатся в `receipt_detail_damage.photo_attachment_ids` В ТОЙ ЖЕ ТРАНЗАКЦИИ, что и сама запись, — либо запись с фотографиями, либо ни то, ни другое.\n\nНеобязательны, и это не формальность: в макете фото «recommended», и повреждение записывается без них.\n\n**Тип поля был `Option<Vec<i64>>`** — с Phase 1, где фотографии мыслились числовыми id вложений (колонку завела wms-app 084 как «Phase 2+ attachments»). Ключ объекта в S3 — строка, и в `i64` он не влезает; менять тип безопасно, потому что отправителя у поля никогда не было: во всех вызовах (включая `app_server_quick_dev`) оно `null`. Имя колонки осталось историческим — миграции под фото не требуется.\n\nКаждый ключ проверяется на принадлежность ЭТОЙ строке приёмки ([`photo_column_for_line`]): значение приезжает от клиента, и без проверки к своему повреждению можно было бы прицепить чужую фотографию.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "reason_code": {
                "type": "string"
              },
              "reason_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_detail_id": {
                "format": "int64",
                "type": "integer"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "severity": {
                "$ref": "#/definitions/DamageSeverity"
              },
              "vendor_responsibility": {
                "default": false,
                "description": "Operator's assessment: true = vendor responsible (drives ERP vendor-claim event downstream); false (default) = warehouse-eaten / undecided. Audit-only — Quark doesn't branch on it.",
                "type": "boolean"
              }
            },
            "required": [
              "damaged_qty",
              "idempotency_key",
              "reason_code",
              "receipt_detail_id",
              "receipt_id",
              "severity"
            ],
            "title": "ReportDamage",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "HoldInfo": {
              "description": "Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "scope": {
                  "$ref": "#/definitions/HoldScope"
                }
              },
              "required": [
                "code",
                "reason",
                "scope"
              ],
              "type": "object"
            },
            "HoldScope": {
              "oneOf": [
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lpn"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lot"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Loc"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            }
          },
          "properties": {
            "action_taken": {
              "$ref": "#/definitions/DamageAction"
            },
            "damage_record_id": {
              "format": "int64",
              "type": "integer"
            },
            "holds_applied": {
              "default": [],
              "description": "Holds applied as a side-effect of severity-mapped action (e.g. `DamageAction::Hold` → 1 entry with code='Damaged' on the LPN). Empty when severity maps to None/Reject, OR when the LPN lookup found nothing to hold (CRUD-fixture line without a deposit step).",
              "items": {
                "$ref": "#/definitions/HoldInfo"
              },
              "type": "array"
            },
            "new_qty_damaged": {
              "format": "double",
              "type": "number"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "action_taken",
            "damage_record_id",
            "new_qty_damaged",
            "new_version",
            "receipt_id"
          ],
          "title": "ReportDamageResult",
          "type": "object"
        }
      },
      "summary": "Report damage on a receipt detail (D-26).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:444e4dd8e627acdf2627aeb31313fe916b27ddc9495a87ca3e15e73c12902a50",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:ff7591200d121f9f61c138141f9e22bc1ea5a3a732e46bc67b9adb6c879fdb46",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_write_off_damage",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "damage_record_id": {
                "format": "int64",
                "type": "integer"
              },
              "gl_account_hint": {
                "description": "Optional GL account override; when None, falls back to `OwnerConfig.write_off_gl_account_hint` for the receipt's owner. Either way, ERP partner consumes the hint or maps it through their own table.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason_code": {
                "description": "Free-form reason code (e.g. NoRecoveryValue, TotalLoss, OperatorAccident).",
                "type": "string"
              },
              "reason_description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "damage_record_id",
              "idempotency_key",
              "reason_code"
            ],
            "title": "WriteOffDamage",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "damage_record_id": {
              "format": "int64",
              "type": "integer"
            },
            "disposition": {
              "type": "string"
            },
            "holds_released": {
              "description": "Number of Damaged-code holds released as part of write-off.",
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "transaction_log_id": {
              "description": "transaction_log row id created by the inventory decrement.",
              "format": "int64",
              "type": "integer"
            },
            "written_off_qty": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "damage_record_id",
            "disposition",
            "holds_released",
            "transaction_log_id",
            "written_off_qty"
          ],
          "title": "WriteOffDamageResult",
          "type": "object"
        }
      },
      "summary": "Write off a damage record — decrements inventory, releases Damaged hold, sets disposition='WrittenOff', publishes damage.disposition_decided + damage.written_off (T-062).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e0c1c58a4931eb7ebf10014a0db0b555b232dd68c6f0ba500048f72140ebc209",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:37ae26523d1229ead3c5b131ef8125af20931fa0e7354c3ff248b09de40e4706",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_move_damage_to_rtv",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "description": "Forwarded to the inner Move primitive's hold-aware validator (§3.2.3) — supervisor overrides cascade through.",
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "claim_amount_hint": {
                "description": "Optional operator/supervisor estimate of vendor claim amount; passed as `claim_amount_hint` in the outbox event for the ERP-side claim.",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "damage_record_id": {
                "format": "int64",
                "type": "integer"
              },
              "dest_loc": {
                "description": "Optional explicit destination override. When None, falls back to `OwnerConfig.default_rtv_loc` → `OwnerConfig.default_returns_loc`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "gl_account_hint": {
                "description": "Optional GL account override; when None, falls back to `OwnerConfig.rtv_gl_account_hint`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason_code": {
                "description": "Free-form reason code (e.g. SUPPLIER_PACKAGING, TRANSIT_DAMAGE).",
                "type": "string"
              },
              "reason_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vendor_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "damage_record_id",
              "idempotency_key",
              "reason_code"
            ],
            "title": "MoveDamageToRtv",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "damage_record_id": {
              "format": "int64",
              "type": "integer"
            },
            "disposition": {
              "type": "string"
            },
            "from_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "qty_moved": {
              "format": "double",
              "type": "number"
            },
            "to_loc": {
              "type": "string"
            }
          },
          "required": [
            "damage_record_id",
            "disposition",
            "qty_moved",
            "to_loc"
          ],
          "title": "MoveDamageToRtvResult",
          "type": "object"
        }
      },
      "summary": "Move a damaged LPN to RTV staging — triggers MoveCommand(MoveToRtv), sets disposition='RTV', publishes damage.disposition_decided + damage.rtv_initiated (T-062).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:df25d23236d821605e4eda0076b2e52d7eb457b4b700b6d7392928abd8b5f373",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:0e8fc932bb4287f9cd45b65cebb72129c007c72a907fdcb0a1be04b2580d54e7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_set_damage_disposition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "SetDamageDispositionKind": {
                "description": "Lightweight disposition kinds — explicit enum so callers can't accidentally pass arbitrary strings into the `disposition` column. WrittenOff/RTV land via the dedicated commands (WriteOffDamage / MoveDamageToRtv) since they have physical effects.",
                "enum": [
                  "Repurpose",
                  "Destroyed"
                ],
                "type": "string"
              }
            },
            "properties": {
              "damage_record_id": {
                "format": "int64",
                "type": "integer"
              },
              "disposition": {
                "$ref": "#/definitions/SetDamageDispositionKind"
              },
              "expected_damage_version": {
                "description": "Per-row OCC version (Slice #3, migration 157). Operator's disposition decision depends on what they read about the damage record (severity is immutable, but `move_failed` may flip false→true asynchronously after an auto-move retry). Stale read of `move_failed=false` → operator chose Repurpose, but the auto-move actually failed → operator might have escalated instead. OCC surfaces the change so the operator re-decides.\n\nVersioned entity: `receipt_detail_damage`.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason_code": {
                "type": "string"
              },
              "reason_description": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "damage_record_id",
              "disposition",
              "expected_damage_version",
              "idempotency_key",
              "reason_code"
            ],
            "title": "SetDamageDisposition",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "damage_record_id": {
              "format": "int64",
              "type": "integer"
            },
            "disposition": {
              "type": "string"
            },
            "new_damage_version": {
              "description": "Post-bump damage_record version (Slice #3). Caller chains this into any follow-up command on the same damage row.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "damage_record_id",
            "disposition",
            "new_damage_version"
          ],
          "title": "SetDamageDispositionResult",
          "type": "object"
        }
      },
      "summary": "Set damage disposition marker (Repurpose | Destroyed) — no physical effect, just records the decision + publishes damage.disposition_decided (T-062).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e226e8bca9453146d6280727e1130981781c33bb318989cd452c13600420cdce",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a22efc46d5511a1717f6d2c3c8572e41366f4995899ff7e230322c36322c6004",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "receipt_detail_damage",
          "id_field": "damage_record_id",
          "version_field": "expected_damage_version"
        }
      ]
    },
    {
      "name": "receipt_receive_blind",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageInfo": {
                "properties": {
                  "reason_code": {
                    "type": "string"
                  },
                  "reason_description": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "severity": {
                    "$ref": "#/definitions/DamageSeverity"
                  },
                  "vendor_responsibility": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason_code",
                  "severity"
                ],
                "type": "object"
              },
              "DamageSeverity": {
                "description": "Per migration 084 + D-26. Damage classification.",
                "oneOf": [
                  {
                    "enum": [
                      "Minor",
                      "Major",
                      "Total"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                    "enum": [
                      "Cosmetic"
                    ],
                    "type": "string"
                  }
                ]
              },
              "ReceiptType": {
                "oneOf": [
                  {
                    "enum": [
                      "Normal",
                      "CustomerReturn",
                      "Sscc",
                      "CaseLevel"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Receiving Without ASN, assigned by the server.",
                    "enum": [
                      "NoAsn"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Goods arriving from another facility of the same company.",
                    "enum": [
                      "InterFacilityTransfer"
                    ],
                    "type": "string"
                  }
                ]
              },
              "TargetContainerSpec": {
                "oneOf": [
                  {
                    "description": "No container — loose units.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Resolve an existing container by code.",
                    "properties": {
                      "Existing": {
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "Existing"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.",
                    "properties": {
                      "NewPallet": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sscc": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a new case, optionally nested under an existing pallet.",
                    "properties": {
                      "NewCase": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_pallet_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewCase"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Add a new case as child of an existing pallet.",
                    "properties": {
                      "AddCaseToPallet": {
                        "properties": {
                          "new_case_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pallet_code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pallet_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "AddCaseToPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Cross-dock staging container (Phase 2 cross-dock; outbound order ref).",
                    "properties": {
                      "CrossDock": {
                        "properties": {
                          "outbound_order_id": {
                            "format": "int64",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "CrossDock"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "damage_info": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageInfo"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "UC-RCV-09 — when the operator marks this receive line as damaged (RCDMG_RECV01 flow), the RF client sends a nested DamageInfo payload. Backend auto-fires `ReportDamage` in the same tx so the audit row lands atomically with the receipt_detail row."
              },
              "external_lot": {
                "default": null,
                "description": "Supplier-side lot ID scanned by the operator. Triggers D-64 `validate_external_lot_uniqueness` in the validation pipeline. Optional — most blind receives don't carry one.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "po_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "printer_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_type": {
                "allOf": [
                  {
                    "$ref": "#/definitions/ReceiptType"
                  }
                ],
                "description": "Legacy wire field. The server persists NoAsn regardless of this input."
              },
              "serial_numbers": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              },
              "supplier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "target_container": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/TargetContainerSpec"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Phase 4 — preferred container intent. Falls back to `to_lpn` when None."
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_loc": {
                "type": "string"
              },
              "to_lpn": {
                "description": "Legacy LPN-string input. Ignored when `target_container` is populated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "default": null,
                "description": "ADR-045 §1 — operator-entered native UOM (e.g. \"CS\"). When None, resolver falls back to `sku.default_uom`. `qty` field above is interpreted in this UOM; resolver converts to base for storage.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "owner_id",
              "qty",
              "receipt_type",
              "sku_code",
              "to_loc"
            ],
            "title": "ReceiveBlind",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HoldInfo": {
              "description": "Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "scope": {
                  "$ref": "#/definitions/HoldScope"
                }
              },
              "required": [
                "code",
                "reason",
                "scope"
              ],
              "type": "object"
            },
            "HoldScope": {
              "oneOf": [
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lpn"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lot"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Loc"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "OpenEpisodeState": {
              "description": "The capture episode as it stands after this receive folded into it.\n\nNamed like the shapes the wire already carries for exactly this purpose — `OpenEpisodeBrief` on `get_asn_by_number` and `OpenEpisodeRow` on `list_open_episodes_for_receipt` — so a client reads one vocabulary wherever it meets an episode. Those two live in app-server, which a domain crate may not depend on, so the names travel rather than the type.\n\n**Why the result must carry it.** `serials_to_collect_qty` is what THIS call owes. A second receive on the same line folds into the same episode (`ensure_open_episode_for_deferred_receive`), so the episode's total is the sum and its `captured_qty` may already be non-zero. A client drawing a progress panel from the receive answer had only the increment to read, and the web dialog opened it on \"0 of <increment>\" — an invented zero and the wrong total, both healing on the first scan because `capture_serial` answers with the episode's own numbers.",
              "properties": {
                "captured_qty": {
                  "description": "Serials already captured against this episode.",
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "description": "Serials the episode expects in total — the sum across every receive that folded into it, not this call's share.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty"
              ],
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            }
          },
          "properties": {
            "collect_serials": {
              "description": "Mirror of `ReceiveAgainstAsnResult.collect_serials` (G-12). True when the just-received line needs the deferred RCSN01 capture loop next — SKU is serial-tracked AND the operator didn't supply serials inline. RCBLIND01LINE.onResponseReceive uses this to branch into RCSN01 instead of dropping straight to DONE.",
              "type": "boolean"
            },
            "completion_detail": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "completion_header": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "holds_applied": {
              "description": "D-28 — auto-holds applied during this receive.",
              "items": {
                "$ref": "#/definitions/HoldInfo"
              },
              "type": "array"
            },
            "line_number": {
              "type": "string"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "open_episode": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenEpisodeState"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The capture episode this receive opened or folded into. A progress panel reads this, never the increment above."
            },
            "qty_received": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_number": {
              "type": "string"
            },
            "serials_to_collect_qty": {
              "description": "Number of serials the operator must collect to satisfy this line. `floor(qty)` for serial-tracked SKUs (always integer-unit); zero when `collect_serials` is `false`. THIS call's obligation — the episode may hold more, see `open_episode`.",
              "format": "uint32",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "collect_serials",
            "completion_detail",
            "completion_header",
            "holds_applied",
            "line_number",
            "new_version",
            "qty_received",
            "receipt_detail_id",
            "receipt_id",
            "receipt_number",
            "serials_to_collect_qty"
          ],
          "title": "ReceiveBlindResult",
          "type": "object"
        }
      },
      "summary": "Open a fully blind receipt + first line.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:effdea8cc2ee9fa1473a18608286839d65d3d5c7ed096ee4d03fdebe9d46b23f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:887e662f7ba0a243ea4a31efbd823bde1b319db3c2f921f5a4d14be641f1d193",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_receive_blind_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageInfo": {
                "properties": {
                  "reason_code": {
                    "type": "string"
                  },
                  "reason_description": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "severity": {
                    "$ref": "#/definitions/DamageSeverity"
                  },
                  "vendor_responsibility": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason_code",
                  "severity"
                ],
                "type": "object"
              },
              "DamageSeverity": {
                "description": "Per migration 084 + D-26. Damage classification.",
                "oneOf": [
                  {
                    "enum": [
                      "Minor",
                      "Major",
                      "Total"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                    "enum": [
                      "Cosmetic"
                    ],
                    "type": "string"
                  }
                ]
              },
              "TargetContainerSpec": {
                "oneOf": [
                  {
                    "description": "No container — loose units.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Resolve an existing container by code.",
                    "properties": {
                      "Existing": {
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "Existing"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.",
                    "properties": {
                      "NewPallet": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sscc": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a new case, optionally nested under an existing pallet.",
                    "properties": {
                      "NewCase": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_pallet_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewCase"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Add a new case as child of an existing pallet.",
                    "properties": {
                      "AddCaseToPallet": {
                        "properties": {
                          "new_case_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pallet_code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pallet_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "AddCaseToPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Cross-dock staging container (Phase 2 cross-dock; outbound order ref).",
                    "properties": {
                      "CrossDock": {
                        "properties": {
                          "outbound_order_id": {
                            "format": "int64",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "CrossDock"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "damage_info": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageInfo"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "UC-RCV-09 — see ReceiveBlind.damage_info doc."
              },
              "external_lot": {
                "default": null,
                "description": "Supplier-side lot ID scanned by the operator. Triggers D-64 `validate_external_lot_uniqueness` in the validation pipeline. Optional — most blind receives don't carry one.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pack_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "printer_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "serial_numbers": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              },
              "target_container": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/TargetContainerSpec"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Phase 4 — preferred container intent. Falls back to `to_lpn` when None."
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_loc": {
                "type": "string"
              },
              "to_lpn": {
                "description": "Legacy LPN-string input. Ignored when `target_container` is populated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "default": null,
                "description": "ADR-045 §1 — native UOM as entered (defaults to sku.default_uom).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "qty",
              "receipt_id",
              "sku_code",
              "to_loc"
            ],
            "title": "ReceiveBlindLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HoldInfo": {
              "description": "Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "scope": {
                  "$ref": "#/definitions/HoldScope"
                }
              },
              "required": [
                "code",
                "reason",
                "scope"
              ],
              "type": "object"
            },
            "HoldScope": {
              "oneOf": [
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lpn"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lot"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Loc"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "OpenEpisodeState": {
              "description": "The capture episode as it stands after this receive folded into it.\n\nNamed like the shapes the wire already carries for exactly this purpose — `OpenEpisodeBrief` on `get_asn_by_number` and `OpenEpisodeRow` on `list_open_episodes_for_receipt` — so a client reads one vocabulary wherever it meets an episode. Those two live in app-server, which a domain crate may not depend on, so the names travel rather than the type.\n\n**Why the result must carry it.** `serials_to_collect_qty` is what THIS call owes. A second receive on the same line folds into the same episode (`ensure_open_episode_for_deferred_receive`), so the episode's total is the sum and its `captured_qty` may already be non-zero. A client drawing a progress panel from the receive answer had only the increment to read, and the web dialog opened it on \"0 of <increment>\" — an invented zero and the wrong total, both healing on the first scan because `capture_serial` answers with the episode's own numbers.",
              "properties": {
                "captured_qty": {
                  "description": "Serials already captured against this episode.",
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "description": "Serials the episode expects in total — the sum across every receive that folded into it, not this call's share.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty"
              ],
              "type": "object"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            }
          },
          "properties": {
            "collect_serials": {
              "description": "Mirror of `ReceiveAgainstAsnResult.collect_serials` — true when the just-added line needs the RCSN01 deferred-capture loop next. See `receive_blind.rs` doc for the full rationale.",
              "type": "boolean"
            },
            "completion_detail": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "completion_header": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "holds_applied": {
              "items": {
                "$ref": "#/definitions/HoldInfo"
              },
              "type": "array"
            },
            "line_number": {
              "type": "string"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "open_episode": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenEpisodeState"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The capture episode this receive opened or folded into. A progress panel reads this, never the increment above."
            },
            "qty_received": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "serials_to_collect_qty": {
              "description": "Number of serials the operator must collect; `floor(qty)` for serial-tracked SKUs (always integer-unit), zero otherwise. THIS call's obligation — the episode may hold more, see `open_episode`.",
              "format": "uint32",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "collect_serials",
            "completion_detail",
            "completion_header",
            "holds_applied",
            "line_number",
            "new_version",
            "qty_received",
            "receipt_detail_id",
            "receipt_id",
            "serials_to_collect_qty"
          ],
          "title": "ReceiveBlindLineResult",
          "type": "object"
        }
      },
      "summary": "Receive a blind SKU line on an existing receipt.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:92d1896897ca069b113687ff5e921b258b4bfeeacc599ba1da5b74b1f57f1d7b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fe264841003ff41532d61962186ac7226205aedc5246a1e6e3257b9a6db63cd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_receive_return",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageInfo": {
                "properties": {
                  "reason_code": {
                    "type": "string"
                  },
                  "reason_description": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "severity": {
                    "$ref": "#/definitions/DamageSeverity"
                  },
                  "vendor_responsibility": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason_code",
                  "severity"
                ],
                "type": "object"
              },
              "DamageSeverity": {
                "description": "Per migration 084 + D-26. Damage classification.",
                "oneOf": [
                  {
                    "enum": [
                      "Minor",
                      "Major",
                      "Total"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                    "enum": [
                      "Cosmetic"
                    ],
                    "type": "string"
                  }
                ]
              },
              "ReturnCondition": {
                "enum": [
                  "Resaleable",
                  "NeedsRefurb",
                  "Damaged",
                  "Discard"
                ],
                "type": "string"
              },
              "TargetContainerSpec": {
                "oneOf": [
                  {
                    "description": "No container — loose units.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Resolve an existing container by code.",
                    "properties": {
                      "Existing": {
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "Existing"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.",
                    "properties": {
                      "NewPallet": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sscc": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a new case, optionally nested under an existing pallet.",
                    "properties": {
                      "NewCase": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_pallet_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewCase"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Add a new case as child of an existing pallet.",
                    "properties": {
                      "AddCaseToPallet": {
                        "properties": {
                          "new_case_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pallet_code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pallet_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "AddCaseToPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Cross-dock staging container (Phase 2 cross-dock; outbound order ref).",
                    "properties": {
                      "CrossDock": {
                        "properties": {
                          "outbound_order_id": {
                            "format": "int64",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "CrossDock"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "condition": {
                "$ref": "#/definitions/ReturnCondition"
              },
              "damage_info": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageInfo"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "UC-RCV-09 + UC-RCV-03 — when condition=Damaged operator may also capture severity/reason/description/vendor_responsibility via this nested payload. Auto-fired ReportDamage attaches the audit row to the just-created return line. No-op when None (Resaleable / NeedsRefurb / Discard receives, OR Damaged receives without extra details)."
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "original_order_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "printer_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "return_reason_code": {
                "type": "string"
              },
              "rma": {
                "type": "string"
              },
              "sku_code": {
                "type": "string"
              },
              "target_container": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/TargetContainerSpec"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Phase 4 — preferred container intent. Falls back to `to_lpn` when None."
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_loc": {
                "type": "string"
              },
              "to_lpn": {
                "description": "Legacy LPN-string input. Ignored when `target_container` is populated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "default": null,
                "description": "ADR-045 §1 — native UOM as entered by the operator at return.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "condition",
              "idempotency_key",
              "owner_id",
              "qty",
              "return_reason_code",
              "rma",
              "sku_code",
              "to_loc"
            ],
            "title": "ReceiveReturn",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HoldInfo": {
              "description": "Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "scope": {
                  "$ref": "#/definitions/HoldScope"
                }
              },
              "required": [
                "code",
                "reason",
                "scope"
              ],
              "type": "object"
            },
            "HoldScope": {
              "oneOf": [
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lpn"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lot"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Loc"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            }
          },
          "properties": {
            "completion_detail": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "completion_header": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "deposited": {
              "description": "Echoed for post_commit auto-print decision (whether deposit happened).",
              "type": "boolean"
            },
            "holds_applied": {
              "description": "D-28 — auto-holds applied during this receive (Resaleable / NeedsRefurb only).",
              "items": {
                "$ref": "#/definitions/HoldInfo"
              },
              "type": "array"
            },
            "line_number": {
              "type": "string"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "qty_damaged": {
              "format": "double",
              "type": "number"
            },
            "qty_received": {
              "format": "double",
              "type": "number"
            },
            "qty_rejected": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_number": {
              "type": "string"
            }
          },
          "required": [
            "completion_detail",
            "completion_header",
            "deposited",
            "holds_applied",
            "line_number",
            "new_version",
            "qty_damaged",
            "qty_received",
            "qty_rejected",
            "receipt_detail_id",
            "receipt_id",
            "receipt_number"
          ],
          "title": "ReceiveReturnResult",
          "type": "object"
        }
      },
      "summary": "Receive a customer return (RMA flow).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ce6d53506bffdffdec0d6abf7c7697909e32d0d165303023591693be9609b810",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:1ded426327a64f774635f2147a44cbe4e51f93b55f03ddf20274f24f2d78d85c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_receive_return_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "DamageInfo": {
                "properties": {
                  "reason_code": {
                    "type": "string"
                  },
                  "reason_description": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "severity": {
                    "$ref": "#/definitions/DamageSeverity"
                  },
                  "vendor_responsibility": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": [
                  "reason_code",
                  "severity"
                ],
                "type": "object"
              },
              "DamageSeverity": {
                "description": "Per migration 084 + D-26. Damage classification.",
                "oneOf": [
                  {
                    "enum": [
                      "Minor",
                      "Major",
                      "Total"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                    "enum": [
                      "Cosmetic"
                    ],
                    "type": "string"
                  }
                ]
              },
              "ReturnCondition": {
                "enum": [
                  "Resaleable",
                  "NeedsRefurb",
                  "Damaged",
                  "Discard"
                ],
                "type": "string"
              },
              "TargetContainerSpec": {
                "oneOf": [
                  {
                    "description": "No container — loose units.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Resolve an existing container by code.",
                    "properties": {
                      "Existing": {
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "Existing"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.",
                    "properties": {
                      "NewPallet": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sscc": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a new case, optionally nested under an existing pallet.",
                    "properties": {
                      "NewCase": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_pallet_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewCase"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Add a new case as child of an existing pallet.",
                    "properties": {
                      "AddCaseToPallet": {
                        "properties": {
                          "new_case_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pallet_code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pallet_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "AddCaseToPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Cross-dock staging container (Phase 2 cross-dock; outbound order ref).",
                    "properties": {
                      "CrossDock": {
                        "properties": {
                          "outbound_order_id": {
                            "format": "int64",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "CrossDock"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "condition": {
                "$ref": "#/definitions/ReturnCondition"
              },
              "damage_info": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/DamageInfo"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "UC-RCV-09 + UC-RCV-03 — see ReceiveReturn.damage_info doc."
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_id": {
                "description": "Owner_id is **optional** here — when None, falls back to the locked receipt's owner_id. ReceiveReturn pinned this from the original RMA submission; subsequent lines don't need to repeat it because the receipt is already owner-pinned.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pack_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "printer_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "return_reason_code": {
                "type": "string"
              },
              "rma": {
                "type": "string"
              },
              "sku_code": {
                "type": "string"
              },
              "target_container": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/TargetContainerSpec"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_loc": {
                "type": "string"
              },
              "to_lpn": {
                "description": "Legacy LPN-string input. Ignored when `target_container` is populated.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "default": null,
                "description": "ADR-045 §1 — native UOM as entered by the operator at return.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "condition",
              "idempotency_key",
              "qty",
              "receipt_id",
              "return_reason_code",
              "rma",
              "sku_code",
              "to_loc"
            ],
            "title": "ReceiveReturnLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "HoldInfo": {
              "description": "Per Decisions Log D-28. Auto-hold instruction emitted by validators (NOT an error). Returned to RF in command Output structs so client knows what holds were applied.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "scope": {
                  "$ref": "#/definitions/HoldScope"
                }
              },
              "required": [
                "code",
                "reason",
                "scope"
              ],
              "type": "object"
            },
            "HoldScope": {
              "oneOf": [
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lpn"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Lot"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "kind": {
                      "enum": [
                        "Loc"
                      ],
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "value"
                  ],
                  "type": "object"
                }
              ]
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            }
          },
          "properties": {
            "completion_detail": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "completion_header": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "deposited": {
              "description": "Echoed for post_commit auto-print decision (whether deposit happened).",
              "type": "boolean"
            },
            "holds_applied": {
              "items": {
                "$ref": "#/definitions/HoldInfo"
              },
              "type": "array"
            },
            "line_number": {
              "type": "string"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "qty_damaged": {
              "format": "double",
              "type": "number"
            },
            "qty_received": {
              "format": "double",
              "type": "number"
            },
            "qty_rejected": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "completion_detail",
            "completion_header",
            "deposited",
            "holds_applied",
            "line_number",
            "new_version",
            "qty_damaged",
            "qty_received",
            "qty_rejected",
            "receipt_detail_id",
            "receipt_id"
          ],
          "title": "ReceiveReturnLineResult",
          "type": "object"
        }
      },
      "summary": "Receive an additional line on an existing Customer Return (multi-line F3).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a1da01f08362088886e3769d71bda63342c03ad3465d1d5ac9398fbaead2720b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:543e448a935ee6c32f2403daea8a84c2a8c4281f4452dc35230473e92c6efeaf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "expected_receipt_version": {
                "description": "Receipt-header OCC version (per the `expected_<entity>_version` naming convention shared with `AdjustReceivedQty::expected_line_version` and `SetDamageDisposition::expected_damage_version`).",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "override_grant_id": {
                "default": null,
                "description": "A supervisor's grant (`supervisor_override_grant`) authorising the discrepancy (code 71) on THIS receipt, for a receiver who does not hold `receipt.override_close_discrepancy`. Its pair must be `{code: 71, subject: \"receipt:<receipt_id>\"}`; the authoriser recorded in `close_summary.discrepancy_override` and on the closed event is the grant's, never a field of this request. Optional: a supervisor closing on their own capability keeps sending the bare 71 in `acknowledged_overrides`, exactly as before. Not part of the OCC contract — `receipt_close` stays a `stateful_command` versioned on the receipt alone. See `shared::override_grant`.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_receipt_version",
              "idempotency_key",
              "receipt_id"
            ],
            "title": "CloseReceipt",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "close_summary": true,
            "completion": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            }
          },
          "required": [
            "close_summary",
            "completion",
            "new_version",
            "receipt_id",
            "status"
          ],
          "title": "CloseReceiptResult",
          "type": "object"
        }
      },
      "summary": "Close a receipt with optional discrepancy override (D-21).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a68ec871c733a306ac17304b16a1d75eeb494cef260bbf5c6063a83703e2f1b1",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:3a481a2c00b7b2e479664e34d2d437f7d8d68b1e6f2c46a702964dca11f2e107",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "receipt",
          "id_field": "receipt_id",
          "version_field": "expected_receipt_version"
        }
      ]
    },
    {
      "name": "receipt_adjust_received_qty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "delta_qty": {
                "format": "double",
                "type": "number"
              },
              "expected_line_version": {
                "description": "Per-line OCC version (Slice #2, migration 156). Previous wiring used the receipt HEADER version — the \"aggregate version on header for line-level commands\" anti-pattern from `.claude/rules/api-versioning-and-idempotency.md`. Two pickers adjusting DIFFERENT lines collided on the shared header version with false OCC conflicts. Now each line carries its own version and adjust OCC-checks against the line.\n\nWire field renamed from `expected_version` to surface the classifier change loudly to existing callers (deserialize error on stale shape, not silent header-vs-line confusion).",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason_code": {
                "type": "string"
              },
              "reason_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_detail_id": {
                "format": "int64",
                "type": "integer"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "delta_qty",
              "expected_line_version",
              "idempotency_key",
              "reason_code",
              "receipt_detail_id",
              "receipt_id"
            ],
            "title": "AdjustReceivedQty",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            }
          },
          "properties": {
            "completion_detail": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "completion_header": {
              "$ref": "#/definitions/ReceiptCompletion"
            },
            "new_header_version": {
              "description": "Post-bump header version. Adjust still touches the header (via `recompute_completion` → header.completion), so callers that need to issue a subsequent header-level command (`receipt_close`, `receipt_cancel`) must refresh against this.",
              "format": "int32",
              "type": "integer"
            },
            "new_line_version": {
              "description": "Post-bump line version (Slice #2). Replaces the previous `new_version` which was the bumped HEADER version. Callers chain this into a follow-up `expected_line_version` if they're issuing more adjusts on the same line.",
              "format": "int32",
              "type": "integer"
            },
            "new_qty_received": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "transaction_log_id": {
              "description": "Id of the corrective transaction_log row. Every successful adjustment is negative; positive adjustments are refused before mutation because they need the physical context carried by a Receive command.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "completion_detail",
            "completion_header",
            "new_header_version",
            "new_line_version",
            "new_qty_received",
            "receipt_detail_id",
            "receipt_id",
            "transaction_log_id"
          ],
          "title": "AdjustReceivedQtyResult",
          "type": "object"
        }
      },
      "summary": "Adjust a previously received qty (delta + reason).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bd71ca64f746073e6ff9c8987d575bdf2263e3bdcadf3dd1a952dcd61f099ce2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:dad6cf912fdd1df97a4a1d9bffba19b85f550bcf2c36ebe5f3cded9dc73b6a28",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "receipt_detail",
          "id_field": "receipt_detail_id",
          "version_field": "expected_line_version"
        }
      ]
    },
    {
      "name": "receipt_kpi_aggregate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "since": {
                "description": "Inclusive lower-bound (UTC ISO 8601). Default: 7 days ago.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "until": {
                "description": "Exclusive upper-bound. Default: now.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "warehouse": {
                "description": "Optional warehouse filter (matches `enterprise.integration_event.warehouse`).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "ReceiptKpiQuery",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "UserThroughput": {
              "properties": {
                "hours_span": {
                  "format": "double",
                  "type": "number"
                },
                "line_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "lines_per_hour": {
                  "format": "double",
                  "type": "number"
                },
                "user_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "hours_span",
                "line_count",
                "lines_per_hour",
                "user_id"
              ],
              "type": "object"
            }
          },
          "properties": {
            "avg_completion_pct": {
              "description": "Avg completion ratio across receipts that have been closed in window.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "dock_to_stock_avg_seconds": {
              "description": "Average dock-to-stock duration in seconds (D-34 ready_for_putaway events).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "dock_to_stock_count": {
              "description": "Number of receipts that completed the dock-to-stock cycle in window.",
              "format": "int64",
              "type": "integer"
            },
            "line_damaged_count": {
              "format": "int64",
              "type": "integer"
            },
            "line_over_count": {
              "format": "int64",
              "type": "integer"
            },
            "line_received_count": {
              "description": "Total `process.receipt.line_received` events in window.",
              "format": "int64",
              "type": "integer"
            },
            "line_short_count": {
              "description": "Over/Short/Damaged counts.",
              "format": "int64",
              "type": "integer"
            },
            "lines_per_hour_per_user": {
              "description": "Per-user throughput. Vec of (user_id, count, hours_span, lines_per_hour).",
              "items": {
                "$ref": "#/definitions/UserThroughput"
              },
              "type": "array"
            },
            "osd_rate_pct": {
              "description": "(short + over + damaged) / line_received × 100.",
              "format": "double",
              "type": "number"
            },
            "since": {
              "type": "string"
            },
            "until": {
              "type": "string"
            },
            "warehouse": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "dock_to_stock_count",
            "line_damaged_count",
            "line_over_count",
            "line_received_count",
            "line_short_count",
            "lines_per_hour_per_user",
            "osd_rate_pct",
            "since",
            "until"
          ],
          "title": "ReceiptKpiResult",
          "type": "object"
        }
      },
      "summary": "Aggregate receipt KPI metrics from integration_event (Spec 5.5.4).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2880dfbec1c0ce3bb3dca66bfa32f3af9c7724639ca99422ea85511881d5c993",
      "x-quark-response-schema-hash": "sha256:7c16fa66ec75996296daefd8e20ed3d73d59e05ca50786ec679a1c28568f3fc4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_audit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "changed_at": {
              "type": "string"
            },
            "changed_by": {
              "format": "int64",
              "type": "integer"
            },
            "field_name": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "new_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "old_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "changed_at",
            "changed_by",
            "field_name",
            "id",
            "receipt_id"
          ],
          "title": "ReceiptAudit",
          "type": "object"
        }
      },
      "summary": "Get a receipt_audit by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_audit",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ca90af954a9c80f56f10d72b620d78696d494f432a18e22b059ba485b59879d2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_audit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptAudit": {
              "properties": {
                "changed_at": {
                  "type": "string"
                },
                "changed_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "field_name": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "new_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "old_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "changed_at",
                "changed_by",
                "field_name",
                "id",
                "receipt_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptAudit"
          },
          "title": "Array_of_ReceiptAudit",
          "type": "array"
        }
      },
      "summary": "List receipt_audit — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_audit",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:6e30dbd6a5ebc18fe60e4379e245c42f086d63e3b2dd07a47b9d4c537f2467d3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LotAttrCheckMode": {
                "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
                "enum": [
                  "Disabled",
                  "Advisory",
                  "Strict"
                ],
                "type": "string"
              },
              "ReceiptCompletion": {
                "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
                "enum": [
                  "Pending",
                  "Partial",
                  "Full",
                  "Over"
                ],
                "type": "string"
              },
              "ReceiptStatus": {
                "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
                "enum": [
                  "Open",
                  "InProgress",
                  "OnHold",
                  "Closed",
                  "Cancelled"
                ],
                "type": "string"
              },
              "ReceiptTargetDisposition": {
                "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
                "enum": [
                  "Stock",
                  "CrossDock",
                  "Hold"
                ],
                "type": "string"
              },
              "ReceiptType": {
                "oneOf": [
                  {
                    "enum": [
                      "Normal",
                      "CustomerReturn",
                      "Sscc",
                      "CaseLevel"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Receiving Without ASN, assigned by the server.",
                    "enum": [
                      "NoAsn"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Goods arriving from another facility of the same company.",
                    "enum": [
                      "InterFacilityTransfer"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "description": "What `create_receipt_detail` receives: the planned line, and optionally the LPN the supplier announced it on (EDI 856 SSCC).",
            "properties": {
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "best_by_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "completion": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ReceiptCompletion"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Per Decisions Log D-05. Default Pending; updated in recompute_completion."
              },
              "container_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "delivery_by_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "effective_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_lpn": {
                "default": null,
                "description": "The supplier's LPN for this line, by code. The server plans that container (`Planned`, owned by the line's owner, planned at this receipt) or reuses the one an earlier line of this receipt planned, and binds the line to it as its EXPECTED LPN (`container_id`). A scan of that LPN then finds the line by cascade tier 2.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "expiration_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_line_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "hold_code": {
                "description": "Receive-time hold code mirroring `inv_hold_code` enum values. See entity `hold_code` doc for usage.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot_attr_check_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/LotAttrCheckMode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Per-line lot-attribute policy. None on insert → DB default `Disabled` (column has `NOT NULL DEFAULT 'Disabled'`)."
              },
              "manufactured_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "po_detail_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "po_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty_adjusted": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "qty_damaged": {
                "description": "Per Decisions Log D-26.",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "qty_expected": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "qty_received": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "qty_rejected": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "reason_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "receipt_line_number": {
                "type": "string"
              },
              "receipt_type": {
                "$ref": "#/definitions/ReceiptType"
              },
              "return_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "return_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "rma": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku": {
                "type": "string"
              },
              "status": {
                "$ref": "#/definitions/ReceiptStatus"
              },
              "target_disposition": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/ReceiptTargetDisposition"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Per Decisions Log D-36."
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_container_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "to_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "to_lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "description": "ADR-045 §1 — native UOM. Set by writers via ReceiveLineDefaults resolver.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "owner_id",
              "receipt_id",
              "receipt_line_number",
              "receipt_type",
              "sku",
              "status"
            ],
            "title": "ReceiptLinePlanForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": [
                "string",
                "null"
              ]
            },
            "best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
            },
            "container_id": {
              "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "type": "string"
            },
            "expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_line_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "hold_code": {
              "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_attr_check_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotAttrCheckMode"
                }
              ],
              "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
            },
            "manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_detail_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_adjusted": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_damaged": {
              "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_expected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_received": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_rejected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_line_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "return_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "return_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "target_disposition": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptTargetDisposition"
                }
              ],
              "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "to_container_id": {
              "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "to_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom_received": {
              "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "effective_date",
            "id",
            "lot_attr_check_mode",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_id",
            "receipt_line_number",
            "receipt_type",
            "sku",
            "status",
            "target_disposition",
            "version"
          ],
          "title": "ReceiptDetail",
          "type": "object"
        }
      },
      "summary": "Add a receipt line atomically while the parent receipt accepts planning changes. Optional `expected_lpn` names the LPN the supplier announced the line on (EDI 856): the server plans that container (or reuses this receipt's planned one) and binds the line to it, so a scan of that LPN finds the line.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:92cb39fceead722ece6057d480d47d02c21c1ee1e768a128bad187af4dfee953",
      "x-quark-response-schema-hash": "sha256:c799ddafb4227e800d0b61e108509925f14d4d2fc87e7e2c96cf9ff58f191eaa",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": [
                "string",
                "null"
              ]
            },
            "best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
            },
            "container_id": {
              "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "type": "string"
            },
            "expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_line_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "hold_code": {
              "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_attr_check_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotAttrCheckMode"
                }
              ],
              "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
            },
            "manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_detail_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_adjusted": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_damaged": {
              "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_expected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_received": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_rejected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_line_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "return_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "return_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "target_disposition": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptTargetDisposition"
                }
              ],
              "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "to_container_id": {
              "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "to_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom_received": {
              "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "effective_date",
            "id",
            "lot_attr_check_mode",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_id",
            "receipt_line_number",
            "receipt_type",
            "sku",
            "status",
            "target_disposition",
            "version"
          ],
          "title": "ReceiptDetail",
          "type": "object"
        }
      },
      "summary": "Get a receipt_detail by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c799ddafb4227e800d0b61e108509925f14d4d2fc87e7e2c96cf9ff58f191eaa",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
                },
                "container_id": {
                  "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "type": "string"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_line_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_code": {
                  "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_attr_check_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotAttrCheckMode"
                    }
                  ],
                  "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_detail_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "qty_adjusted": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_damaged": {
                  "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_expected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_received": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_rejected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_line_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "return_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "return_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "target_disposition": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptTargetDisposition"
                    }
                  ],
                  "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "to_container_id": {
                  "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "to_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom_received": {
                  "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "effective_date",
                "id",
                "lot_attr_check_mode",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_id",
                "receipt_line_number",
                "receipt_type",
                "sku",
                "status",
                "target_disposition",
                "version"
              ],
              "type": "object"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptDetail"
          },
          "title": "Array_of_ReceiptDetail",
          "type": "array"
        }
      },
      "summary": "List receipt_detail — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7e66a0f80ed54c8ca0288499cf37bc68c7fb65efb93b2113829849fe0a1c1aea",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_detail_lines",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptLine": {
              "description": "A receipt line as the receipt screen lists it.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptCompletion"
                    }
                  ],
                  "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
                },
                "container_id": {
                  "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "type": "string"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_line_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_code": {
                  "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_attr_check_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotAttrCheckMode"
                    }
                  ],
                  "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
                },
                "lpn": {
                  "description": "Code of the EXPECTED LPN (`container_id`) — the one the supplier announced. `None` when the line announces none.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_detail_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "po_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "qty_adjusted": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_damaged": {
                  "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_expected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_received": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_rejected": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_line_number": {
                  "type": "string"
                },
                "receipt_type": {
                  "$ref": "#/definitions/ReceiptType"
                },
                "return_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "return_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rma": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_capture_open": {
                  "description": "A serial capture is open on this line — it can be picked up again.",
                  "type": "boolean"
                },
                "sku": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ReceiptStatus"
                },
                "target_disposition": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/ReceiptTargetDisposition"
                    }
                  ],
                  "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
                },
                "temperature": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "to_container_id": {
                  "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "to_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lpn": {
                  "description": "Code of the ACTUAL LPN (`to_container_id`) — the one the goods were received into. `None` until the first receive, and for loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom_received": {
                  "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completion",
                "effective_date",
                "id",
                "lot_attr_check_mode",
                "mod_when",
                "mod_who",
                "owner_id",
                "receipt_id",
                "receipt_line_number",
                "receipt_type",
                "serial_capture_open",
                "sku",
                "status",
                "target_disposition",
                "version"
              ],
              "type": "object"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptLine"
          },
          "title": "Array_of_ReceiptLine",
          "type": "array"
        }
      },
      "summary": "List receipt lines with their open-serial-capture flag — the receipt screen's read.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b5247ad1389d2f5fa09bdd231e3932455dcf11e2bcd3721f7247686e9fc2ccb2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_detail_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "A receipt line as the receipt screen lists it.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": [
                "string",
                "null"
              ]
            },
            "best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
            },
            "container_id": {
              "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "type": "string"
            },
            "expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_line_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "hold_code": {
              "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_attr_check_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotAttrCheckMode"
                }
              ],
              "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
            },
            "lpn": {
              "description": "Code of the EXPECTED LPN (`container_id`) — the one the supplier announced. `None` when the line announces none.",
              "type": [
                "string",
                "null"
              ]
            },
            "manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_detail_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_adjusted": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_damaged": {
              "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_expected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_received": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_rejected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_line_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "return_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "return_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_capture_open": {
              "description": "A serial capture is open on this line — it can be picked up again.",
              "type": "boolean"
            },
            "sku": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "target_disposition": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptTargetDisposition"
                }
              ],
              "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "to_container_id": {
              "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "to_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lpn": {
              "description": "Code of the ACTUAL LPN (`to_container_id`) — the one the goods were received into. `None` until the first receive, and for loose stock.",
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom_received": {
              "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "effective_date",
            "id",
            "lot_attr_check_mode",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_id",
            "receipt_line_number",
            "receipt_type",
            "serial_capture_open",
            "sku",
            "status",
            "target_disposition",
            "version"
          ],
          "title": "ReceiptLine",
          "type": "object"
        }
      },
      "summary": "Get one receipt line with its open-serial-capture flag and LPN codes — the line card's read.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d476e50250dd1e1088c8a1c6f9adabeb17283df4f71e7ef5861041072b3bba19",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_receive_context",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "LotAttributePrompt": {
              "description": "One operator-facing lot-attribute slot on a receive line screen, with the ASN-expected pre-fill and strict-lock resolved (ADR-050). Wire DTO — not a `lot_policy_attribute` row.",
              "properties": {
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_date": {
                  "description": "`true` → this slot is a DATE, not free text: one of the four date columns `lot_policy` carries (`DATE_ATTRIBUTE_CODES`), folded in as a synthetic slot so RF and the web prompt for it alongside the custom attributes.\n\nThe server has always known this and never said it, so every renderer drew a text box and the operator typed a date into it by hand — `parse_date` then accepted or silently dropped whatever arrived. The flag does not change what is sent (still a string in `lot_attributes`); it lets a screen offer the right control for it.",
                  "type": "boolean"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "readonly": {
                  "description": "`true` → operator may not edit. The line is strict-match (D-65) AND there is an expected value to enforce. Blank slots stay editable even on a strict line (nothing to lock).",
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "value": {
                  "description": "ASN-expected value for this attribute on the scanned line, when the line carries one. `None` → blank input.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "attrib_code",
                "is_date",
                "readonly",
                "required"
              ],
              "type": "object"
            },
            "PackUnit": {
              "description": "One unit the SKU can be received in; `factor` base units make one.",
              "properties": {
                "factor": {
                  "format": "double",
                  "type": "number"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "factor",
                "uom"
              ],
              "type": "object"
            },
            "ReceiveLimits": {
              "description": "The over-receipt thresholds in THIS LINE's terms, in base units over the line's open quantity. `None` = no such threshold.",
              "properties": {
                "approval_possible": {
                  "description": "Between the two, a supervisor's approval (code 27) can clear it.",
                  "type": "boolean"
                },
                "block_over_base": {
                  "description": "Beyond this, the owner refuses outright — no approval clears it.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "hard_percent": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "soft_percent": {
                  "description": "The policy's percents, for the words (\"within the +5% tolerance\").",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "warn_over_base": {
                  "description": "Up to this much over, the receive saves (amber when over at all).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "approval_possible"
              ],
              "type": "object"
            },
            "ShelfLife": {
              "properties": {
                "days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "min_on_receipt": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "type": "object"
            }
          },
          "description": "The Receive dialog's read of one line.",
          "properties": {
            "base_uom": {
              "type": "string"
            },
            "default_location": {
              "description": "Ячейка, с которой окно открывается, — `owner_config.default_receiving_loc` владельца строки (миграция 350). `None` = владелец её не назвал, и оператор выбирает сам.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected_lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "limits": {
              "$ref": "#/definitions/ReceiveLimits"
            },
            "line_number": {
              "type": "string"
            },
            "lot_prompts": {
              "description": "Exactly what RF prompts for (`build_prompts`), for THIS line.",
              "items": {
                "$ref": "#/definitions/LotAttributePrompt"
              },
              "type": "array"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "packs": {
              "description": "Smallest first. Empty when the pack has no usable item.",
              "items": {
                "$ref": "#/definitions/PackUnit"
              },
              "type": "array"
            },
            "qty_expected": {
              "format": "double",
              "type": "number"
            },
            "qty_received": {
              "format": "double",
              "type": "number"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_no": {
              "type": "string"
            },
            "shelf_life": {
              "$ref": "#/definitions/ShelfLife"
            },
            "sku_code": {
              "type": "string"
            },
            "sku_descr": {
              "type": "string"
            },
            "to_lpn": {
              "description": "What To LPN opens with — [`offered`].",
              "type": [
                "string",
                "null"
              ]
            },
            "without_lpn": {
              "$ref": "#/definitions/AllowError"
            }
          },
          "required": [
            "base_uom",
            "limits",
            "line_number",
            "lot_prompts",
            "owner_id",
            "packs",
            "qty_expected",
            "qty_received",
            "receipt_detail_id",
            "receipt_id",
            "receipt_no",
            "shelf_life",
            "sku_code",
            "sku_descr",
            "without_lpn"
          ],
          "title": "ReceiveContext",
          "type": "object"
        }
      },
      "summary": "One receipt line as the Receive dialog shows it: pack units, lot prompts, offered LPN, over-receipt limits.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:1c5d194e93cf522db0460f57b5095112a06589336c6f61904a86cd214a4544b2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "What a client may change on a receipt line: reference and planning data, and nothing the receipt is judged by.\n\nDeliberately NOT [`ReceiptDetailForUpdate`]. That struct carries `status`, `completion` and all five `qty_*` buckets — correctly, because the receive, damage and completion paths write them — and exposing it on the wire turned the generic CRUD update into a second, unguarded way to move a receipt. Measured against a live dev backend on 2026-07-31, on a receipt in `Closed`, a status whose `allowed_operations` list is EMPTY:\n\n```text update_receipt_detail{ qty_received: 9999, status: \"Open\", completion: \"Full\" } → 200 OK ```\n\n`qty_received` went 0 → 9999 against a `qty_expected` of 50, the line reopened inside a closed receipt, and the header was left reading `Closed / Pending` while its only line claimed `Full`. No version check, no stock movement, no audit row. `op1` (OPERATOR) could do it — while being denied `receipt_adjust_received_qty`, the command that does the same thing with an OCC version and a state-machine check.\n\nThe quantities are absent by CONSTRUCTION rather than filtered at runtime: a field that cannot be deserialized cannot be reintroduced by someone adding a line to a mapping function. They move only through their own commands.\n\nAlso absent, and each for its own reason: - `receipt_id` — re-parenting a line is not an edit, it is two lifecycle events on two receipts. - `container_id` — the supplier's expected LPN, fixed by the plan; the operator does not edit it. - `to_container_id` — where the stock physically is, set by receive. - `hold_code` — owned by put-on-hold / release. - `owner_id`, `receipt_type` — identity, fixed when the line is created. - `effective_date`, `uom_received` — stamped at receive time. `deny_unknown_fields` is the point, not a detail. Serde's default is to IGNORE fields it does not know, so a client sending `qty_received: 9999` would get `200 OK` and a response showing the old quantity — the write silently dropped, the caller convinced it landed. For a number the whole receipt is judged by, refusing loudly is the only honest answer.",
            "properties": {
              "barcode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "best_by_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "delivery_by_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expiration_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_line_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manufactured_date": {
                "description": "RF and web clients historically send different documented date dialects. `BusinessDate` preserves those dialects but rejects malformed input instead of silently turning it into an omitted update.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "pack_id": {
                "format": "int64",
                "type": "integer"
              },
              "po_detail_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "po_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty_expected": {
                "format": "double",
                "type": "number"
              },
              "reason_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "return_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "return_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "rma": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku": {
                "type": "string"
              },
              "temperature": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "to_loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "to_lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "ReceiptDetailUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": [
                "string",
                "null"
              ]
            },
            "best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
            },
            "container_id": {
              "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "type": "string"
            },
            "expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_line_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "hold_code": {
              "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_attr_check_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotAttrCheckMode"
                }
              ],
              "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
            },
            "manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_detail_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_adjusted": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_damaged": {
              "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_expected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_received": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_rejected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_line_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "return_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "return_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "target_disposition": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptTargetDisposition"
                }
              ],
              "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "to_container_id": {
              "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "to_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom_received": {
              "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "effective_date",
            "id",
            "lot_attr_check_mode",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_id",
            "receipt_line_number",
            "receipt_type",
            "sku",
            "status",
            "target_disposition",
            "version"
          ],
          "title": "ReceiptDetail",
          "type": "object"
        }
      },
      "summary": "Update the reference data on a receipt line — refused once the receipt is Closed or Cancelled.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:71d2d431bc2faf81b1d844211bd0fce18a7f0a5b5d3ec2519da3c624f7da3304",
      "x-quark-response-schema-hash": "sha256:c799ddafb4227e800d0b61e108509925f14d4d2fc87e7e2c96cf9ff58f191eaa",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttrCheckMode": {
              "description": "Per-line lot-attributes validation mode. Replaces the legacy pair of `match_lot_attributes: Option<bool>` (D-27) and `match_lot_attributes_strict: bool` (D-65 / ADR-050) with a single 3-state enum so the four-flag-combinations (one of which was a nonsensical `null + strict`) are no longer representable.\n\n- `Disabled` — no validation; any scanned lot_attrs accepted as-is. Cascade tier 1 also stays lenient: an empty expected set on a candidate accumulates the operator's scan into that line. - `Advisory` — validation runs against expected lot_attrs; per-attribute supervisor overrides through `lot_policy_attribute.override_allowed` (D-27 / RPV code 36) are honoured. - `Strict` — ASN-pre-bound lot (pharma, EDI 856 contracts). `set_equal(expected, scanned)` is required. No overrides (RPV code 34, non-overridable).",
              "enum": [
                "Disabled",
                "Advisory",
                "Strict"
              ],
              "type": "string"
            },
            "ReceiptCompletion": {
              "description": "Receipt completion (qty fulfilment). Per Decisions Log D-05. **Separate** from status. Computed from the qty fields of the details and aggregated onto the header.\n\n- `Pending`  — nothing received - `Partial`  — received less than expected - `Full`     — exactly as expected (or Full with qty_rejected/qty_damaged) - `Over`     — received more than expected",
              "enum": [
                "Pending",
                "Partial",
                "Full",
                "Over"
              ],
              "type": "string"
            },
            "ReceiptStatus": {
              "description": "Receipt lifecycle status — 5 clean values. Per Decisions Log D-02. The old 8 values (New|InTransit|Scheduled|InReceiving|Received|Verified|Closed|Cancelled) were removed together with the old `execute_*` flow.\n\nThe same enum is used for `Receipt.status` and `ReceiptDetail.status` (D-03). Completeness — a separate field `completion: ReceiptCompletion` (D-05).",
              "enum": [
                "Open",
                "InProgress",
                "OnHold",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ReceiptTargetDisposition": {
              "description": "Target disposition for received goods. Per Decisions Log D-36. Phase 1: always default `Stock`. Phase 2 cross-dock detection sets `CrossDock`. `Hold` — for QC-quarantine when auto-hold conditions are triggered.",
              "enum": [
                "Stock",
                "CrossDock",
                "Hold"
              ],
              "type": "string"
            },
            "ReceiptType": {
              "oneOf": [
                {
                  "enum": [
                    "Normal",
                    "CustomerReturn",
                    "Sscc",
                    "CaseLevel"
                  ],
                  "type": "string"
                },
                {
                  "description": "Receiving Without ASN, assigned by the server.",
                  "enum": [
                    "NoAsn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Goods arriving from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "barcode": {
              "type": [
                "string",
                "null"
              ]
            },
            "best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "completion": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptCompletion"
                }
              ],
              "description": "Per Decisions Log D-05. Live-updated in `ReceiptRepository::recompute_completion`."
            },
            "container_id": {
              "description": "The EXPECTED LPN — the container the supplier announced the goods on. Written when the line is planned, never by receive: it stays as the record of what was promised even when the operator receives onto a label of their own. Where the goods really are is `to_container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "type": "string"
            },
            "expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_line_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "hold_code": {
              "description": "Hold code at receive time — VARCHAR mirroring `inv_hold_code` enum values (e.g. `Damaged`, `QcRequired`, `CustomerReturn`). NULL when the line carries no auto-hold. Filled by the receive command per flow: damage receive → `Damaged`, return condition=NeedsRefurb → `QcRequired`, etc. Audit-only on the line; the actual ATP-blocking hold lives in `inventory_hold` on the LPN / location.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_attr_check_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/LotAttrCheckMode"
                }
              ],
              "description": "Per-line lot-attributes validation policy. See `LotAttrCheckMode` for semantics. Replaces the legacy `match_lot_attributes` `Option<bool>` + `match_lot_attributes_strict` `bool` pair."
            },
            "manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_detail_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "po_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty_adjusted": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_damaged": {
              "description": "Per Decisions Log D-26 (ReportDamage Reject action) and D-05 (completion algorithm).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_expected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_received": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_rejected": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_line_number": {
              "type": "string"
            },
            "receipt_type": {
              "$ref": "#/definitions/ReceiptType"
            },
            "return_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "return_type": {
              "type": [
                "string",
                "null"
              ]
            },
            "rma": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReceiptStatus"
            },
            "target_disposition": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReceiptTargetDisposition"
                }
              ],
              "description": "Per Decisions Log D-36. Stock | CrossDock | Hold. Default Stock."
            },
            "temperature": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "to_container_id": {
              "description": "The ACTUAL LPN — the container receive put the goods into (the supplier's, or one the operator minted). NULL until the first receive, and for loose stock. Anything that acts on the goods reads this, not `container_id`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "to_loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom_received": {
              "description": "ADR-045 §1 — native UOM as entered by the operator at receive time (e.g. \"CS\" when receiving 10 cases of 24 EA each). `qty_received` always stays in base units. Native qty is derivable from `qty_received / pack_item.base_qty WHERE pack_id, uom = uom_received`.",
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Per-line OCC version (Slice #2, migration 156). Independent of `receipt.version` (which guards header-level state transitions like close / cancel). `receipt_adjust_received_qty` checks this on submit; receive_* / report_damage / recompute paths bump it atomically without check. Default 1 on insert.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "completion",
            "effective_date",
            "id",
            "lot_attr_check_mode",
            "mod_when",
            "mod_who",
            "owner_id",
            "receipt_id",
            "receipt_line_number",
            "receipt_type",
            "sku",
            "status",
            "target_disposition",
            "version"
          ],
          "title": "ReceiptDetail",
          "type": "object"
        }
      },
      "summary": "Delete a receipt line — refused once the receipt is Closed, Cancelled or OnHold.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c799ddafb4227e800d0b61e108509925f14d4d2fc87e7e2c96cf9ff58f191eaa",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete receipt lines atomically after locking and validating every affected parent.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_receipt_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count receipt_detail — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_receipt_detail_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "The supplier promise attached to one receipt line.\n\nThis is deliberately a command DTO rather than the model's generic create type: unknown fields are rejected, and the command below owns lifecycle, parent-lock and policy-membership validation.",
            "properties": {
              "attribute_value": {
                "type": "string"
              },
              "lot_policy_attribute_id": {
                "format": "int64",
                "type": "integer"
              },
              "receipt_detail_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "attribute_value",
              "lot_policy_attribute_id",
              "receipt_detail_id"
            ],
            "title": "ReceiptExpectedLotAttributeCreateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_value": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_attribute_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_value",
            "id",
            "lot_policy_attribute_id",
            "mod_when",
            "mod_who",
            "receipt_detail_id"
          ],
          "title": "ReceiptDetailLotAttributes",
          "type": "object"
        }
      },
      "summary": "Add an expected lot attribute while the parent receipt accepts planning changes.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_expected_lot_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1485e7234be4b2047606e4501eb25a23de87ae9690db6fccd0829e916d4ba4e9",
      "x-quark-response-schema-hash": "sha256:16c58afdce2822f2df9113e8e756f807996b14bb9cb0fa88db9d21e16e99c817",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_detail_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_value": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_attribute_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_value",
            "id",
            "lot_policy_attribute_id",
            "mod_when",
            "mod_who",
            "receipt_detail_id"
          ],
          "title": "ReceiptDetailLotAttributes",
          "type": "object"
        }
      },
      "summary": "Get a receipt_detail_lot_attributes by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "receipt_expected_lot_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:16c58afdce2822f2df9113e8e756f807996b14bb9cb0fa88db9d21e16e99c817",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_detail_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptDetailLotAttributes": {
              "description": "Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attribute_value": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_policy_attribute_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attribute_value",
                "id",
                "lot_policy_attribute_id",
                "mod_when",
                "mod_who",
                "receipt_detail_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptDetailLotAttributes"
          },
          "title": "Array_of_ReceiptDetailLotAttributes",
          "type": "array"
        }
      },
      "summary": "List receipt_detail_lot_attributes — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "receipt_expected_lot_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b7662e570285589cd784ec3e3b59f796c65fc3339b6541081f56bf87e24786de",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_receipt_detail_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "The selected lot-policy attribute is row identity. Editing the supplier promise changes only its expected value.",
            "properties": {
              "attribute_value": {
                "type": "string"
              }
            },
            "title": "ReceiptExpectedLotAttributeUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_value": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_attribute_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_value",
            "id",
            "lot_policy_attribute_id",
            "mod_when",
            "mod_who",
            "receipt_detail_id"
          ],
          "title": "ReceiptDetailLotAttributes",
          "type": "object"
        }
      },
      "summary": "Update an expected lot value without moving the row to another attribute.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_expected_lot_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:09d88bfa18158df5c23c227d41baf4cdd758cd63591ee3f5e1a8295d7123360a",
      "x-quark-response-schema-hash": "sha256:16c58afdce2822f2df9113e8e756f807996b14bb9cb0fa88db9d21e16e99c817",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_receipt_detail_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Per-`receipt_detail` expected lot-attribute snapshot.\n\nMigration 133 (T-034 step 1) collapsed this table to the synthetic FK link only — the legacy natural-key columns `(receipt_id, receipt_line_number, owner_id, sku)` were redundant and have been dropped. Callers that need the line/owner/sku context JOIN through `receipt_detail`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_value": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot_policy_attribute_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_value",
            "id",
            "lot_policy_attribute_id",
            "mod_when",
            "mod_who",
            "receipt_detail_id"
          ],
          "title": "ReceiptDetailLotAttributes",
          "type": "object"
        }
      },
      "summary": "Delete an expected lot attribute while the parent receipt accepts planning changes.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "receipt_expected_lot_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:16c58afdce2822f2df9113e8e756f807996b14bb9cb0fa88db9d21e16e99c817",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_receipt_detail_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count receipt_detail_lot_attributes — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "receipt_expected_lot_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_receipt_detail_damage",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "DamageSeverity": {
              "description": "Per migration 084 + D-26. Damage classification.",
              "oneOf": [
                {
                  "enum": [
                    "Minor",
                    "Major",
                    "Total"
                  ],
                  "type": "string"
                },
                {
                  "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                  "enum": [
                    "Cosmetic"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "applied_action": {
              "allOf": [
                {
                  "$ref": "#/definitions/DamageAction"
                }
              ],
              "description": "Migration 239 — the owner action that ACTUALLY ran when this row was written (`ReportDamage::handle_damage_action`).\n\nOnly `Reject` adds `damaged_qty` to `receipt_detail.qty_damaged`, so this is what tells a later reader which rows are echoed in that column and which are not — the distinction the line's damage ceiling stands on. Deriving it from today's `owner_config` instead would be wrong for history: the mapping is owner-configurable and can change between two reports on the same line.\n\n`None` on a row created through plain CRUD (`create_receipt_detail_damage`): no action ran, nothing was echoed."
            },
            "damaged_qty": {
              "format": "double",
              "type": "number"
            },
            "disposition": {
              "description": "Final disposition decision. NULL = pending. Values: WrittenOff | RTV | Repurpose | Destroyed. VARCHAR (not enum) so Phase 2 vocabulary growth doesn't require ALTER TYPE.",
              "type": [
                "string",
                "null"
              ]
            },
            "disposition_decided_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "disposition_decided_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "disposition_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "move_failed": {
              "description": "TRUE if auto-move to QC/Damage/RTV loc failed. Operator must resolve manually.",
              "type": "boolean"
            },
            "photo_attachment_ids": {
              "description": "Phase 2+ attachments (see Spec 04 photo attachments)."
            },
            "reason_code": {
              "type": "string"
            },
            "reason_description": {
              "type": [
                "string",
                "null"
              ]
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "reported_at": {
              "type": "string"
            },
            "reported_by": {
              "format": "int64",
              "type": "integer"
            },
            "severity": {
              "$ref": "#/definitions/DamageSeverity"
            },
            "vendor_responsibility": {
              "description": "Migration 161 — operator's assessment at receive: true = vendor is responsible for the damage (drives vendor-claim event in ERP); false (default) = warehouse-eaten / undecided. Audit-only — no Quark business logic branches on it; ERP integration consumes via outbox.",
              "type": "boolean"
            },
            "version": {
              "description": "Per-row OCC version (Slice #3, migration 157). Independent of `receipt.version` (header) and `receipt_detail.version` (line). `receipt_set_damage_disposition` OCC-checks this on submit; `write_off_damage` / `move_damage_to_rtv` bump it without check (they're stateless terminal actions). Default 1 on insert.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "applied_action",
            "damaged_qty",
            "id",
            "move_failed",
            "reason_code",
            "receipt_detail_id",
            "receipt_id",
            "reported_at",
            "reported_by",
            "severity",
            "vendor_responsibility",
            "version"
          ],
          "title": "ReceiptDetailDamage",
          "type": "object"
        }
      },
      "summary": "Get a receipt_detail_damage by ID — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail_damage",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:48c8710e64864f9723bb4ab9bae887eee3bba0edb08d64a0b7a0fd83fbba5a8d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_detail_damage",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DamageAction": {
              "description": "Per Decisions Log D-26 + T-062 (migration 148). Action triggered by ReportDamage based on severity + OwnerConfig. The first three are the original on-report actions (just-record / hold-LPN / bump-qty-damaged). The four added in T-062 represent owner policy for auto-routing damage to a final disposition without manual intervention: * WriteOff  — auto-call WriteOffDamage on report (decrement inventory). * RTV       — auto-call MoveDamageToRtv on report (move to RTV staging). * Repurpose — flag disposition='Repurpose' (Phase 2 wires SKU substitute). * Destroy   — flag disposition='Destroyed' (Phase 3 wires regulated paths).",
              "enum": [
                "None",
                "Hold",
                "Reject",
                "WriteOff",
                "RTV",
                "Repurpose",
                "Destroy"
              ],
              "type": "string"
            },
            "DamageSeverity": {
              "description": "Per migration 084 + D-26. Damage classification.",
              "oneOf": [
                {
                  "enum": [
                    "Minor",
                    "Major",
                    "Total"
                  ],
                  "type": "string"
                },
                {
                  "description": "Migration 160 — cosmetic damage (scratch / dent on the packaging); the goods are sold without a discount. Default action on this severity is `None` — the goods go into normal stock with an audit-record for statistics.",
                  "enum": [
                    "Cosmetic"
                  ],
                  "type": "string"
                }
              ]
            },
            "ReceiptDetailDamage": {
              "properties": {
                "applied_action": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/DamageAction"
                    }
                  ],
                  "description": "Migration 239 — the owner action that ACTUALLY ran when this row was written (`ReportDamage::handle_damage_action`).\n\nOnly `Reject` adds `damaged_qty` to `receipt_detail.qty_damaged`, so this is what tells a later reader which rows are echoed in that column and which are not — the distinction the line's damage ceiling stands on. Deriving it from today's `owner_config` instead would be wrong for history: the mapping is owner-configurable and can change between two reports on the same line.\n\n`None` on a row created through plain CRUD (`create_receipt_detail_damage`): no action ran, nothing was echoed."
                },
                "damaged_qty": {
                  "format": "double",
                  "type": "number"
                },
                "disposition": {
                  "description": "Final disposition decision. NULL = pending. Values: WrittenOff | RTV | Repurpose | Destroyed. VARCHAR (not enum) so Phase 2 vocabulary growth doesn't require ALTER TYPE.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "disposition_decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "disposition_decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "disposition_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "move_failed": {
                  "description": "TRUE if auto-move to QC/Damage/RTV loc failed. Operator must resolve manually.",
                  "type": "boolean"
                },
                "photo_attachment_ids": {
                  "description": "Phase 2+ attachments (see Spec 04 photo attachments)."
                },
                "reason_code": {
                  "type": "string"
                },
                "reason_description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reported_at": {
                  "type": "string"
                },
                "reported_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "severity": {
                  "$ref": "#/definitions/DamageSeverity"
                },
                "vendor_responsibility": {
                  "description": "Migration 161 — operator's assessment at receive: true = vendor is responsible for the damage (drives vendor-claim event in ERP); false (default) = warehouse-eaten / undecided. Audit-only — no Quark business logic branches on it; ERP integration consumes via outbox.",
                  "type": "boolean"
                },
                "version": {
                  "description": "Per-row OCC version (Slice #3, migration 157). Independent of `receipt.version` (header) and `receipt_detail.version` (line). `receipt_set_damage_disposition` OCC-checks this on submit; `write_off_damage` / `move_damage_to_rtv` bump it without check (they're stateless terminal actions). Default 1 on insert.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "applied_action",
                "damaged_qty",
                "id",
                "move_failed",
                "reason_code",
                "receipt_detail_id",
                "receipt_id",
                "reported_at",
                "reported_by",
                "severity",
                "vendor_responsibility",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptDetailDamage"
          },
          "title": "Array_of_ReceiptDetailDamage",
          "type": "array"
        }
      },
      "summary": "List receipt_detail_damage — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail_damage",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:436e59d4e9886bca7a2d31ae6971c893a2b86b60a709f898bea126931a0e2cf5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_receipt_detail_damage",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count receipt_detail_damage — CRUD.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail_damage",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_damage_vocabulary",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "severity",
          "required": false,
          "schema": {
            "default": null,
            "description": "A [`DamageSeverity`] spelling. A `String` and not the enum on purpose: an unrecognised spelling must behave the way the SQL source behaved — match nothing tagged — and a typed field would have serde refuse the whole request instead.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DamageVocabularyItem": {
              "description": "One thing the picker may offer.",
              "properties": {
                "code": {
                  "description": "What lands in the row and what the server compares — exactly, and case-sensitively.",
                  "type": "string"
                },
                "display": {
                  "description": "What a human reads. Never sent back in place of [`Self::code`].",
                  "type": "string"
                }
              },
              "required": [
                "code",
                "display"
              ],
              "type": "object"
            }
          },
          "description": "Which of the two questions this answers.",
          "properties": {
            "items": {
              "items": {
                "$ref": "#/definitions/DamageVocabularyItem"
              },
              "type": "array"
            },
            "stage": {
              "description": "[`SEVERITY_STAGE`] | [`REASON_STAGE`]. A protocol token the client compares, not a word it prints.",
              "type": "string"
            }
          },
          "required": [
            "items",
            "stage"
          ],
          "title": "DamageVocabularyAnswer",
          "type": "object"
        }
      },
      "summary": "What a damage report may say: with no severity, the four severities the `damage_severity` column accepts; with one, the `damage_reason` values tagged for it plus the untagged ones (`Other`). `stage` says which of the two was answered. A blank or unrecognised severity narrows rather than refusing — exactly as the metadata dropdown source it replaces did.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail_damage",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2814146a726463bdc68daeee8a313b10ed6a0680a59a11535de5802c6aa7c9a2",
      "x-quark-response-schema-hash": "sha256:05d5c97bc8c83bfb8dd847883b336bdb4f6ffa28582b6128e898d98916736266",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_damage_destination",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "current",
          "required": false,
          "schema": {
            "default": null,
            "description": "What the destination field holds RIGHT NOW. Absent and empty mean the same thing, and both mean \"nobody has put anything there yet\".\n\nThe server cannot know this and must not guess it: it is the whole input to the rule that distinguishes a code the machine put there from a location the operator chose.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "severity",
          "required": false,
          "schema": {
            "default": null,
            "description": "The severity the operator has picked, if any. A `String` for the same reason the vocabulary's is: an unrecognised spelling moves nothing and hides the field, which is what the transferred rule did with it — not a refusal of the whole request.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What the screen should do with its destination field.",
          "properties": {
            "prefill": {
              "description": "The code to WRITE into the field. `None` means \"leave what is there alone\" — the operator chose it. `Some(\"\")` is a real answer and not a missing one: the warehouse has no location of the needed type, and the field is cleared rather than filled with an invented fallback.",
              "type": [
                "string",
                "null"
              ]
            },
            "show": {
              "description": "Draw the field at all. `false` for every severity that moves nothing.",
              "type": "boolean"
            }
          },
          "required": [
            "show"
          ],
          "title": "DamageDestination",
          "type": "object"
        }
      },
      "summary": "Where a damage report of this severity sends the goods: whether the destination field is shown at all (only Major → QC and Total → Damage move anything), and the location code to put in it. `prefill` null means leave the operator's own choice alone; an empty string means the warehouse has no location of that type and the field is cleared rather than filled with a fallback. Send `current` — what the field holds now — or the answer cannot tell the operator's choice from a previous severity's prefill.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail_damage",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:20afa11c2b7c70238937c0c67f4ea7ca2c146f2c34b2027018f1cc859a80fc6b",
      "x-quark-response-schema-hash": "sha256:a0b355da59c912539d09ef67f78a87660744ac3991518af60bea59b1290a650e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_damage_context",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "receipt_detail_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/DamageContext"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "DamageContext": {
              "description": "The line a damage report is about, and how much of it is still reportable.",
              "properties": {
                "already_damaged": {
                  "description": "Everything already reported damaged on this line, whatever each report then did to the line's own columns.",
                  "format": "double",
                  "type": "number"
                },
                "arrived": {
                  "description": "How much physically ARRIVED on this line — see [`LineQtyBuckets::arrived`]. Not `qty_received`.",
                  "format": "double",
                  "type": "number"
                },
                "available": {
                  "description": "What may still be reported: [`available`].",
                  "format": "double",
                  "type": "number"
                },
                "line_number": {
                  "type": "string"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_no": {
                  "description": "The receipt's own number — what the operator calls the paperwork.",
                  "type": "string"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_descr": {
                  "description": "The SKU's description, as the owner's catalogue holds it.",
                  "type": "string"
                },
                "uom": {
                  "description": "The line's unit of measure. Empty when the line names none.",
                  "type": "string"
                }
              },
              "required": [
                "already_damaged",
                "arrived",
                "available",
                "line_number",
                "receipt_detail_id",
                "receipt_id",
                "receipt_no",
                "sku_code",
                "sku_descr",
                "uom"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_DamageContext"
        }
      },
      "summary": "What a damage report on one receipt line is about: the line number, the SKU and its description, the receipt number, the line's unit, how much physically ARRIVED on the line (not qty_received — a return booked as Damaged records its whole arrival in qty_damaged), how much has already been reported damaged, and how much may still be reported. The last number is the ceiling `receipt_report_damage` itself enforces, computed by the same function, so a client shows what the write will allow rather than guessing it. A line that does not exist answers null rather than refusing.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_detail_damage",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c9557fe365942329cd16a790622a678c8e01ea33f801e2ba6c73d3a4d9e76eac",
      "x-quark-response-schema-hash": "sha256:5614f9c359d295d2dfb172e578abe6796fedb9d7ad56ee08bfb41b643fda5e3c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_damage_photo_upload_url",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "byte_size",
          "required": true,
          "schema": {
            "description": "Размер файла в байтах.",
            "format": "uint64",
            "minimum": 0.0,
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "content_type",
          "required": true,
          "schema": {
            "description": "`Content-Type` файла. Он ПОДПИСЫВАЕТСЯ вместе со ссылкой, поэтому загрузчик обязан прислать ровно его — ответ повторяет его явно.",
            "type": "string"
          },
          "summary": null
        },
        {
          "name": "damage_record_id",
          "required": false,
          "schema": {
            "default": null,
            "description": "Запись о повреждении, если она уже существует (фотографию добавляют к сохранённому повреждению). Тогда потолок считается по уже сохранённым id этой записи. `None` — повреждение ещё не записано, и потолок сработает при сохранении: `receipt_report_damage` отказывает списку длиннее шести.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "receipt_detail_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "receipt_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "content_type": {
              "description": "Тот `Content-Type`, который подписан. Пришлёте другой — подпись не сойдётся, и хранилище откажет.",
              "type": "string"
            },
            "expires_in_secs": {
              "description": "Сколько секунд ссылка действительна. Не «до какого времени»: часы терминала и сервера расходятся, а разница длительностей — нет.",
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "max_bytes": {
              "description": "Предел на один файл, в байтах.",
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "max_photos_per_record": {
              "description": "Сколько фотографий держит одна запись о повреждении.",
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "object_key": {
              "description": "Ключ объекта. Его — и только его — клиент возвращает в `photo_attachment_ids`, когда сохраняет повреждение.",
              "type": "string"
            },
            "upload_url": {
              "description": "Подписанная ссылка на `PUT`. Доверенность: в лог не писать, в состояние сессии не складывать.",
              "type": "string"
            }
          },
          "required": [
            "content_type",
            "expires_in_secs",
            "max_bytes",
            "max_photos_per_record",
            "object_key",
            "upload_url"
          ],
          "title": "DamagePhotoUploadUrlResult",
          "type": "object"
        }
      },
      "summary": "Ask for a presigned PUT link to upload one damage photo, for a receipt line. Answers the object key to send back in receipt_report_damage's photo_attachment_ids, the link itself, the Content-Type that is SIGNED into it (send exactly that header or the signature will not match), and how many seconds the link lives. The server owns the limits and enforces them here and again on save: at most 6 photos per damage record (counted from the ids already stored — pass damage_record_id to have them counted), at most 10 MiB per file, and only image/jpeg, image/png, image/heic. A refusal says why in words. When the deployment has no object storage configured the answer is a refusal saying so — reporting the damage itself keeps working without photos, because photos are recommended and not required.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_damage_photo",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a92561690b0639ddeefd5dad63c1fb3ed56bdbdc86ebfe6cf75530a939ffbf19",
      "x-quark-response-schema-hash": "sha256:2d9078512ff9af75d26870b3880dfb715735acbbe03da5720ae0b1beb55adc71",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_damage_photo_view_urls",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "damage_record_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DamagePhotoViewLink": {
              "properties": {
                "expires_in_secs": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "object_key": {
                  "type": "string"
                },
                "view_url": {
                  "description": "Подписанная ссылка на `GET`. Тоже доверенность.",
                  "type": "string"
                }
              },
              "required": [
                "expires_in_secs",
                "object_key",
                "view_url"
              ],
              "type": "object"
            }
          },
          "properties": {
            "photos": {
              "description": "В порядке, в котором ключи лежат в записи. Пусто — фотографий нет; это обычный ответ, а не отказ.",
              "items": {
                "$ref": "#/definitions/DamagePhotoViewLink"
              },
              "type": "array"
            }
          },
          "required": [
            "photos"
          ],
          "title": "DamagePhotoViewUrlsResult",
          "type": "object"
        }
      },
      "summary": "Presigned GET links for the photos already stored on one damage record. Keys come from the record itself, never from the caller, so a photo belonging to another receipt cannot be asked for. An empty list means the record has no photos — an ordinary answer, not a refusal. When the deployment has no object storage configured the answer is a refusal saying so; the damage record itself still reads normally through get_receipt_detail_damage.",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "receipt_damage_photo",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:76bc3cc2e54deef98daddab96813635abb212ddd28b6f43fc2ef034eee0cf806",
      "x-quark-response-schema-hash": "sha256:5eae1d09acf4ca2ddacccd839aa66a985902f15b671d4c2a652646dc98f37468",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_planned_case",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "case_label": {
                "description": "Operator-scanned case label (= `container.code` of the case container). Filtered by receipt_id per D-69e SameReceipt scope.",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "case_label",
              "receipt_id"
            ],
            "title": "FindPlannedCaseInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/PlannedCaseDetail"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "PlannedCaseDetail": {
              "description": "Detail projection for the case-level receive screens: the planned-case row joined with its parent line's SKU + owner and the pallet LPN. The case→line join lives here (model layer), so the RPC reads `find_planned_case` and `get_case_envelope` carry no SQL. Serialize + JsonSchema because it is returned on the wire by those Q-class endpoints.",
              "properties": {
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "description": "Owner the case's line belongs to (`receipt_detail.owner_id`).",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_lpn": {
                  "description": "Pallet LPN (`container.parent_id` → `code`); `None` when the case sits without a pallet.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_detail_case_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "description": "Parent SKU (`receipt_detail.sku`).",
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "was_unplanned": {
                  "type": "boolean"
                }
              },
              "required": [
                "container_id",
                "expected_qty",
                "owner_id",
                "receipt_detail_case_id",
                "receipt_detail_id",
                "sku_code",
                "status",
                "was_unplanned"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_PlannedCaseDetail"
        }
      },
      "summary": "Find a planned case row by label within a case-level receipt",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5fbf4bc9ed5be0200dce1b0b48e4d58e84fcaac725cd9beb8fe158bbbc01482f",
      "x-quark-response-schema-hash": "sha256:19d0b2487e82609af2a903022665d8c417986c16da8644d47ad4bd4894dd6623",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_case_envelope",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "case_label": {
                "description": "Operator-scanned case label (= `container.code` of the case container), resolved within this receipt per D-69e SameReceipt.",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "case_label",
              "receipt_id"
            ],
            "title": "GetCaseEnvelopeInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotAttributePrompt": {
              "description": "One operator-facing lot-attribute slot on a receive line screen, with the ASN-expected pre-fill and strict-lock resolved (ADR-050). Wire DTO — not a `lot_policy_attribute` row.",
              "properties": {
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_date": {
                  "description": "`true` → this slot is a DATE, not free text: one of the four date columns `lot_policy` carries (`DATE_ATTRIBUTE_CODES`), folded in as a synthetic slot so RF and the web prompt for it alongside the custom attributes.\n\nThe server has always known this and never said it, so every renderer drew a text box and the operator typed a date into it by hand — `parse_date` then accepted or silently dropped whatever arrived. The flag does not change what is sent (still a string in `lot_attributes`); it lets a screen offer the right control for it.",
                  "type": "boolean"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "readonly": {
                  "description": "`true` → operator may not edit. The line is strict-match (D-65) AND there is an expected value to enforce. Blank slots stay editable even on a strict line (nothing to lock).",
                  "type": "boolean"
                },
                "required": {
                  "type": "boolean"
                },
                "value": {
                  "description": "ASN-expected value for this attribute on the scanned line, when the line carries one. `None` → blank input.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "attrib_code",
                "is_date",
                "readonly",
                "required"
              ],
              "type": "object"
            }
          },
          "properties": {
            "case_label": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": "integer"
            },
            "expected_qty": {
              "format": "double",
              "type": "number"
            },
            "lot_policy_attributes": {
              "description": "Lot-attribute prompt for the case's SKU (ADR-050): each shown attribute pre-filled with the line's ASN-expected value (`value`) and locked (`readonly`) when the line is strict-match. Empty when the SKU has no lot_policy. RF expands these into the RCCASE02LINE `_dyn_lot_attrs` widget so the operator confirms / supplies COLOR / dates / etc. before committing the case receive.",
              "items": {
                "$ref": "#/definitions/LotAttributePrompt"
              },
              "type": "array"
            },
            "owner_id": {
              "description": "Owner resolved from the parent `receipt_detail.owner_id` — RF copies it forward; the LINE call needs it on the wire.",
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_case_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "description": "Parent SKU (from `receipt_detail.sku`) the scanned case belongs to.",
              "type": "string"
            },
            "status": {
              "type": "string"
            }
          },
          "required": [
            "case_label",
            "container_id",
            "expected_qty",
            "lot_policy_attributes",
            "owner_id",
            "receipt_detail_case_id",
            "receipt_detail_id",
            "sku_code",
            "status"
          ],
          "title": "CaseEnvelope",
          "type": "object"
        }
      },
      "summary": "Case envelope: resolve a scanned case label to its SKU + lot_policy_attributes for the RCCASE02LINE dynamic lot-attribute prompt",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ab939f8234bf331bec708886d6109da55d8fe5f613b7aa3f250ee531e052a903",
      "x-quark-response-schema-hash": "sha256:034cf867a1cb2beba0585e88219faf7866a3181c3e57474756fed5d18da8755b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "validate_pallet_unique",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "pallet_lpn": {
                "description": "LPN code the operator is about to assign (in CreateCaseLevelAsn, ReplacePallet's new_pallet_lpn, or any other pallet-create flow).",
                "type": "string"
              },
              "receipt_id": {
                "description": "Optional: receipt the operator is working in. When supplied and the lpn exists on a DIFFERENT receipt the response flags it as a cross-receipt collision (the ReplacePallet command rejects this case at runtime; surfacing it in the validate response lets the UI prevent the operator from even submitting).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "pallet_lpn"
            ],
            "title": "ValidatePalletUniqueInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "conflicting_receipt_id": {
              "description": "`Some(_)` when the existing pallet's `planned_at_receipt_id` differs from the input — this is the cross-receipt collision the caller wants to know about.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "existing_container_id": {
              "description": "`Some(_)` when an existing pallet was found.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "is_unique": {
              "description": "True when the lpn is free to use on the current receipt: - no pallet container exists with this code anywhere, OR - the only existing pallet is on the SAME `receipt_id` (caller can reuse it as a destination for ReplacePallet).",
              "type": "boolean"
            }
          },
          "required": [
            "is_unique"
          ],
          "title": "ValidatePalletUniqueResult",
          "type": "object"
        }
      },
      "summary": "Check if a pallet LPN is unique enough to assign on a given receipt",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2f0ec96b12fe8643031e0d10d7a7704ed84c946cfc0880dea1fa33148f5a81ea",
      "x-quark-response-schema-hash": "sha256:218ca845984934877b6116ca5b831f4781b862433a49eb9775a486f1f562cb1c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_receipt_cases",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "pallet_lpn_filter": {
                "default": null,
                "description": "Optional pallet LPN filter — narrows the listing to cases under a specific pallet. RF \"open pallet\" detail screen uses this.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "status_filter": {
                "default": null,
                "description": "Optional status filter. Common values: \"Planned\", \"Received\", \"Cancelled\", \"NotReceived\". `None` returns every status.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "ListReceiptCasesInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptCaseRow": {
              "properties": {
                "case_label": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_detail_case_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "was_unplanned": {
                  "type": "boolean"
                }
              },
              "required": [
                "case_label",
                "container_id",
                "expected_qty",
                "receipt_detail_case_id",
                "receipt_detail_id",
                "sku_code",
                "status",
                "was_unplanned"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptCaseRow"
          },
          "title": "Array_of_ReceiptCaseRow",
          "type": "array"
        }
      },
      "summary": "List cases on a receipt with optional status / pallet filter",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0f1ebedffae0ae87f8c86292c7bd04f35947bc48c69f888d7dadd9ca4da4e73f",
      "x-quark-response-schema-hash": "sha256:613e9bf4637fa1d06e9ac70741be68cc3914e42cac4f1b4eda649b0c3eff8737",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_unreceived_cases",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "FindUnreceivedCasesInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReceiptCaseRow": {
              "properties": {
                "case_label": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "pallet_lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_detail_case_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "was_unplanned": {
                  "type": "boolean"
                }
              },
              "required": [
                "case_label",
                "container_id",
                "expected_qty",
                "receipt_detail_case_id",
                "receipt_detail_id",
                "sku_code",
                "status",
                "was_unplanned"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReceiptCaseRow"
          },
          "title": "Array_of_ReceiptCaseRow",
          "type": "array"
        }
      },
      "summary": "Cases still in Planned status — what's expected but not yet received",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1cdceda41eeeeb3bc21d01d6aacdeec280a9b92fe7551f2249c52ebf4a1176a1",
      "x-quark-response-schema-hash": "sha256:613e9bf4637fa1d06e9ac70741be68cc3914e42cac4f1b4eda649b0c3eff8737",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pre_validate_receive_case_level",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "case_label": {
                "type": "string"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "sku_code": {
                "default": null,
                "description": "Optional — required only when the unplanned-case path may need to auto-create a parent receipt_detail (scenario 3 in the command's body). Validate-side mirrors the runtime requirement: if case is not on ASN and `sku_code` is None, the validate flags this as a hard fail so RF disables the submit button.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "case_label",
              "qty",
              "receipt_id"
            ],
            "title": "PreValidateReceiveCaseLevelInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Generic dry-run result for V-class endpoints. `can_proceed=true` means the corresponding command would (currently) succeed; `false` means at least one blocker is present and `reasons` enumerates them.\n\nV-class endpoints intentionally do NOT execute the real command — they are read-only previews for UI flows that want to disable a button before the operator pushes it. The authoritative gate is still the command itself, which performs the same checks under transactional lock and is the only path that mutates state.",
          "properties": {
            "can_proceed": {
              "type": "boolean"
            },
            "reasons": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "can_proceed",
            "reasons"
          ],
          "title": "PreValidateResult",
          "type": "object"
        }
      },
      "summary": "Dry-run ReceiveCaseLevelLine: receipt status / case status / unplanned-policy / SKU presence",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:55572e28e6db8b7040486259344a5a940c04791567e1490b383d47f1dbe63010",
      "x-quark-response-schema-hash": "sha256:7465e40eb32fe7d2ecdc706243e945e718a447e5472b06fd829a5f5997329eb0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_case_level_asn_by_number",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_number": {
                "description": "Exact receipt_number (e.g. \"0000000100\"). Matched by equality, not substring — scan-flow on RCASN01 hands a single scanned barcode and expects a single result.",
                "type": "string"
              }
            },
            "required": [
              "receipt_number"
            ],
            "title": "GetAsnByNumberInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenEpisodeBrief": {
              "description": "Minimal episode shape — only the fields RF needs for the resume branch (id + detail context + progress counters).",
              "properties": {
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty",
                "receipt_detail_id",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "AsnHeader plus per-receipt qty roll-ups. Used by `get_asn_by_number` (scan-flow exact match) to feed RCASN01SUM progress widget without a separate aggregate RPC.",
          "properties": {
            "completion": {
              "type": "string"
            },
            "expected_receipt_date": {
              "description": "RFC 3339 in UTC; RF shows it in the viewer's own zone.",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "external_receipt_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_tracking_granularity": {
              "description": "`receipt.inventory_tracking_granularity` (`Aggregate` | `Pallet` | `Case`). RCCASE01 (case-level entry screen) reads this to decide whether to push the case-scan loop or surface a typed error (\"ASN is Aggregate — use Receive Against ASN instead\"). RCASN01 ignores it (Aggregate is the implicit default).",
              "type": "string"
            },
            "open_episode": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenEpisodeBrief"
                },
                {
                  "type": "null"
                }
              ],
              "description": "First Open / InProgress / AwaitingConfirmation serial-capture episode attached to any detail of this receipt, if any. Null when none. RCASN01 / RCASN01SUM check this on entry / resume to surface the spec §10.13 recovery flow — re-route the operator straight into RCSN01 with prior progress instead of restarting capture."
            },
            "owner_code": {
              "type": "string"
            },
            "owner_company": {
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty_expected_total": {
              "format": "double",
              "type": "number"
            },
            "qty_received_total": {
              "format": "double",
              "type": "number"
            },
            "receipt_number": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "version": {
              "description": "OCC version (per CLAUDE.md classifier rules) — receipt is a stateful entity, downstream commands (`receipt_close` / `receipt_cancel` / `receipt_adjust_received_qty`) carry this on submit. RCASN01's `onResponseReceive.set` reads `response.version → display.receipt_version`; without it the rule silently resolved to undefined and any later stateful_command was sent without OCC protection.\n\nLives on `AsnDetails`, NOT on `AsnHeader`, because only the \"read full ASN to operate on it\" path needs the version. The F2 picker (`lookup_asn`/`search_asns`) lists candidates only — the operator picks one and then the flow fetches details via `get_asn_by_number`. Exposing version on every picker row was the \"version just in case from frontend\" anti-pattern.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "completion",
            "id",
            "inventory_tracking_granularity",
            "owner_code",
            "owner_company",
            "owner_id",
            "qty_expected_total",
            "qty_received_total",
            "receipt_number",
            "status",
            "version"
          ],
          "title": "AsnDetails",
          "type": "object"
        }
      },
      "summary": "Case-level entry-screen lookup: same shape as get_asn_by_number, errors out when receipt is Aggregate-granularity",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3776b07306b65c70c079dfdd101f414974bd03b9b4d6d61c0818c747bf7328e9",
      "x-quark-response-schema-hash": "sha256:41a7400a94a659daa59a3d70b1900acced401946feeb89a7e2f5f1a65cd85563",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lookup_case_level_asn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "description": "1-indexed page number. Default 1.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "page_size": {
                "description": "Page size. Default 50, capped at 200.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "q": {
                "description": "Optional substring on `receipt_number` or `external_receipt_number`. `None` returns the full window of recent ASN headers.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "LookupAsnInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AsnHeader": {
              "properties": {
                "completion": {
                  "type": "string"
                },
                "expected_receipt_date": {
                  "description": "RFC 3339 in UTC; RF shows it in the viewer's own zone.",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_code": {
                  "type": "string"
                },
                "owner_company": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_number": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "completion",
                "id",
                "owner_code",
                "owner_company",
                "owner_id",
                "receipt_number",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AsnHeader"
          },
          "title": "Array_of_AsnHeader",
          "type": "array"
        }
      },
      "summary": "lookup_asn restricted to case-level inventory tracking: Pallet or Case (RCCASE01 picker)",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "case_level",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:daa0c7e62b7403d1e02345f39ca4804ea17e9d54d565a06fac53b87166c99acd",
      "x-quark-response-schema-hash": "sha256:0ba261679d653d5a226b0dbb99e4bb6621c10236bb893c76258db6c2e9c682bc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_create_case_level_asn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AllowError": {
                "enum": [
                  "Allow",
                  "HardError",
                  "Warning"
                ],
                "type": "string"
              },
              "AsnCase": {
                "properties": {
                  "case_label": {
                    "description": "Case-level container code. Operator scans this to commit receipt for the case. Must be unique within the receipt.",
                    "type": "string"
                  },
                  "expected_qty": {
                    "format": "double",
                    "type": "number"
                  }
                },
                "required": [
                  "case_label",
                  "expected_qty"
                ],
                "type": "object"
              },
              "AsnLine": {
                "properties": {
                  "external_lot": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lot_attributes": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "default": {},
                    "description": "12-attribute lot snapshot at the SKU-line level. Defaults to empty when absent. Per-case overrides allowed — see `AsnCase`.",
                    "type": "object"
                  },
                  "pack_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pallets": {
                    "default": [],
                    "description": "One entry per physical pallet. Each pallet groups cases of this SKU. A line with zero pallets is allowed — degenerate \"header-only\" ASN line for compatibility with aggregate-style ERP payloads — but receive-time scanning won't find any cases.",
                    "items": {
                      "$ref": "#/definitions/AsnPallet"
                    },
                    "type": "array"
                  },
                  "sku_code": {
                    "type": "string"
                  },
                  "uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "sku_code"
                ],
                "type": "object"
              },
              "AsnPallet": {
                "properties": {
                  "cases": {
                    "items": {
                      "$ref": "#/definitions/AsnCase"
                    },
                    "type": "array"
                  },
                  "lpn_code": {
                    "description": "LPN of the pallet container — the operator scans this code on arrival to identify the pallet. Must be unique within this receipt; uniqueness across receipts depends on owner config (D-69e).",
                    "type": "string"
                  }
                },
                "required": [
                  "cases",
                  "lpn_code"
                ],
                "type": "object"
              },
              "InventoryTrackingGranularity": {
                "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
                "enum": [
                  "Aggregate",
                  "Pallet",
                  "Case"
                ],
                "type": "string"
              },
              "ReceiptType": {
                "oneOf": [
                  {
                    "enum": [
                      "Normal",
                      "CustomerReturn",
                      "Sscc",
                      "CaseLevel"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Receiving Without ASN, assigned by the server.",
                    "enum": [
                      "NoAsn"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Goods arriving from another facility of the same company.",
                    "enum": [
                      "InterFacilityTransfer"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "description": "ERP-supplied ASN payload that gets converted into a planned receipt with per-case manifest. The shape is hierarchical (line → pallet → case) because that's how ASN documents are usually structured: SKU lines that each break down into one or more pallet-of-cases shipments.",
            "properties": {
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "expected_receipt_date_rfc3339": {
                "description": "Expected arrival date as RFC3339 string (e.g. \"2026-05-15T08:00:00Z\"). Parsed inside the command rather than typed as `OffsetDateTime` directly so we don't need the `serde-well-known` time feature in this crate. Sub-chunk 3 may swap to a typed wrapper if needed. `None` → no expected date set on the receipt.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_receipt_number": {
                "description": "External reference (`receipt.external_receipt_number`) — typically the ERP's own ASN number / PO number. Operators scan this in RF flows to find the receipt.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "inventory_tracking_granularity": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryTrackingGranularity"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Cascade input #1 for granularity. Falls through to operator UI override → `owner_config.default_inventory_tracking_granularity` → `Aggregate` per `resolve_granularity`."
              },
              "lines": {
                "items": {
                  "$ref": "#/definitions/AsnLine"
                },
                "type": "array"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "po_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "receipt_number": {
                "description": "When None, GenKey mints the next `receipt_number` from the warehouse counter. When Some, the value lands directly — useful for tests that need deterministic numbers.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_type": {
                "$ref": "#/definitions/ReceiptType"
              },
              "supplier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "unplanned_case_on_asn": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AllowError"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Cascade input #2 — same path. When the resolved granularity is case-level (Pallet | Case) and this resolves to None even after the cascade, the command hard-errors. When granularity is Aggregate this is ignored entirely."
              }
            },
            "required": [
              "idempotency_key",
              "lines",
              "owner_id",
              "receipt_type"
            ],
            "title": "CreateCaseLevelAsn",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllowError": {
              "enum": [
                "Allow",
                "HardError",
                "Warning"
              ],
              "type": "string"
            },
            "InventoryTrackingGranularity": {
              "description": "ADR-046 D-69b — per-receipt inventory tracking granularity. Frozen at receipt creation, never changes after.\n\n- **Aggregate** (default) — pre-case-level behaviour: scan pallet, type qty, single inventory_balances row per pallet. Status quo for non-regulated owners. - **Pallet** — operator scans every case (audit trail in receipt_detail_case) but inventory_balances stays per-pallet. - **Case** — every case becomes its own inventory_balances row. Full case-level traceability for pharma / food / regulated industries.\n\nStored as PG enum `inventory_tracking_granularity` (created in migration 126).",
              "enum": [
                "Aggregate",
                "Pallet",
                "Case"
              ],
              "type": "string"
            }
          },
          "properties": {
            "case_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "effective_granularity": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryTrackingGranularity"
                }
              ],
              "description": "Effective granularity after cascade resolution — useful for the caller to confirm the receipt landed in the mode they expected."
            },
            "effective_unplanned_policy": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllowError"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Effective unplanned policy. None when granularity = Aggregate."
            },
            "line_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "pallet_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_number": {
              "type": "string"
            }
          },
          "required": [
            "case_count",
            "effective_granularity",
            "line_count",
            "pallet_count",
            "receipt_id",
            "receipt_number"
          ],
          "title": "CreateCaseLevelAsnResult",
          "type": "object"
        }
      },
      "summary": "Load a case-level ASN (D-69, ADR-046).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "case_level_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:75dbf0c949cbc080235516cd85551d494e5aa064cb9e80e28becd2c84ed5352b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:93002d34c9b73cc53e31909ee9d96cc4b7e066b70d6de4493988f65b5469b981",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_receive_case_level_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Operator scan against an already-loaded case-level receipt. Single scan = single RPC = single transaction (per OQ-05).",
            "properties": {
              "acknowledged_overrides": {
                "default": [],
                "description": "Override codes the operator already acknowledged via a prior `showConfirm` prompt — mirrors the same mechanism `receive_against_asn` uses. Empty on the first attempt; populated when re-submitted after a confirmation.",
                "items": {
                  "format": "int16",
                  "type": "integer"
                },
                "type": "array",
                "uniqueItems": true
              },
              "case_label": {
                "description": "The case label the operator scanned. Resolves to `container.code` for a container row of `container_type='Case'` linked back to this receipt via `receipt_detail_case`.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "description": "Operator-supplied lot attributes (COLOR, SIZE, etc.) from the RCCASE02 `_dyn_lot_attrs` capture. Merged over the line's ASN-expected snapshot in `deposit_for_case_scan`: operator value wins on conflict and fills attributes the ASN did not pre-declare. Empty → the planning/expected snapshot is used unchanged (prior behaviour). Applies to BOTH planned and unplanned paths.",
                "type": "object"
              },
              "override_grant_id": {
                "default": null,
                "description": "A supervisor's grant (`supervisor_override_grant`) authorising a capability-gated override of a planned case's count — a per-case shortage (28) or excess (27) — for an operator who does not hold the capability. Its pairs must name the receipt LINE the case belongs to: `{code, subject: \"receipt:<receipt_id>/line:<receipt_detail_id>\"}` (the case's parent `receipt_detail`, not the case itself); a refused scan names that exact pair in `context.pairs`. The authoriser recorded is the grant's, never a field of this request. Optional: a caller who holds the capability keeps acknowledging with the bare code in `acknowledged_overrides`, exactly as before. See `shared::override_grant`.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "qty": {
                "description": "Physically-counted qty. Usually matches the planned `receipt_detail_case.expected_qty` but short / over receipts are allowed at the line level (rolled into the parent `receipt_detail.qty_received` and surfaced via the existing excess/shortage `AllowError` policy chain at receipt close).",
                "format": "double",
                "type": "number"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              },
              "sku_code": {
                "description": "Optional SKU code. Required when sub-chunk 2 lands the unplanned-case path (we need to know the SKU before the policy check can decide whether to auto-create a parent receipt_detail). In sub-chunk 1's happy path it's unused — the planned case row resolves SKU through receipt_detail_id.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "to_loc": {
                "description": "Physical landing location for the scanned case (the dock/door or the put-away staging zone, whichever the warehouse uses for at-receive-time storage).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "uom_received": {
                "default": null,
                "description": "Unit the operator used to enter `qty`. Drives the case-vs-EA translation done inside this command: * `Some(\"CS\")` — \"I received N cases\" (RF default in the widget). For a planned case the backend multiplies by that case's expected quantity; for an unplanned case it uses the receipt line's active pack hierarchy. qty=1 with planned 10 EA/case → 10 EA deposit. The full-case path is the trusted-label scenario; receipt_policy validation still runs in case the operator typed a partial case (qty=0.5 CS = 5 EA on a 10-pack). * `Some(\"EA\")` — \"I opened the case and physically counted N units\". qty IS the base-UOM total. Backend compares against the planned case qty and routes any deviation through `receipt_policy.{shortage,excess}_*` rules so the operator either gets a clean override prompt (within allowed %) or a hard rejection. * `None` — back-compat default = treat qty as base-UOM (EA). Pre-widget clients (integration tests, older RF builds) send qty in EA directly without specifying uom.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "case_label",
              "idempotency_key",
              "qty",
              "receipt_id"
            ],
            "title": "ReceiveCaseLevelLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "container_id": {
              "description": "`container.id` of the case container — useful for follow-up label-print or move operations.",
              "format": "int64",
              "type": "integer"
            },
            "line_complete": {
              "description": "True when the just-scanned case rolled the line up to `qty_received >= qty_expected`. RCCASE02 branches on this to auto-navigate to RCCASE_DONE (close confirmation) instead of leaving the operator stuck on the scan loop with no more planned cases to receive.",
              "type": "boolean"
            },
            "line_qty_received": {
              "description": "Receipt-detail line `qty_received` after this scan rolled forward — lets the RF UI show \"23 of 50 received\" without an extra round-trip.",
              "format": "double",
              "type": "number"
            },
            "receipt_detail_case_id": {
              "description": "Primary key of the `receipt_detail_case` row that flipped to Received (or was synthesised, in sub-chunks 2-3).",
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            },
            "was_unplanned": {
              "description": "True when the row was synthesised under the `unplanned_case_on_asn = Allow | Warning` path. Sub-chunk 1 always returns false (synthesis lands in sub-chunk 2).",
              "type": "boolean"
            }
          },
          "required": [
            "container_id",
            "line_complete",
            "line_qty_received",
            "receipt_detail_case_id",
            "receipt_detail_id",
            "receipt_id",
            "was_unplanned"
          ],
          "title": "ReceiveCaseLevelLineResult",
          "type": "object"
        }
      },
      "summary": "Commit one case-level scan (planned or unplanned).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "case_level_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:702f87779823095189c6f7c964c5a5c21cb39c3f345d4a89f677bb6c2b06d90a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f7e7c54c5e4de28fa95239766c54b3e2986a97eb34780ca364d65a96916990c7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_replace_pallet",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "case_labels": {
                "default": null,
                "description": "`None` = move every case currently on the old pallet. `Some(...)` = move only the named cases. Empty Vec is rejected (zero-case move is a no-op the caller probably didn't mean to issue).",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "new_pallet_lpn": {
                "description": "LPN code of the destination pallet. Created on the fly when the code isn't already a container — useful for ad-hoc operator-typed pallets.",
                "type": "string"
              },
              "old_pallet_lpn": {
                "description": "LPN code of the pallet the cases are leaving.",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "new_pallet_lpn",
              "old_pallet_lpn",
              "receipt_id"
            ],
            "title": "ReplacePallet",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "moved_case_count": {
              "format": "int64",
              "type": "integer"
            },
            "new_pallet_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "new_pallet_was_created": {
              "description": "True when the new pallet was minted by this command (lpn didn't exist beforehand). False when the destination was an existing pallet container.",
              "type": "boolean"
            },
            "old_pallet_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "moved_case_count",
            "new_pallet_container_id",
            "new_pallet_was_created",
            "old_pallet_container_id",
            "receipt_id"
          ],
          "title": "ReplacePalletResult",
          "type": "object"
        }
      },
      "summary": "Regroup all/some Planned cases onto another pallet; received stock requires an inventory move (D-69d).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "case_level_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ec98592fb65aaf3acdc44fa1ecfd955d972f10ae6537fef32812785ecca893d1",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f12641831d9d13670b906aa1932e9b45720bbb507fb05dfe9e795655733bdc06",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "receipt_cancel_planned_case",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "case_label": {
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "description": "Required free-text justification. Empty / whitespace-only is rejected — the audit trail needs to know why a case was cancelled, otherwise dispute resolution six months later has nothing to go on.",
                "type": "string"
              },
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "case_label",
              "idempotency_key",
              "reason",
              "receipt_id"
            ],
            "title": "CancelPlannedCase",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "container_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_detail_case_id": {
              "format": "int64",
              "type": "integer"
            },
            "receipt_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "container_id",
            "receipt_detail_case_id",
            "receipt_id"
          ],
          "title": "CancelPlannedCaseResult",
          "type": "object"
        }
      },
      "summary": "Cancel a planned case before it is received (D-69e SameReceipt).",
      "tags": [
        {
          "name": "inbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "case_level_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b40af813d148085008a69bc81847291bf804d9d258e5eedbe3d6cfd163e56f15",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:8402f1a40bf398282a48b86b255fb9784ba59150a339270668cda78f8995e379",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "description": {
                "description": "Optional on create: a policy is identified by its code, and demanding a description to write one down would be a field invented by the form rather than by the warehouse.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "PutawayPolicyForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "description": "What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "description": "Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "PutawayPolicy",
          "type": "object"
        }
      },
      "summary": "Create a putaway policy whose steps are owned by the putaway pipeline.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:07ea170ff82eb6f8dfd68e98097dc8a23f34d0284c1de014c1a4258ae04760b6",
      "x-quark-response-schema-hash": "sha256:6a3a19c0bb69613c4dda37ed0733788a66d3b728437e3bf635d6e2e4ae709df8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "description": "What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "description": "Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "PutawayPolicy",
          "type": "object"
        }
      },
      "summary": "Get a putaway_policy by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:6a3a19c0bb69613c4dda37ed0733788a66d3b728437e3bf635d6e2e4ae709df8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PutawayPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "description": "What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "description": "Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PutawayPolicy"
          },
          "title": "Array_of_PutawayPolicy",
          "type": "array"
        }
      },
      "summary": "List putaway_policy — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:85f253f142d9bf1b84c9d9c7d43cef6287ee066fc9013588fc119dda7536b9cc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "additionalProperties": false,
                "description": "Editable putaway-policy header fields. `code` is deliberately absent and therefore cannot be renamed through this public API.",
                "properties": {
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "title": "PutawayPolicyHeaderUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "description": "What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "description": "Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "PutawayPolicy",
          "type": "object"
        }
      },
      "summary": "Update a putaway policy header without overwriting a newer edit.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b51c12495733457475d81ae26e68d6db9b5438ac9e99e0d49bc0337c8ed36f9f",
      "x-quark-response-schema-hash": "sha256:6a3a19c0bb69613c4dda37ed0733788a66d3b728437e3bf635d6e2e4ae709df8",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "putaway_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "delete_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "description": "What the policy is FOR, in the operator's words.\n\nNullable, and it stays nullable: the column arrived (migration 265) after policies already existed, and a default would have put text nobody wrote on every row in every warehouse — indistinguishable from text somebody did.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "description": "Optimistic lock (migration 349). Absent from `ForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "PutawayPolicy",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced putaway policy and all of its owned steps and criteria.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:6a3a19c0bb69613c4dda37ed0733788a66d3b728437e3bf635d6e2e4ae709df8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete unreferenced putaway policies and their owned steps and criteria.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_putaway_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count putaway_policy — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_putaway_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PutawayGuard": {
              "oneOf": [
                {
                  "description": "Step applies to any source.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "Step applies only when the stock comes from `from_zone`.",
                  "enum": [
                    "FromZone"
                  ],
                  "type": "string"
                },
                {
                  "description": "Step applies only when the stock comes from `from_location`.",
                  "enum": [
                    "FromLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayMode": {
              "oneOf": [
                {
                  "description": "Any location that passes the suitability checks.",
                  "enum": [
                    "Suitable"
                  ],
                  "type": "string"
                },
                {
                  "description": "Locations already holding the same stock — consolidate into them.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayOrdering": {
              "oneOf": [
                {
                  "description": "Candidates in warehouse route order.",
                  "enum": [
                    "Route"
                  ],
                  "type": "string"
                },
                {
                  "description": "Candidates by proximity to the SKU's assigned slot.",
                  "enum": [
                    "NearestToSlot"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayScope": {
              "oneOf": [
                {
                  "description": "Candidate zone named on the step itself (`to_zone`).",
                  "enum": [
                    "ZoneFromStep"
                  ],
                  "type": "string"
                },
                {
                  "description": "Candidate zone taken from the SKU's putaway zone.",
                  "enum": [
                    "ZoneFromSku"
                  ],
                  "type": "string"
                },
                {
                  "description": "Single candidate location named on the step (`to_location`).",
                  "enum": [
                    "LocationFromStep"
                  ],
                  "type": "string"
                },
                {
                  "description": "Single candidate location taken from the SKU.",
                  "enum": [
                    "LocationFromSku"
                  ],
                  "type": "string"
                },
                {
                  "description": "The SKU's assigned (slotted) location.",
                  "enum": [
                    "AssignedSlot"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "`Deserialize` as well as `Serialize`, for the reason [`super::PutawayStepCriterion`] gives: the step editor's sentence is rendered by `web-ui-server`, which reads the step back over `get_putaway_policy_detail` and needs the four axis enums and the six booleans as TYPES, not as strings it re-parses.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_mixed_lot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "allow_mixed_sku": {
              "description": "Whether the suggested location may already hold other SKUs / other lots, and whether it must be empty.\n\n`Some(true)` / `Some(true)` / `Some(false)` is the state a step is in when it says nothing about mixing: the location's own flags and the commingle rules decide. That is what `INHERIT` meant, and it is the column default — a step that says nothing about mixing must not start forbidding it.\n\n**`None` used to be that state too, and app migration 290 removed it.** `MixCheck::from_toggles` (`wms-inventory`) reads `None` and `Some(true)` on a mixing toggle into the SAME arm, so the two were already indistinguishable to the engine while the step card drew `None` as an UNTICKED box — which reads as \"mixing is not allowed\", the opposite of what the engine did. Filling the NULLs is what makes the box tell the truth. The columns stay nullable (nothing writes NULL today, and NOT NULL is its own decision), so this type keeps its `Option` and every reader here keeps reading three values.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "fit_by_cube": {
              "description": "Which PHYSICAL checks this step applies (migration 231).\n\n`NOT NULL`, unlike the three mixing toggles above: those need a third \"no opinion\" state because the location's own flags can answer instead, and these have nothing to defer to. `fit_by_cube` / `fit_by_weight` default `true` because that is what the engine has always done; `fit_by_pallet_dims` defaults `false` because it is new arithmetic.\n\nRead as a set by [`crate::model::policies`]' consumer `putaway::space::FitToggles`, never one at a time — the whole point of three columns is that they are independent, and a caller that reads one of them alone is deciding for the other two.",
              "type": "boolean"
            },
            "fit_by_pallet_dims": {
              "type": "boolean"
            },
            "fit_by_quantity": {
              "description": "What the location already holds, plus what is arriving, against `location.max_qty_capacity` — how a pick face is sized: it holds so many EACHes and then it is full.",
              "type": "boolean"
            },
            "fit_by_stack_limit": {
              "description": "Refuse a location whose pallet POSITIONS are taken — `location.footprint × location.stack_limit`, the count Infor calls Fit by Stack Limit. The one capacity a bulk floor bay actually has, and the only one that binds in a warehouse keeping no cube on its items.",
              "type": "boolean"
            },
            "fit_by_weight": {
              "type": "boolean"
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "from_zone": {
              "type": [
                "string",
                "null"
              ]
            },
            "guard": {
              "$ref": "#/definitions/PutawayGuard"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "mode": {
              "$ref": "#/definitions/PutawayMode"
            },
            "ordering": {
              "$ref": "#/definitions/PutawayOrdering"
            },
            "putaway_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "require_empty": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "respect_temperature": {
              "description": "Reject a location whose temperature range does not cover the SKU's. The numbers come from the SKU card, never retyped here, so the step cannot drift away from the product master.",
              "type": "boolean"
            },
            "scope": {
              "$ref": "#/definitions/PutawayScope"
            },
            "sequence": {
              "description": "Execution order within the policy. Unique per policy (migration 191).",
              "format": "int32",
              "type": "integer"
            },
            "step_num": {
              "description": "User-facing step label. NOT an ordering key — see `sequence`.",
              "type": "string"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_zone": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "description": "Optimistic lock (migration 349). Absent from `PutawayPolicyDetailForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "fit_by_cube",
            "fit_by_pallet_dims",
            "fit_by_quantity",
            "fit_by_stack_limit",
            "fit_by_weight",
            "guard",
            "id",
            "mod_when",
            "mod_who",
            "mode",
            "ordering",
            "putaway_policy_id",
            "respect_temperature",
            "scope",
            "sequence",
            "step_num",
            "version"
          ],
          "title": "PutawayPolicyDetail",
          "type": "object"
        }
      },
      "summary": "Get a putaway_policy_detail by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:66d4b2de65e86b1b2a5438590bda04ac5912458a19123c3752b802ab17574118",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_putaway_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PutawayGuard": {
              "oneOf": [
                {
                  "description": "Step applies to any source.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "Step applies only when the stock comes from `from_zone`.",
                  "enum": [
                    "FromZone"
                  ],
                  "type": "string"
                },
                {
                  "description": "Step applies only when the stock comes from `from_location`.",
                  "enum": [
                    "FromLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayMode": {
              "oneOf": [
                {
                  "description": "Any location that passes the suitability checks.",
                  "enum": [
                    "Suitable"
                  ],
                  "type": "string"
                },
                {
                  "description": "Locations already holding the same stock — consolidate into them.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayOrdering": {
              "oneOf": [
                {
                  "description": "Candidates in warehouse route order.",
                  "enum": [
                    "Route"
                  ],
                  "type": "string"
                },
                {
                  "description": "Candidates by proximity to the SKU's assigned slot.",
                  "enum": [
                    "NearestToSlot"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayPolicyDetail": {
              "description": "`Deserialize` as well as `Serialize`, for the reason [`super::PutawayStepCriterion`] gives: the step editor's sentence is rendered by `web-ui-server`, which reads the step back over `get_putaway_policy_detail` and needs the four axis enums and the six booleans as TYPES, not as strings it re-parses.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_mixed_lot": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_sku": {
                  "description": "Whether the suggested location may already hold other SKUs / other lots, and whether it must be empty.\n\n`Some(true)` / `Some(true)` / `Some(false)` is the state a step is in when it says nothing about mixing: the location's own flags and the commingle rules decide. That is what `INHERIT` meant, and it is the column default — a step that says nothing about mixing must not start forbidding it.\n\n**`None` used to be that state too, and app migration 290 removed it.** `MixCheck::from_toggles` (`wms-inventory`) reads `None` and `Some(true)` on a mixing toggle into the SAME arm, so the two were already indistinguishable to the engine while the step card drew `None` as an UNTICKED box — which reads as \"mixing is not allowed\", the opposite of what the engine did. Filling the NULLs is what makes the box tell the truth. The columns stay nullable (nothing writes NULL today, and NOT NULL is its own decision), so this type keeps its `Option` and every reader here keeps reading three values.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "fit_by_cube": {
                  "description": "Which PHYSICAL checks this step applies (migration 231).\n\n`NOT NULL`, unlike the three mixing toggles above: those need a third \"no opinion\" state because the location's own flags can answer instead, and these have nothing to defer to. `fit_by_cube` / `fit_by_weight` default `true` because that is what the engine has always done; `fit_by_pallet_dims` defaults `false` because it is new arithmetic.\n\nRead as a set by [`crate::model::policies`]' consumer `putaway::space::FitToggles`, never one at a time — the whole point of three columns is that they are independent, and a caller that reads one of them alone is deciding for the other two.",
                  "type": "boolean"
                },
                "fit_by_pallet_dims": {
                  "type": "boolean"
                },
                "fit_by_quantity": {
                  "description": "What the location already holds, plus what is arriving, against `location.max_qty_capacity` — how a pick face is sized: it holds so many EACHes and then it is full.",
                  "type": "boolean"
                },
                "fit_by_stack_limit": {
                  "description": "Refuse a location whose pallet POSITIONS are taken — `location.footprint × location.stack_limit`, the count Infor calls Fit by Stack Limit. The one capacity a bulk floor bay actually has, and the only one that binds in a warehouse keeping no cube on its items.",
                  "type": "boolean"
                },
                "fit_by_weight": {
                  "type": "boolean"
                },
                "from_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_zone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "guard": {
                  "$ref": "#/definitions/PutawayGuard"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/PutawayMode"
                },
                "ordering": {
                  "$ref": "#/definitions/PutawayOrdering"
                },
                "putaway_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_empty": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "respect_temperature": {
                  "description": "Reject a location whose temperature range does not cover the SKU's. The numbers come from the SKU card, never retyped here, so the step cannot drift away from the product master.",
                  "type": "boolean"
                },
                "scope": {
                  "$ref": "#/definitions/PutawayScope"
                },
                "sequence": {
                  "description": "Execution order within the policy. Unique per policy (migration 191).",
                  "format": "int32",
                  "type": "integer"
                },
                "step_num": {
                  "description": "User-facing step label. NOT an ordering key — see `sequence`.",
                  "type": "string"
                },
                "to_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_zone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "Optimistic lock (migration 349). Absent from `PutawayPolicyDetailForUpdate` — a caller must never write it; it moves only through [`PutawayPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "fit_by_cube",
                "fit_by_pallet_dims",
                "fit_by_quantity",
                "fit_by_stack_limit",
                "fit_by_weight",
                "guard",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "ordering",
                "putaway_policy_id",
                "respect_temperature",
                "scope",
                "sequence",
                "step_num",
                "version"
              ],
              "type": "object"
            },
            "PutawayScope": {
              "oneOf": [
                {
                  "description": "Candidate zone named on the step itself (`to_zone`).",
                  "enum": [
                    "ZoneFromStep"
                  ],
                  "type": "string"
                },
                {
                  "description": "Candidate zone taken from the SKU's putaway zone.",
                  "enum": [
                    "ZoneFromSku"
                  ],
                  "type": "string"
                },
                {
                  "description": "Single candidate location named on the step (`to_location`).",
                  "enum": [
                    "LocationFromStep"
                  ],
                  "type": "string"
                },
                {
                  "description": "Single candidate location taken from the SKU.",
                  "enum": [
                    "LocationFromSku"
                  ],
                  "type": "string"
                },
                {
                  "description": "The SKU's assigned (slotted) location.",
                  "enum": [
                    "AssignedSlot"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/PutawayPolicyDetail"
          },
          "title": "Array_of_PutawayPolicyDetail",
          "type": "array"
        }
      },
      "summary": "List putaway_policy_detail — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:93eb3fa77663515078f062cc5a7a2b907953db37ae35ceeb4501ce1312ffe8cf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_putaway_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count putaway_policy_detail — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_putaway_step_criterion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CriterionProperty": {
              "oneOf": [
                {
                  "enum": [
                    "LocationType",
                    "LocationStatus",
                    "LocationCategory",
                    "LocationProcessingType",
                    "LocationFlag",
                    "LocationAbc",
                    "MixSku",
                    "MixLot",
                    "SkuAbc",
                    "SkuGroup",
                    "SkuClass",
                    "PutawayClass",
                    "Rotation",
                    "LotAttribute",
                    "SkuAttribute",
                    "LocationAttribute"
                  ],
                  "type": "string"
                },
                {
                  "description": "Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.",
                  "enum": [
                    "PalletFullness"
                  ],
                  "type": "string"
                }
              ]
            },
            "CriterionRule": {
              "enum": [
                "Include",
                "Exclude"
              ],
              "type": "string"
            },
            "CriterionSubject": {
              "oneOf": [
                {
                  "description": "The row narrows what the STEP APPLIES TO — the incoming pallet.",
                  "enum": [
                    "Product"
                  ],
                  "type": "string"
                },
                {
                  "description": "The row narrows the candidate locations.",
                  "enum": [
                    "Location"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "`Deserialize` as well as `Serialize`, unlike most entities here: the step editor's sentence (`putaway_step_describe`) is rendered by `web-ui-server`, which has no database of its own and reads a step's criteria back over `list_putaway_step_criterion`. Reading them into the entity — rather than picking fields out of a `serde_json::Value` on the web side — is what keeps `describe_step`'s exhaustive matches meaningful: a hand-parsed row could carry a property spelling no `CriterionProperty` variant has, and the compiler would never notice.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_code": {
              "description": "Which attribute the criterion narrows on (COLOR, SIZE) — set for exactly the three attribute properties (`LotAttribute`, `SkuAttribute`, `LocationAttribute`) and NULL for every other. `chk_step_criterion_attribute_code` (migration 209, widened by 218) enforces the pairing in both directions.",
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "property": {
              "$ref": "#/definitions/CriterionProperty"
            },
            "putaway_policy_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "rule": {
              "$ref": "#/definitions/CriterionRule"
            },
            "subject": {
              "$ref": "#/definitions/CriterionSubject"
            },
            "values": {
              "description": "The `text[]` column (migration 209): one column serves every property kind (an enum's SQL label, `'true'`/`'false'`, or a one-element array for a scalar) because the resolver — not the storage — knows the type.\n\nA plain `Vec<String>`, carried by `Fields` like every other column: the workspace enables the `postgres-array` feature on both `sea-query` and `sea-query-binder`, so `Vec<String>` converts into a `sea_query::Value::Array` and binds as a real `text[]`. No cast-as is needed (the column is `text[]`, not an enum array), and no newtype — this field was `#[field(skip)]` until that feature was turned on, which is also why `putaway_policy_detail.rs` once wrapped its `loc_type[]` columns in a local `LocTypes` newtype with five hand-written trait impls. Both workarounds are gone; the whole entity now travels the generic CRUD path.\n\n**An empty array is not NULL, and is not a state a row can be in.** `chk_step_criterion_values_nonempty` (migration 209) rejects `cardinality(values) = 0` at this table, so \"no values\" is a write-time database refusal rather than something stored and later interpreted — a reader here never has to decide what an empty criterion means. (It would mean \"narrow the candidates to nothing\", indistinguishable in a trace from an exhausted zone. That is the refusal's whole point.)",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "property",
            "putaway_policy_detail_id",
            "rule",
            "subject",
            "values"
          ],
          "title": "PutawayStepCriterion",
          "type": "object"
        }
      },
      "summary": "Get a putaway_step_criterion by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f2ef623676036a4f97333be482906d6188b60d6b80823e6aaa0ac095988b2ecf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_putaway_step_criterion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CriterionProperty": {
              "oneOf": [
                {
                  "enum": [
                    "LocationType",
                    "LocationStatus",
                    "LocationCategory",
                    "LocationProcessingType",
                    "LocationFlag",
                    "LocationAbc",
                    "MixSku",
                    "MixLot",
                    "SkuAbc",
                    "SkuGroup",
                    "SkuClass",
                    "PutawayClass",
                    "Rotation",
                    "LotAttribute",
                    "SkuAttribute",
                    "LocationAttribute"
                  ],
                  "type": "string"
                },
                {
                  "description": "Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.",
                  "enum": [
                    "PalletFullness"
                  ],
                  "type": "string"
                }
              ]
            },
            "CriterionRule": {
              "enum": [
                "Include",
                "Exclude"
              ],
              "type": "string"
            },
            "CriterionSubject": {
              "oneOf": [
                {
                  "description": "The row narrows what the STEP APPLIES TO — the incoming pallet.",
                  "enum": [
                    "Product"
                  ],
                  "type": "string"
                },
                {
                  "description": "The row narrows the candidate locations.",
                  "enum": [
                    "Location"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayStepCriterion": {
              "description": "`Deserialize` as well as `Serialize`, unlike most entities here: the step editor's sentence (`putaway_step_describe`) is rendered by `web-ui-server`, which has no database of its own and reads a step's criteria back over `list_putaway_step_criterion`. Reading them into the entity — rather than picking fields out of a `serde_json::Value` on the web side — is what keeps `describe_step`'s exhaustive matches meaningful: a hand-parsed row could carry a property spelling no `CriterionProperty` variant has, and the compiler would never notice.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attribute_code": {
                  "description": "Which attribute the criterion narrows on (COLOR, SIZE) — set for exactly the three attribute properties (`LotAttribute`, `SkuAttribute`, `LocationAttribute`) and NULL for every other. `chk_step_criterion_attribute_code` (migration 209, widened by 218) enforces the pairing in both directions.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "property": {
                  "$ref": "#/definitions/CriterionProperty"
                },
                "putaway_policy_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "rule": {
                  "$ref": "#/definitions/CriterionRule"
                },
                "subject": {
                  "$ref": "#/definitions/CriterionSubject"
                },
                "values": {
                  "description": "The `text[]` column (migration 209): one column serves every property kind (an enum's SQL label, `'true'`/`'false'`, or a one-element array for a scalar) because the resolver — not the storage — knows the type.\n\nA plain `Vec<String>`, carried by `Fields` like every other column: the workspace enables the `postgres-array` feature on both `sea-query` and `sea-query-binder`, so `Vec<String>` converts into a `sea_query::Value::Array` and binds as a real `text[]`. No cast-as is needed (the column is `text[]`, not an enum array), and no newtype — this field was `#[field(skip)]` until that feature was turned on, which is also why `putaway_policy_detail.rs` once wrapped its `loc_type[]` columns in a local `LocTypes` newtype with five hand-written trait impls. Both workarounds are gone; the whole entity now travels the generic CRUD path.\n\n**An empty array is not NULL, and is not a state a row can be in.** `chk_step_criterion_values_nonempty` (migration 209) rejects `cardinality(values) = 0` at this table, so \"no values\" is a write-time database refusal rather than something stored and later interpreted — a reader here never has to decide what an empty criterion means. (It would mean \"narrow the candidates to nothing\", indistinguishable in a trace from an exhausted zone. That is the refusal's whole point.)",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "property",
                "putaway_policy_detail_id",
                "rule",
                "subject",
                "values"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PutawayStepCriterion"
          },
          "title": "Array_of_PutawayStepCriterion",
          "type": "array"
        }
      },
      "summary": "List putaway_step_criterion — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:8099fe988e50b1c25434e96937371b833e9fbe234c01779f445639a75516e472",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_putaway_step_criterion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count putaway_step_criterion — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_pipeline_view",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "drafts",
          "required": false,
          "schema": {
            "default": null,
            "definitions": {
              "CriterionProperty": {
                "oneOf": [
                  {
                    "enum": [
                      "LocationType",
                      "LocationStatus",
                      "LocationCategory",
                      "LocationProcessingType",
                      "LocationFlag",
                      "LocationAbc",
                      "MixSku",
                      "MixLot",
                      "SkuAbc",
                      "SkuGroup",
                      "SkuClass",
                      "PutawayClass",
                      "Rotation",
                      "LotAttribute",
                      "SkuAttribute",
                      "LocationAttribute"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.",
                    "enum": [
                      "PalletFullness"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CriterionRow": {
                "description": "One condition on a step, as the card reads it and as a save states it.\n\n`id` is `Some` for a stored row and `None` for one the operator has just added — which is what lets the same shape serve the read and the write (`SavePutawaySteps` sends a DESIRED SET of these).\n\n`subject` is absent on purpose: it follows from `property` and from nothing else (`CriterionProperty::subject`), so the server derives it and a wire that carried one would be inviting a caller to be wrong.",
                "properties": {
                  "attribute_code": {
                    "description": "Set for exactly the three EAV properties, NULL for the other thirteen (`CriterionProperty::needs_attribute_code`).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "property": {
                    "$ref": "#/definitions/CriterionProperty"
                  },
                  "rule": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/CriterionRule"
                      }
                    ],
                    "description": "The negation: `Include` or `Exclude`. Not a boolean flag."
                  },
                  "values": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "property",
                  "rule",
                  "values"
                ],
                "type": "object"
              },
              "CriterionRule": {
                "enum": [
                  "Include",
                  "Exclude"
                ],
                "type": "string"
              },
              "StepDraft": {
                "description": "One step's unsaved draft, as the editor holds it.\n\nThe same shape the batch save sends (`PutawayStepEdit`'s `step_id` + `fields` + `criteria`), on purpose — the screen holds ONE draft per step and hands the same thing to the read that narrates it and to the write that stores it. Two shapes would be two chances for the preview and the save to disagree about what the operator typed.",
                "properties": {
                  "criteria": {
                    "default": null,
                    "description": "The conditions the operator is holding for this step, or `None` when they have not touched them. `Some(vec![])` means \"no conditions\" — the same distinction the save makes, and it is load-bearing in both.",
                    "items": {
                      "$ref": "#/definitions/CriterionRow"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "fields": {
                    "description": "Raw JSON, for the same reason the save's `fields` is: serde folds `{\"allow_mixed_sku\": null}` and `{}` into the same `None`, and \"this step has no opinion\" must not read as \"leave it alone\" in a preview any more than it may in a write."
                  },
                  "step_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "fields",
                  "step_id"
                ],
                "type": "object"
              }
            },
            "items": {
              "$ref": "#/definitions/StepDraft"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "id",
          "required": true,
          "schema": {
            "definitions": {
              "CriterionProperty": {
                "oneOf": [
                  {
                    "enum": [
                      "LocationType",
                      "LocationStatus",
                      "LocationCategory",
                      "LocationProcessingType",
                      "LocationFlag",
                      "LocationAbc",
                      "MixSku",
                      "MixLot",
                      "SkuAbc",
                      "SkuGroup",
                      "SkuClass",
                      "PutawayClass",
                      "Rotation",
                      "LotAttribute",
                      "SkuAttribute",
                      "LocationAttribute"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.",
                    "enum": [
                      "PalletFullness"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CriterionRow": {
                "description": "One condition on a step, as the card reads it and as a save states it.\n\n`id` is `Some` for a stored row and `None` for one the operator has just added — which is what lets the same shape serve the read and the write (`SavePutawaySteps` sends a DESIRED SET of these).\n\n`subject` is absent on purpose: it follows from `property` and from nothing else (`CriterionProperty::subject`), so the server derives it and a wire that carried one would be inviting a caller to be wrong.",
                "properties": {
                  "attribute_code": {
                    "description": "Set for exactly the three EAV properties, NULL for the other thirteen (`CriterionProperty::needs_attribute_code`).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "property": {
                    "$ref": "#/definitions/CriterionProperty"
                  },
                  "rule": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/CriterionRule"
                      }
                    ],
                    "description": "The negation: `Include` or `Exclude`. Not a boolean flag."
                  },
                  "values": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "property",
                  "rule",
                  "values"
                ],
                "type": "object"
              },
              "CriterionRule": {
                "enum": [
                  "Include",
                  "Exclude"
                ],
                "type": "string"
              },
              "StepDraft": {
                "description": "One step's unsaved draft, as the editor holds it.\n\nThe same shape the batch save sends (`PutawayStepEdit`'s `step_id` + `fields` + `criteria`), on purpose — the screen holds ONE draft per step and hands the same thing to the read that narrates it and to the write that stores it. Two shapes would be two chances for the preview and the save to disagree about what the operator typed.",
                "properties": {
                  "criteria": {
                    "default": null,
                    "description": "The conditions the operator is holding for this step, or `None` when they have not touched them. `Some(vec![])` means \"no conditions\" — the same distinction the save makes, and it is load-bearing in both.",
                    "items": {
                      "$ref": "#/definitions/CriterionRow"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "fields": {
                    "description": "Raw JSON, for the same reason the save's `fields` is: serde folds `{\"allow_mixed_sku\": null}` and `{}` into the same `None`, and \"this step has no opinion\" must not read as \"leave it alone\" in a preview any more than it may in a write."
                  },
                  "step_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "fields",
                  "step_id"
                ],
                "type": "object"
              }
            },
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Clause": {
              "description": "One clause of a sentence, with the band that owns it.\n\n`topic` is a plain string rather than the typed [`StepTopic`]: the consumer is a TypeScript component, and a lowercase band name is what it keys its three bands by. [`topic_name`] is the one place the mapping lives.",
              "properties": {
                "runs": {
                  "items": {
                    "$ref": "#/definitions/Run"
                  },
                  "type": "array"
                },
                "text": {
                  "type": "string"
                },
                "topic": {
                  "type": "string"
                }
              },
              "required": [
                "runs",
                "text",
                "topic"
              ],
              "type": "object"
            },
            "CriterionProperty": {
              "oneOf": [
                {
                  "enum": [
                    "LocationType",
                    "LocationStatus",
                    "LocationCategory",
                    "LocationProcessingType",
                    "LocationFlag",
                    "LocationAbc",
                    "MixSku",
                    "MixLot",
                    "SkuAbc",
                    "SkuGroup",
                    "SkuClass",
                    "PutawayClass",
                    "Rotation",
                    "LotAttribute",
                    "SkuAttribute",
                    "LocationAttribute"
                  ],
                  "type": "string"
                },
                {
                  "description": "Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.",
                  "enum": [
                    "PalletFullness"
                  ],
                  "type": "string"
                }
              ]
            },
            "CriterionRow": {
              "description": "One condition on a step, as the card reads it and as a save states it.\n\n`id` is `Some` for a stored row and `None` for one the operator has just added — which is what lets the same shape serve the read and the write (`SavePutawaySteps` sends a DESIRED SET of these).\n\n`subject` is absent on purpose: it follows from `property` and from nothing else (`CriterionProperty::subject`), so the server derives it and a wire that carried one would be inviting a caller to be wrong.",
              "properties": {
                "attribute_code": {
                  "description": "Set for exactly the three EAV properties, NULL for the other thirteen (`CriterionProperty::needs_attribute_code`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "property": {
                  "$ref": "#/definitions/CriterionProperty"
                },
                "rule": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/CriterionRule"
                    }
                  ],
                  "description": "The negation: `Include` or `Exclude`. Not a boolean flag."
                },
                "values": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "property",
                "rule",
                "values"
              ],
              "type": "object"
            },
            "CriterionRule": {
              "enum": [
                "Include",
                "Exclude"
              ],
              "type": "string"
            },
            "PutawayGuard": {
              "oneOf": [
                {
                  "description": "Step applies to any source.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                },
                {
                  "description": "Step applies only when the stock comes from `from_zone`.",
                  "enum": [
                    "FromZone"
                  ],
                  "type": "string"
                },
                {
                  "description": "Step applies only when the stock comes from `from_location`.",
                  "enum": [
                    "FromLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayMode": {
              "oneOf": [
                {
                  "description": "Any location that passes the suitability checks.",
                  "enum": [
                    "Suitable"
                  ],
                  "type": "string"
                },
                {
                  "description": "Locations already holding the same stock — consolidate into them.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayOrdering": {
              "oneOf": [
                {
                  "description": "Candidates in warehouse route order.",
                  "enum": [
                    "Route"
                  ],
                  "type": "string"
                },
                {
                  "description": "Candidates by proximity to the SKU's assigned slot.",
                  "enum": [
                    "NearestToSlot"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayPipelineStep": {
              "description": "One step of the pipeline: its fields, its conditions, its words, and every verdict about it.",
              "properties": {
                "clauses": {
                  "description": "The running sentence, in the pieces the card's three bands need (`narrate_step`'s own topics, not this file's).",
                  "items": {
                    "$ref": "#/definitions/Clause"
                  },
                  "type": "array"
                },
                "criteria": {
                  "description": "The step's conditions, in the order `list_for_step` returns them — the `property` enum's own declaration order.",
                  "items": {
                    "$ref": "#/definitions/CriterionRow"
                  },
                  "type": "array"
                },
                "fields": {
                  "$ref": "#/definitions/PutawayStepFields"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "never_runs_after": {
                  "description": "The `step_num` of the earlier step that leaves this one nothing to place, when there is one. A `step_num` and not an id: it is what the operator reads on the card.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "refusals": {
                  "description": "Why this step, AS THE OPERATOR IS HOLDING IT, cannot be saved. Always empty for a stored step — see the module doc.",
                  "items": {
                    "$ref": "#/definitions/Clause"
                  },
                  "type": "array"
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "step_num": {
                  "type": "string"
                },
                "version": {
                  "description": "This step's own optimistic lock — per step, never per policy, because two supervisors editing two different steps must not collide.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "clauses",
                "criteria",
                "fields",
                "id",
                "refusals",
                "sequence",
                "step_num",
                "version"
              ],
              "type": "object"
            },
            "PutawayScope": {
              "oneOf": [
                {
                  "description": "Candidate zone named on the step itself (`to_zone`).",
                  "enum": [
                    "ZoneFromStep"
                  ],
                  "type": "string"
                },
                {
                  "description": "Candidate zone taken from the SKU's putaway zone.",
                  "enum": [
                    "ZoneFromSku"
                  ],
                  "type": "string"
                },
                {
                  "description": "Single candidate location named on the step (`to_location`).",
                  "enum": [
                    "LocationFromStep"
                  ],
                  "type": "string"
                },
                {
                  "description": "Single candidate location taken from the SKU.",
                  "enum": [
                    "LocationFromSku"
                  ],
                  "type": "string"
                },
                {
                  "description": "The SKU's assigned (slotted) location.",
                  "enum": [
                    "AssignedSlot"
                  ],
                  "type": "string"
                }
              ]
            },
            "PutawayStepFields": {
              "description": "The seventeen card fields, under their own column names.\n\nSpelled out rather than embedding [`PutawayPolicyDetail`] whole: the card edits exactly these, and a wire shape that also carried `add_who` / `mod_when` / `putaway_policy_id` would invite a draft to send them back.",
              "properties": {
                "allow_mixed_lot": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "allow_mixed_sku": {
                  "description": "`None` is a meaning of its own — \"this step has no opinion about what the location may already hold\" — and not an absence. These three and the four anchors above are the columns a save may set back to NULL by sending an explicit `null` (`PUTAWAY_STEP_CLEARABLE_COLUMNS`); a null on any other field of the card is ignored, as it always was.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "fit_by_cube": {
                  "description": "All FIVE fit toggles. The mockup draws three; migration 447 added `fit_by_stack_limit` and `fit_by_quantity` after it was drawn, and a card that showed three would remove a capability the current screen already has.",
                  "type": "boolean"
                },
                "fit_by_pallet_dims": {
                  "type": "boolean"
                },
                "fit_by_quantity": {
                  "type": "boolean"
                },
                "fit_by_stack_limit": {
                  "type": "boolean"
                },
                "fit_by_weight": {
                  "type": "boolean"
                },
                "from_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_zone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "guard": {
                  "$ref": "#/definitions/PutawayGuard"
                },
                "mode": {
                  "$ref": "#/definitions/PutawayMode"
                },
                "ordering": {
                  "$ref": "#/definitions/PutawayOrdering"
                },
                "require_empty": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "respect_temperature": {
                  "type": "boolean"
                },
                "scope": {
                  "$ref": "#/definitions/PutawayScope"
                },
                "to_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_zone": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "fit_by_cube",
                "fit_by_pallet_dims",
                "fit_by_quantity",
                "fit_by_stack_limit",
                "fit_by_weight",
                "guard",
                "mode",
                "ordering",
                "respect_temperature",
                "scope"
              ],
              "type": "object"
            },
            "Run": {
              "description": "The clause's words, cut into the values the operator chose and the rest. Concatenated, `text` of every run is the clause's own `text`, byte for byte.",
              "properties": {
                "bold": {
                  "description": "A value the operator picked — the card sets these in bold.",
                  "type": "boolean"
                },
                "missing": {
                  "description": "Words standing where a value the step NEEDS is not set — the card draws these amber, in place.\n\nA FLAG and not a marker to match, because the marker is a translated phrase: the card used to be expected to find the gap by looking for its words in the clause, which needed the words sent to it, and nothing ever sent them. Never `true` together with `bold`.",
                  "type": "boolean"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "bold",
                "missing",
                "text"
              ],
              "type": "object"
            }
          },
          "description": "One putaway policy's pipeline, with everything the card draws beside each step.",
          "properties": {
            "next_step_num": {
              "description": "What the system will call the next step the operator adds. Shown on the \"+ Add step\" affordance BEFORE the add, which is why it is here and not only in the add command's answer.",
              "type": "string"
            },
            "policy_code": {
              "type": "string"
            },
            "policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "policy_version": {
              "description": "The policy's own optimistic lock — what a reorder must echo back.",
              "format": "int32",
              "type": "integer"
            },
            "steps": {
              "description": "Every step of the policy in execution order (`sequence`, never `step_num` — that is `varchar(5)` and sorts '10' before '2').",
              "items": {
                "$ref": "#/definitions/PutawayPipelineStep"
              },
              "type": "array"
            }
          },
          "required": [
            "next_step_num",
            "policy_code",
            "policy_id",
            "policy_version",
            "steps"
          ],
          "title": "PutawayPipelineView",
          "type": "object"
        }
      },
      "summary": "Read one putaway policy's step pipeline with its criteria, its readback, its refusals and its never-runs marks.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:711bb2e6940cd4a1ec7f2b362732250c32568a9b46731317cb0288f5e2995081",
      "x-quark-response-schema-hash": "sha256:174ca380b5262eaff099785a014976808d0f576c12158160f1d00ddf96f97415",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_criterion_vocabulary",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "attribute_code",
          "required": false,
          "schema": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "property",
          "required": false,
          "schema": {
            "default": null,
            "description": "A [`CriterionProperty`] label, as the engine spells it. A `String` and not the enum: an unfamiliar spelling has to come back as a refusal naming it, and a typed field would be refused by serde at the transport boundary with a message about the whole request.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "VocabularyItem": {
              "description": "One thing the picker may offer.",
              "properties": {
                "code": {
                  "description": "What lands in the row and what the engine compares — exactly, and case-sensitively.",
                  "type": "string"
                },
                "display": {
                  "description": "What a human reads. Never the same field as [`Self::code`]: every comparison the engine makes is on the code, so a picker that sent the display back would store a criterion that matches nothing.",
                  "type": "string"
                },
                "reason": {
                  "description": "Why this item is grouped where it is — the family, at the property stage, which is what the picker draws its headings from (the same shape the allocation screen's unit picker groups by class). `None` where there is no grouping to make.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "display"
              ],
              "type": "object"
            }
          },
          "description": "Which of the three questions this answers.",
          "properties": {
            "items": {
              "items": {
                "$ref": "#/definitions/VocabularyItem"
              },
              "type": "array"
            },
            "stage": {
              "description": "`\"property\"` | `\"attribute\"` | `\"value\"`.",
              "type": "string"
            }
          },
          "required": [
            "items",
            "stage"
          ],
          "title": "VocabularyAnswer",
          "type": "object"
        }
      },
      "summary": "The values a putaway criterion may take: its properties, their attributes, and the values of one.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4317ca2c569ebf279b8136d6fa9653795eb052cfcc9d38d1b18a56f104b96e05",
      "x-quark-response-schema-hash": "sha256:56eea477eb6a2b48c43d4af1372d20191c88fba61a7e770476d103fd39560268",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_dry_run",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "lpn",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        },
        {
          "name": "policy_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DryRunCandidate": {
              "description": "One predicate's verdict on one candidate location.",
              "properties": {
                "detail": {
                  "description": "What that outcome said: the measurement that refused, its limit, what was attempted. `None` for a pass.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "location": {
                  "type": "string"
                },
                "outcome": {
                  "description": "`offered`, or `refused (<code>)` — worded here so the panel never parses a rejection code.",
                  "type": "string"
                },
                "predicate": {
                  "description": "Which rule spoke.",
                  "type": "string"
                }
              },
              "required": [
                "location",
                "outcome",
                "predicate"
              ],
              "type": "object"
            },
            "DryRunOutcome": {
              "description": "How one step of the pipeline answered.\n\nAn enum and not a string: the panel styles these four differently and a string would make that styling a client-side parse of engine vocabulary — the one thing this whole module exists to stop.",
              "oneOf": [
                {
                  "description": "This step offered the location the engine took.",
                  "enum": [
                    "Matched"
                  ],
                  "type": "string"
                },
                {
                  "description": "This step ran its candidate scan and reserved nothing.",
                  "enum": [
                    "Evaluated"
                  ],
                  "type": "string"
                },
                {
                  "description": "This step was not about this pallet, or had nowhere to look.",
                  "enum": [
                    "Skipped"
                  ],
                  "type": "string"
                },
                {
                  "description": "The engine returned before this step: an earlier one matched, or the walk stopped. No trace entry exists for it at all.",
                  "enum": [
                    "NotReached"
                  ],
                  "type": "string"
                }
              ]
            },
            "DryRunPallet": {
              "description": "The pallet an LPN carries.",
              "properties": {
                "container_id": {
                  "description": "What the engine was actually asked about — `container.id`, which is what `explain_location` takes.",
                  "format": "int64",
                  "type": "integer"
                },
                "lines": {
                  "items": {
                    "$ref": "#/definitions/DryRunPalletLine"
                  },
                  "type": "array"
                },
                "location": {
                  "description": "Where the pallet is standing now.",
                  "type": "string"
                },
                "note": {
                  "description": "Anything that needs saying about the LIST rather than about the pallet — today, the two ways [`lines`](Self::lines) can hold fewer rows than the LPN's stock did: it was cut at [`PALLET_LINES_CAP`], or rows under this LPN sit on a different container and are not on this pallet.\n\nNot in the plan's interface sketch. It is here because a supervisor counting a short list must never have to wonder which of those happened — a report that quietly showed 200 of 201 lines, or half a pallet, would be the one thing this module is built not to do.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "container_id",
                "lines",
                "location"
              ],
              "type": "object"
            },
            "DryRunPalletLine": {
              "description": "One SKU line on the pallet.",
              "properties": {
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "qty",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "DryRunStep": {
              "description": "One step of the pipeline, as the dry run found it.",
              "properties": {
                "candidates": {
                  "description": "Only for the step that MATCHED. Every other step's candidate list is the story of a scan that led nowhere, and a panel drawing all of them would bury the one that answered.",
                  "items": {
                    "$ref": "#/definitions/DryRunCandidate"
                  },
                  "type": "array"
                },
                "candidates_seen": {
                  "format": "int64",
                  "type": "integer"
                },
                "explanation": {
                  "description": "The outcome in words, including the pipeline position, so one line of the report reads on its own.",
                  "type": "string"
                },
                "outcome": {
                  "$ref": "#/definitions/DryRunOutcome"
                },
                "searched_location": {
                  "description": "The single location this step searched, when its scope named one.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "step_num": {
                  "description": "The step's own `step_num`, exactly as the policy stores it — the panel matches its cards on this.",
                  "type": "string"
                },
                "zone": {
                  "description": "The zone this step searched. For a `Location` scope this is the zone the searched LOCATION sits in, not the space that was searched — read [`Self::searched_location`] first.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "candidates",
                "candidates_seen",
                "explanation",
                "outcome",
                "step_num"
              ],
              "type": "object"
            }
          },
          "description": "What the engine would do with one LPN under one policy, in words.",
          "properties": {
            "chosen": {
              "description": "The location the engine would take, when a step matched.",
              "type": [
                "string",
                "null"
              ]
            },
            "lpn": {
              "description": "Echoed back, trimmed — the panel keeps its own field, and a report that did not name its subject cannot be read beside a second one.",
              "type": "string"
            },
            "pallet": {
              "anyOf": [
                {
                  "$ref": "#/definitions/DryRunPallet"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the LPN carries. `None` when the report was refused before a pallet was known, and present even for some refusals: knowing WHAT is on the pallet is most of the answer to \"why did nothing match it\"."
            },
            "refusal": {
              "description": "Why there is no walk to report, worded. Not an error: an operator who typed an unknown LPN asked a question and gets an answer.",
              "type": [
                "string",
                "null"
              ]
            },
            "steps": {
              "description": "EVERY step of the policy, in `sequence` order. Empty only when the report was refused.",
              "items": {
                "$ref": "#/definitions/DryRunStep"
              },
              "type": "array"
            },
            "verdict": {
              "description": "One sentence: which step won, or that none did. Always present, so the panel has exactly one thing to print at the top — on a refusal it is the refusal, said once rather than in two places that could disagree.",
              "type": "string"
            }
          },
          "required": [
            "lpn",
            "steps",
            "verdict"
          ],
          "title": "PutawayDryRun",
          "type": "object"
        }
      },
      "summary": "What the putaway engine would do with one LPN under one policy, in words: the pallet, which step wins and where it would go, and every step of the pipeline with why it did or did not answer — including the ones the engine never reached. Evaluates the SAVED policy, not an unsaved draft, so a step edited on screen is previewed only after it is saved. Reserves nothing (the walk is rolled back). An LPN carrying no stock, or loose stock rather than a container, comes back as a worded `refusal` on a successful response — not as an error; only a policy that does not exist or will not load is a refusal of the call.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cf54e6df591b0ea369bf295176913e9b52df9b337b9cee31d6c8de2432088e8b",
      "x-quark-response-schema-hash": "sha256:d42c2d6f4e7eec0ac5d07eb52577311659de46d1e2f9f66ee83cfbcc4434c9e8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_steps_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "CriterionProperty": {
                "oneOf": [
                  {
                    "enum": [
                      "LocationType",
                      "LocationStatus",
                      "LocationCategory",
                      "LocationProcessingType",
                      "LocationFlag",
                      "LocationAbc",
                      "MixSku",
                      "MixLot",
                      "SkuAbc",
                      "SkuGroup",
                      "SkuClass",
                      "PutawayClass",
                      "Rotation",
                      "LotAttribute",
                      "SkuAttribute",
                      "LocationAttribute"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Is the pallet a full pallet of its pack, or a part of one (`SPEC_putaway_assigned_slot.md` §5)? A `Product` property: it decides whether the step applies to the pallet.",
                    "enum": [
                      "PalletFullness"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CriterionRow": {
                "description": "One condition on a step, as the card reads it and as a save states it.\n\n`id` is `Some` for a stored row and `None` for one the operator has just added — which is what lets the same shape serve the read and the write (`SavePutawaySteps` sends a DESIRED SET of these).\n\n`subject` is absent on purpose: it follows from `property` and from nothing else (`CriterionProperty::subject`), so the server derives it and a wire that carried one would be inviting a caller to be wrong.",
                "properties": {
                  "attribute_code": {
                    "description": "Set for exactly the three EAV properties, NULL for the other thirteen (`CriterionProperty::needs_attribute_code`).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "property": {
                    "$ref": "#/definitions/CriterionProperty"
                  },
                  "rule": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/CriterionRule"
                      }
                    ],
                    "description": "The negation: `Include` or `Exclude`. Not a boolean flag."
                  },
                  "values": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "property",
                  "rule",
                  "values"
                ],
                "type": "object"
              },
              "CriterionRule": {
                "enum": [
                  "Include",
                  "Exclude"
                ],
                "type": "string"
              },
              "PutawayStepEdit": {
                "description": "One step's draft.\n\n`fields` is raw JSON on purpose, and this is the one place in the command that is not typed: serde folds `{\"allow_mixed_sku\": null}` and `{}` into the same `None`, so a typed struct alone cannot tell \"this step has no opinion about mixing\" from \"do not touch it\" — and the step card's visible symptom was exactly that (pick \"Any occupancy\", watch the old value come straight back). [`explicit_nulls_among`] reads the raw value BEFORE deserialization; the typed [`PutawayPolicyDetailForUpdate`] carries the rest.",
                "properties": {
                  "criteria": {
                    "default": null,
                    "description": "The conditions this step should END UP with, or `None` to leave them alone. `Some(vec![])` means \"no conditions at all\".",
                    "items": {
                      "$ref": "#/definitions/CriterionRow"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "expected_version": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "fields": true,
                  "step_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "expected_version",
                  "fields",
                  "step_id"
                ],
                "type": "object"
              }
            },
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "description": "Resolved at the RPC boundary from `params.meta` when the wire did not put it here — see `IdempotencyKey::unset` for why the default is a sentinel and never a fresh random key.",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "steps": {
                "items": {
                  "$ref": "#/definitions/PutawayStepEdit"
                },
                "type": "array"
              }
            },
            "required": [
              "policy_id",
              "steps"
            ],
            "title": "SavePutawaySteps",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StepVersion": {
              "description": "Each written step's NEW version, so the editor's drafts stay saveable without a re-read.",
              "properties": {
                "step_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "step_id",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "versions": {
              "items": {
                "$ref": "#/definitions/StepVersion"
              },
              "type": "array"
            }
          },
          "required": [
            "versions"
          ],
          "title": "SavePutawayStepsResult",
          "type": "object"
        }
      },
      "summary": "Write every edited putaway step of one policy, each against its own version, with its conditions.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4f6c993806fb121bf8983ef49edda8579068b4da1b446ba93c78eecf6c2bc9a6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b877b1f9a1ff199959a5e148aeb240a22bad40a7e491cc8a740adf4a1ab1344f",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "putaway_policy_detail",
          "id_field": "steps[].step_id",
          "version_field": "steps[].expected_version"
        }
      ]
    },
    {
      "name": "putaway_step_add",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "policy_id"
            ],
            "title": "AddPutawayStep",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "step_id": {
              "format": "int64",
              "type": "integer"
            },
            "step_num": {
              "description": "What the system called it — the label the operator now reads on the card, which is why the caller gets it back rather than guessing.",
              "type": "string"
            }
          },
          "required": [
            "step_id",
            "step_num"
          ],
          "title": "AddPutawayStepResult",
          "type": "object"
        }
      },
      "summary": "Add an empty step at the end of one putaway policy's pipeline; the system numbers it.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fce078335b159c84a3d61822a2970b92827d6f53ef5dac4641500eb9bf85d36d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:52fa166740b57d4069fac728df6b34370327a199643a850d1a66da5bff9b77cb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_step_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "step_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "step_id"
            ],
            "title": "DeletePutawayStep",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "step_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "step_id"
          ],
          "title": "DeletePutawayStepResult",
          "type": "object"
        }
      },
      "summary": "Delete one putaway step, against the version it was read at; its conditions go with it.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1fa7ff4dd36bb3d8368019c75abfae755a530848b14148fa3d9a037cbb9bee44",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:31bfdf9628e34c5310ff0e6f6b540d1efc947247e659136b50f69cc4e7391b40",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "putaway_policy_detail",
          "id_field": "step_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "putaway_steps_reorder",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_policy_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "step_ids": {
                "description": "Every step of the policy, in the order the screen now shows them. A permutation of the pipeline — `PutawayPolicyDetailBmc::pipeline_order` refuses anything else.",
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "expected_policy_version",
              "policy_id",
              "step_ids"
            ],
            "title": "ReorderPutawaySteps",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_policy_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "new_policy_version"
          ],
          "title": "ReorderPutawayStepsResult",
          "type": "object"
        }
      },
      "summary": "Reorder one putaway policy's steps, against the policy's version.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b00ba06470038f358d00b7a89b273a72fc15fef2a6f799d4c29526f6fa94e930",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:3152250547fe54b9c2e61440e14a8cbce25c932a85f17c3d05a19ec51bfff1fc",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "putaway_policy",
          "id_field": "policy_id",
          "version_field": "expected_policy_version"
        }
      ]
    },
    {
      "name": "create_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "active": {
                "type": "boolean"
              },
              "block_inbound_flow": {
                "type": "boolean"
              },
              "block_outbound_flow": {
                "type": "boolean"
              },
              "code": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enforce": {
                "type": "boolean"
              },
              "overridable": {
                "type": "boolean"
              },
              "rank": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "active",
              "block_inbound_flow",
              "block_outbound_flow",
              "code",
              "enforce",
              "overridable",
              "rank"
            ],
            "title": "InventoryHoldCodeForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "block_inbound_flow": {
              "description": "Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.",
              "type": "boolean"
            },
            "block_outbound_flow": {
              "description": "Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "enforce": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "overridable": {
              "type": "boolean"
            },
            "rank": {
              "description": "Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "block_inbound_flow",
            "block_outbound_flow",
            "code",
            "enforce",
            "id",
            "overridable",
            "rank"
          ],
          "title": "InventoryHoldCode",
          "type": "object"
        }
      },
      "summary": "Create a new inventory_hold_code — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:54b43ccaaf3704b94d3a6513e98c9ff3553e890266eed33a0414db57ed659e59",
      "x-quark-response-schema-hash": "sha256:ab039a644a5f7165769e4f67658a78e8fca9aea3a374038ff08c3f72e554dbd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "block_inbound_flow": {
              "description": "Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.",
              "type": "boolean"
            },
            "block_outbound_flow": {
              "description": "Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "enforce": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "overridable": {
              "type": "boolean"
            },
            "rank": {
              "description": "Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "block_inbound_flow",
            "block_outbound_flow",
            "code",
            "enforce",
            "id",
            "overridable",
            "rank"
          ],
          "title": "InventoryHoldCode",
          "type": "object"
        }
      },
      "summary": "Get a inventory_hold_code by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ab039a644a5f7165769e4f67658a78e8fca9aea3a374038ff08c3f72e554dbd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryHoldCode": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "block_inbound_flow": {
                  "description": "Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.",
                  "type": "boolean"
                },
                "block_outbound_flow": {
                  "description": "Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].",
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "enforce": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "overridable": {
                  "type": "boolean"
                },
                "rank": {
                  "description": "Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.",
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "block_inbound_flow",
                "block_outbound_flow",
                "code",
                "enforce",
                "id",
                "overridable",
                "rank"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryHoldCode"
          },
          "title": "Array_of_InventoryHoldCode",
          "type": "array"
        }
      },
      "summary": "List inventory_hold_code — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:2175b74e7e342ddbe4145fa0bf518b0069637646a54c5a8e1f05a92caa431448",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "active": {
                "type": "boolean"
              },
              "block_inbound_flow": {
                "type": "boolean"
              },
              "block_outbound_flow": {
                "type": "boolean"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enforce": {
                "type": "boolean"
              },
              "overridable": {
                "type": "boolean"
              },
              "rank": {
                "format": "int64",
                "type": "integer"
              }
            },
            "title": "InventoryHoldCodeUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "block_inbound_flow": {
              "description": "Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.",
              "type": "boolean"
            },
            "block_outbound_flow": {
              "description": "Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "enforce": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "overridable": {
              "type": "boolean"
            },
            "rank": {
              "description": "Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "block_inbound_flow",
            "block_outbound_flow",
            "code",
            "enforce",
            "id",
            "overridable",
            "rank"
          ],
          "title": "InventoryHoldCode",
          "type": "object"
        }
      },
      "summary": "Update hold-code behavior without changing its stable code.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:82fadbe8fad9181f19e90b2f217316a39d4c55f1d69781da5e043c1cf7878610",
      "x-quark-response-schema-hash": "sha256:ab039a644a5f7165769e4f67658a78e8fca9aea3a374038ff08c3f72e554dbd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "block_inbound_flow": {
              "description": "Does this hold forbid PUTTING stock into the place it covers?\n\nSeparate from [`Self::block_outbound_flow`] because the warehouse asks two different questions of one hold, and one flag used to answer both. The dedicated damage bay carries a permanent `Damaged` hold so its contents never reach an order — that is a PICKING ban — and the same flag was read as \"nothing may be put here\", which refused the damaged return the bay exists to receive. `enforce` / `overridable` stay the STRENGTH of the ban; these two say what it applies TO.",
              "type": "boolean"
            },
            "block_outbound_flow": {
              "description": "Does this hold forbid TAKING stock out of the place it covers?\n\nRead by the availability view (`inventory_balance_atp`), by the reservation re-check (`InventoryHoldBmc::covers_position`) and by the source side of a move. See [`Self::block_inbound_flow`].",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "enforce": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "overridable": {
              "type": "boolean"
            },
            "rank": {
              "description": "Intended as the dropdown sort order (low rank on top, migration 142).\n\n**Nothing reads it.** It did NOT set loc_status precedence, whatever this comment claimed before: `derive_loc_status` (`wms-inventory::hold`) ranks a location by matching the literal code `\"Damaged\"`, so renumbering ranks changes no behaviour — and the admin form (migration 189) nevertheless demands a value for it. Kept as-is rather than dropped because that is the owner's call, not a cleanup: see migration 199, which dropped `ack_code` for exactly this reason once the same question was answered.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "block_inbound_flow",
            "block_outbound_flow",
            "code",
            "enforce",
            "id",
            "overridable",
            "rank"
          ],
          "title": "InventoryHoldCode",
          "type": "object"
        }
      },
      "summary": "Delete a inventory_hold_code by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ab039a644a5f7165769e4f67658a78e8fca9aea3a374038ff08c3f72e554dbd8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple inventory_hold_code by IDs — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_hold_code",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_hold_code — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "inventory_hold_code",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "move_execute",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "MoveContext": {
                "additionalProperties": false,
                "description": "Input contract for `MoveCommand`. Caller fills exactly one source pattern (container_id / lpn / loc), exactly one destination pattern, and optional qty (None = full move; Some = partial — only valid when `source_type.allows_partial_qty()`).\n\nPer ADR-055 §D-9: MoveCommand is a dumb primitive — it does NOT resolve destinations from `owner_config.default_*_loc` or any allocation policy. Caller is responsible for providing the final `dest_loc` / `dest_lpn` / `dest_container_id` ready-to-use. `deny_unknown_fields` is load-bearing, not tidiness (F6).\n\nThis struct just LOST `acknowledged_overrides` and `authorized_by`. Serde's default is to ignore fields it does not know, so a client still sending them would have its acknowledgement silently dropped: the supervisor types a password, the ack goes nowhere, the move refuses again, and nothing anywhere says why. That is the precise failure mode this whole feature exists to remove — an authorization that looks accepted and is not.\n\nWith this, a client that has not adopted `override_grant_id` fails loudly at the parse, naming the field it should not be sending.",
                "properties": {
                  "dest_container_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "dest_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "dest_lpn": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "dest_lpn_auto": {
                    "default": false,
                    "description": "When `true` and no `dest_lpn`/`dest_container_id` is given, the primitive GENERATES a fresh LPN (`ContainerService::generate_container_code`) and lands the stock in that NEW container at `dest_loc`, instead of landing loose. The caller (Hard-Move \"New → Auto\") sets this; the primitive stays dumb — it just resolves \"a new container, you pick the code\". Ignored when `dest_lpn` is set (that names the container) or the dest location is `discard_lpn` (which forces loose).",
                    "type": "boolean"
                  },
                  "idempotency_key": {
                    "default": "00000000-0000-0000-0000-000000000000",
                    "description": "The move's idempotency key.\n\nRequired by every layer below the RPC boundary — `transaction_log` rows and the idempotency store both assume it is real. On the WIRE it may be omitted, because a client whose key is derived from the payload hash (rf-go, `submit_state.go:78`) cannot put the key inside the payload without circularity; such clients send it in the ADR-058 `meta` envelope instead, and `move_execute` fills it in before the pipeline runs. A context still holding [`IdempotencyKey::unset`] past the boundary is a bug the boundary is required to have rejected.\n\nThe default is NAMED on purpose: bare `#[serde(default)]` would invent a fresh random key (that is what `Default` for this type does), so an omitted key would silently become a real one and its retry would double-execute rather than dedupe.",
                    "format": "uuid",
                    "type": "string"
                  },
                  "lot": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "override_grant_id": {
                    "default": null,
                    "description": "The server-minted grant authorizing this move's overrides (`supervisor_override_grant`, F6). The acknowledged pairs AND the authorizer are read from that row — neither is a field the client can assert, which is the whole of F6: before it, an operator could post `acknowledged_overrides` + any `authorized_by` and move stock off a held pallet, and `transaction_log` recorded the forged authorizer.\n\n`None` for the overwhelming majority of moves, which need no override at all — that case must stay the cheap one, with no extra round trip.",
                    "format": "uuid",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "owner_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pending_move_in_id": {
                    "default": null,
                    "description": "The reservation (`inventory_pending_move_in.id`) the putaway engine took when it chose this location. Set ONLY when the SYSTEM directed the move — it switches the primitive into directed mode, where a landing conflict on the directed location resolves as an acknowledgeable deviation or a redirect instead of a bare refusal, and where a successful move retires the reservation.\n\nIt is a HANDLE, never a promise: `putaway_suggest_location` is idempotent for days while a reservation lives for minutes, so a replayed response can carry an id whose reservation has already expired. The executor re-reads the row (`movement::directed::open`) and refuses a stale one rather than trusting the caller.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "qty": {
                    "description": "`None` = full move; `Some(n)` = partial. Only valid when `source_type.allows_partial_qty()` returns `true`.",
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "reason_code": {
                    "description": "Free-form audit hint, ≤80 chars (mirrors `transaction_log.reason_code` VARCHAR(80) constraint per migration 144).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "recursive": {
                    "description": "Subtree move (existing `MoveContainer.recursive` flag): when `true`, child containers move with the root.",
                    "type": "boolean"
                  },
                  "serial_numbers": {
                    "default": null,
                    "description": "Operator-scanned unit serials for a serial-tracked PARTIAL move — the specific units to move, from the RF terminal. `None`/empty for a full move (all serials follow the qty) or for non-serial stock. The primitive never chooses which serials move, so a partial move of serial-tracked stock must name them.",
                    "items": {
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "sku_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source_container_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "source_loc": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source_lpn": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source_type": {
                    "$ref": "#/definitions/MoveSourceType"
                  }
                },
                "required": [
                  "recursive",
                  "source_type"
                ],
                "type": "object"
              },
              "MoveSourceType": {
                "oneOf": [
                  {
                    "enum": [
                      "putaway",
                      "putaway_correction",
                      "post_pick",
                      "load_shipment",
                      "pick_reversal",
                      "replenishment",
                      "let_down",
                      "manual",
                      "repack",
                      "consolidation",
                      "decant",
                      "move_to_qc",
                      "release_from_qc",
                      "move_to_damage",
                      "move_to_rtv",
                      "move_to_bgrade",
                      "move_to_return",
                      "move_to_destroy",
                      "regulated_destroy",
                      "zone_move"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Audit discriminator ONLY — `transaction_log.source_type = \"pick\"` and the validation-matrix row for an outbound-style move of FREE stock.\n\nIt is **not** the Pick operation and **never** proof of a right to consume reserved stock: a Generic Move with this source type still runs in `AvailableMove` accounting, refuses `qty_allocated` / `qty_picked` like every other move, and never touches a `pick_detail`, its reservation or its task. Executing a Pick is `picking::execute_reserved_pick` (the stock-move kernel's `ReservedPick` accounting, entered only after the pick is proved under lock) — never `MovementService::execute` with this variant, and never \"release the reservation, then Move\".\n\nThe wire value `\"pick\"` is kept as is; changing it needs its own compatibility decision (stock-move-kernel debt, slice 5).",
                    "enum": [
                      "pick"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "already_printed_lpn": {
                "default": null,
                "description": "F2(b): the LPN the operator already printed by hand for this move (the New-LPN \"Print\" button fires before submit so the label can be applied to the pallet). When it equals the container the move creates, `move_execute` skips the post-commit auto-print — otherwise the pallet gets two identical labels. Optional + defaulted so every non-New-LPN caller omits it and the pipeline (which reads only `ctx`) is unaffected.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "ctx": {
                "$ref": "#/definitions/MoveContext"
              }
            },
            "required": [
              "ctx"
            ],
            "title": "MoveCommand",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            },
            "MoveWarning": {
              "oneOf": [
                {
                  "description": "Code 80 acknowledged: source LPN had active hold, override applied.",
                  "properties": {
                    "hold_code": {
                      "$ref": "#/definitions/InventoryStatusHold"
                    },
                    "hold_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "hold_on_source_lpn_acknowledged"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "hold_code",
                    "hold_id",
                    "kind"
                  ],
                  "type": "object"
                },
                {
                  "description": "Code 81 acknowledged: source location had `loc_flag != None`, override applied.",
                  "properties": {
                    "flag": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "src_loc_on_hold_acknowledged"
                      ],
                      "type": "string"
                    },
                    "loc_code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "flag",
                    "kind",
                    "loc_code"
                  ],
                  "type": "object"
                },
                {
                  "description": "Code 82 acknowledged: destination location had `loc_flag != None`, override applied.",
                  "properties": {
                    "flag": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "dst_loc_on_hold_acknowledged"
                      ],
                      "type": "string"
                    },
                    "loc_code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "flag",
                    "kind",
                    "loc_code"
                  ],
                  "type": "object"
                },
                {
                  "description": "Code 85 acknowledged: the SYSTEM directed this location, a soft rule refused it, and the operator confirmed the placement anyway.\n\n`subject` is the rule that was overruled (`capacity`, `sku_mixing`, …) — the OTHER half of the `(code, subject)` ack pair the operator actually authorized, so the audit record names the same thing the prompt did. `detail` is the refusal in full (which SKU, which limit), which neither the code nor the subject can carry.",
                  "properties": {
                    "code": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "directed_deviation_acknowledged"
                      ],
                      "type": "string"
                    },
                    "loc_code": {
                      "type": "string"
                    },
                    "subject": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "detail",
                    "kind",
                    "loc_code",
                    "subject"
                  ],
                  "type": "object"
                },
                {
                  "description": "The directed move landed, but its reservation was no longer `Active` by the time the executor retired it — the TTL sweeper or a re-suggest got there first. Not a failure (the stock did arrive), but it means the location was released and possibly re-promised while the operator was walking, so it is surfaced rather than swallowed.",
                  "properties": {
                    "kind": {
                      "enum": [
                        "directed_reservation_already_retired"
                      ],
                      "type": "string"
                    },
                    "pending_move_in_id": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "pending_move_in_id"
                  ],
                  "type": "object"
                }
              ]
            }
          },
          "description": "Success-path return. Failures surface via `MoveError`.\n\nCompletion timestamp deliberately NOT included — the outbox event `inventory.moved` carries the canonical timestamp, and `transaction_log` has `add_when` per move line. Adding it here would only duplicate.",
          "properties": {
            "ask_location_empty": {
              "default": false,
              "description": "Count spec Appendix L (ZERO_CONFIRMATION): the move took the last stock out of `source_location`, and the moved stock's owner asks (`owner_config.confirm_empty_on_move`) — the RF asks the operator whether that location is empty (`location_confirm_empty`, source `Move`, `source_id` = `move_log_id`). Only a manual move asks.",
              "type": "boolean"
            },
            "created_lpn": {
              "default": null,
              "description": "The LPN of a container this move CREATED (New-LPN: manual or auto), so the caller can auto-print its label. `None` when the move relocated, merged into an existing container, or landed loose — nothing new to label.",
              "type": [
                "string",
                "null"
              ]
            },
            "fragments_processed": {
              "format": "uint32",
              "minimum": 0.0,
              "type": "integer"
            },
            "holds_added": {
              "description": "`inventory_hold.id` rows INSERTed by §4.3 hold cascade.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "holds_released": {
              "description": "`inventory_hold.id` rows UPDATEd to `is_hold_on=false`.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "idempotency_key": {
              "format": "uuid",
              "type": "string"
            },
            "move_log_id": {
              "default": null,
              "description": "The move's first `transaction_log` row: the operation an answer names.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "source_location": {
              "default": "",
              "description": "The location the stock left.",
              "type": "string"
            },
            "total_qty_moved": {
              "format": "double",
              "type": "number"
            },
            "warnings": {
              "description": "Non-fatal warnings (e.g. `acknowledged_overrides` consumed; future a warning for a hold that does not move with the stock, once Phase 3 lands `inventory_hold.moves_with_stock`).",
              "items": {
                "$ref": "#/definitions/MoveWarning"
              },
              "type": "array"
            }
          },
          "required": [
            "fragments_processed",
            "holds_added",
            "holds_released",
            "idempotency_key",
            "total_qty_moved",
            "warnings"
          ],
          "title": "MoveResult",
          "type": "object"
        }
      },
      "summary": "Generic Move primitive — validates and executes inventory movement (Putaway, Pick, MoveToQc, MoveToDamage, MoveToRtv, ReleaseFromQc, etc.) with full pipeline. Pass pending_move_in_id (from putaway_suggest_location) to run the move as DIRECTED: the executor re-validates that reservation, downgrades a soft rule broken on the reserved location to an acknowledgement instead of a refusal, answers a process-banned location with a redirect, and retires the reservation when the stock lands. An acknowledgement is a PAIR, {code, subject}, sent back in meta.acknowledged_overrides: for a directed deviation the code is 85 and the subject is the rule that refused (capacity, sku_mixing, lot_mixing, multi_lot_on_lpn, attribute_mixing, loc_type) — ONE pair per rule, never per offending line. Every unacknowledged pair of the whole move arrives together in error.data.detail.context.pairs with is_overridable=true, so one prompt collects them all; acking a pair the server did not raise is a hard UnknownAckSubject, not silent leniency. A redirect answers with error.data.detail.context.redirect = {location, pending_move_in_id} — the nearest usable location to the one being refused, ALREADY RESERVED for this pallet (pass that id back as pending_move_in_id to stay in directed mode), with the promise on the refused location released; when no replacement could be named there is no context and the client asks putaway_suggest_location again. Directed leniency applies ONLY while dest_loc is the reserved location — a destination the operator chose themselves keeps every ordinary refusal. A move out of or into a location an open Hard inventory count is counting is refused (LOCATION_BEING_COUNTED, is_overridable=true); context.pairs names the pair {code: 87, subject: \"count:<inventory_count_id>\"} a shift lead's supervisor_override_grant must carry — with a reason, which is recorded on the count — and its id goes in ctx.override_grant_id like every other move override.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "move_command",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5d6ddcb7704663a0a9ef6a86eab883cc7d828e917559ddeb83a4ad3c293b0971",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b273209d2b1777bd00ef39fc04aeb26d21faa7762a11bbf5c137c60f5e8e0ae0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "generate_lpn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Owner whose next LPN to generate. `owner_id` is carried for future per-owner LPN formats; today's `LPN{seq}` format ignores it.",
            "properties": {
              "owner_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "owner_id"
            ],
            "title": "GenerateLpn",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The generated LPN container code (e.g. `LPN0000042`).",
          "properties": {
            "code": {
              "type": "string"
            }
          },
          "required": [
            "code"
          ],
          "title": "GenerateLpnResult",
          "type": "object"
        }
      },
      "summary": "Generate a fresh LPN container code (LPN + zero-padded sequence) for the Hard-Move New-LPN preview.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "move_command",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:10a06cd5c85d6db2e2ce1c60d9c30e7a673acf48278b5a2d0abdc6a71819e9a0",
      "x-quark-requires-idempotency": false,
      "x-quark-response-schema-hash": "sha256:24b651fe55d555c862d144544724b72ea40803f83bfb218eac08b91930f209c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "print_lpn_label",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Input for the New-LPN block's \"Print\" button: the container code whose LPN-ID label to send to the operator's printer as ZPL.",
            "properties": {
              "lpn": {
                "type": "string"
              },
              "owner_id": {
                "default": 0,
                "description": "Owner context for printer resolution. The New-LPN \"Print\" fires BEFORE the move creates the container (print the label, apply it to the pallet, then submit — which creates that exact container), so there is nothing to derive the owner from yet: the caller passes the move's source owner. Ignored when the container already exists (reprint). 0 → falls back to the Warehouse-default printer via the resolution walk.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "lpn"
            ],
            "title": "PrintLpnLabel",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Outcome of a manual label print: whether ZPL reached a printer, which one, and a human message for the toast. Best-effort — a missing printer or an unreachable device is reported (not raised as an error) so the UI shows it inline.",
          "properties": {
            "message": {
              "type": "string"
            },
            "printer": {
              "type": [
                "string",
                "null"
              ]
            },
            "sent": {
              "type": "boolean"
            }
          },
          "required": [
            "message",
            "sent"
          ],
          "title": "PrintLpnLabelResult",
          "type": "object"
        }
      },
      "summary": "Print the LPN-ID label (ZPL) for a container to the operator's resolved printer.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "move_command",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fd8cae0d3b5f00dbe3fb8689b491038064ae40c80443f9fcc3fbe2b313e738f4",
      "x-quark-requires-idempotency": false,
      "x-quark-response-schema-hash": "sha256:3197d98b61c0213bd94c5f703fce509d302afaaf5b62edc37578c34e3c75e6b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "move_source_holds",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Which position to ask about: the same two facts `move_execute` resolves its source holds from.",
            "properties": {
              "container_id": {
                "description": "The container the stock is in; `None` for loose stock.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "location": {
                "description": "The source location code.",
                "type": "string"
              }
            },
            "required": [
              "location"
            ],
            "title": "MoveSourceHoldsParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The holds covering a move's source, sorted by what can be done about them (see [`HoldPolicy::split_outbound`]).",
          "properties": {
            "blocking": {
              "description": "Codes nobody can lift: the move is refused whoever asks (`decide` says `Block`, an unknown code included).",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "overridable": {
              "description": "Codes a supervisor can lift for this move (`decide` says `Warn`).",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "blocking",
            "overridable"
          ],
          "title": "OutboundHoldSplit",
          "type": "object"
        }
      },
      "summary": "The holds on a move's source, sorted by what can be done about them: `overridable` codes a supervisor can lift for this move, `blocking` codes nobody can (the move is refused whoever asks). Decided by the same hold policy `move_execute` applies, so a screen can offer only the quantity the move would accept. Read-only; changes nothing.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "move_command",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:54f40a0fcfec7a352432b60d59b1f987a843cfefe62ae25d2251a1f5a61a3cf6",
      "x-quark-response-schema-hash": "sha256:940beee49446e1fafbe7e56c11a32a9a94b45dfadea8f410db4a0e183c301d0a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_suggest_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "TraceDetail": {
                "description": "How much of the scan to keep.\n\n`Full` is not the default because [`StepTrace::candidate_details`] grows with `CANDIDATE_BATCH × MAX_BATCHES × predicates` per step, and the trace is returned to a handheld over the wire on every suggestion.\n\n`Deserialize`/`JsonSchema` because it is a REQUEST field ([`crate::putaway::command::SuggestLocation`]): the choice belongs to whoever is asking about one surprising pallet, not to a build-time constant.",
                "oneOf": [
                  {
                    "description": "Matched step, candidate counts, rejection code tallies.",
                    "enum": [
                      "Summary"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Every candidate and every predicate verdict, in evaluation order.",
                    "enum": [
                      "Full"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "description": "Ask the engine for a location for one received LPN, and reserve it.\n\n`idempotency_key` lives on the struct rather than being read from `params.meta` because `CommandParams` mirrors meta into data on the way in and `payload_for_hash` strips it on the way out — the same shape `DisposeContainer` and `MoveCommand` use.",
            "properties": {
              "container_id": {
                "description": "The pallet to put away. It must be positioned (`current_loc`) and hold stock — the engine refuses otherwise rather than suggesting a location no `move_execute` could use.",
                "format": "int64",
                "type": "integer"
              },
              "exclude_locations": {
                "default": [],
                "description": "Locations the operator has already refused. Skipped without evaluation.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "trace_detail": {
                "allOf": [
                  {
                    "$ref": "#/definitions/TraceDetail"
                  }
                ],
                "default": "Summary",
                "description": "`Full` records every candidate and every predicate verdict. Per-request because it is what a support engineer turns on for ONE pallet that went somewhere surprising; on by default it would be paid for on every suggestion sent to a handheld."
              }
            },
            "required": [
              "container_id",
              "idempotency_key"
            ],
            "title": "SuggestLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The suggestion as it goes over the wire.\n\n`location: None` with a `reason` is a normal answer — the warehouse had nothing to offer — not an error. An error means the engine could not ASK the question.\n\n# One idempotency key per user intent — every re-ask needs a fresh one\n\nA `null` location IS a success, so the runner stores it and replays it for the key's whole TTL (days). The natural retry after [`REASON_PALLET_ALREADY_RESERVED`] — same pallet, nothing new to exclude — is a byte-identical payload, so re-using the key does not re-ask the engine: it replays the stale \"no\" even though that reason is documented as retryable. `exclude_locations` changes the hash and so re-asks on its own, but a plain retry does not.\n\nSo: mint a NEW `idempotency_key` for every re-ask. The key deduplicates ONE user intent (\"where does this pallet go, asked now\") against network retries of that same request; a second ask is a second intent.",
          "properties": {
            "expires_at": {
              "description": "RFC3339. When it lapses the reservation stops holding space; the operator has to ask again.\n\n**A replayed value may already be in the past.** The idempotency TTL is days and a reservation's is minutes, so a late retry on the same key replays a `pending_move_in_id` whose reservation has since expired. Shortening the shared idempotency TTL for this one command would trade a general contract for a special case, so the id is deliberately not a guarantee: whoever executes against it re-checks the row is still `status = Active AND expires_at > now()` rather than trusting the handle. `move_execute` does exactly that (`movement::directed::open`) and answers a stale handle with `ReservationNotUsable` — the client's cue to ask for a fresh suggestion under a fresh idempotency key.",
              "type": [
                "string",
                "null"
              ]
            },
            "location": {
              "type": [
                "string",
                "null"
              ]
            },
            "pending_move_in_id": {
              "description": "Hand this to `move_execute` as `pending_move_in_id` to run the suggestion as a DIRECTED move: the executor then treats a soft rule broken on this location as an acknowledgeable deviation rather than a refusal, and retires the reservation when the pallet lands.\n\nNot a guarantee: see [`Self::expires_at`]. The executor re-reads the row and refuses a stale handle outright rather than silently running an undirected move.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reason": {
              "description": "Set exactly when `location` is `None`. One of [`REASON_PALLET_ALREADY_RESERVED`] / [`REASON_NO_ELIGIBLE_LOCATION`] — a code and not a sentence, because the caller branches on it (retry vs. escalate) and the operator-facing wording is the client's to choose.",
              "type": [
                "string",
                "null"
              ]
            },
            "trace": {
              "description": "[`PutawayTrace`], as JSON. Present on success too — there it is the record of which step won and what it passed over."
            }
          },
          "required": [
            "trace"
          ],
          "title": "SuggestLocationResult",
          "type": "object"
        }
      },
      "summary": "Suggest and reserve the location a received LPN should be put away into. Reserves space in inventory_pending_move_in and returns pending_move_in_id — pass it to move_execute as pending_move_in_id to run the move as DIRECTED: a soft rule broken on that location (capacity, mixing, loc_type) then asks the operator to acknowledge the pair {code:85, subject:<the rule that refused>} instead of refusing, a process ban on the location answers with a redirect, and the reservation is retired when the pallet lands. A null location with a reason means nothing qualified — read trace for which rule refused how many locations. Mint a FRESH idempotency_key for every re-ask: a null answer is a success, so re-using the key replays that null for the key's whole TTL instead of asking again; one key per user intent. A replayed expires_at may already be in the past — the reservation TTL is minutes, the idempotency TTL days — so the id is a handle, not a promise: move_execute re-checks the row is still Active and unexpired and refuses a stale one outright rather than quietly running an undirected move.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c0da3bd35095ab7282ca551a7c2815f8ce8d6cc63bf034b908dd2f033c71bdc4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b092a7b3ac6eff4023b64022677603df558f8d2f240a09fbf2b0d4efba27489b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_explain_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "TraceDetail": {
                "description": "How much of the scan to keep.\n\n`Full` is not the default because [`StepTrace::candidate_details`] grows with `CANDIDATE_BATCH × MAX_BATCHES × predicates` per step, and the trace is returned to a handheld over the wire on every suggestion.\n\n`Deserialize`/`JsonSchema` because it is a REQUEST field ([`crate::putaway::command::SuggestLocation`]): the choice belongs to whoever is asking about one surprising pallet, not to a build-time constant.",
                "oneOf": [
                  {
                    "description": "Matched step, candidate counts, rejection code tallies.",
                    "enum": [
                      "Summary"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Every candidate and every predicate verdict, in evaluation order.",
                    "enum": [
                      "Full"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "description": "Ask the engine the same question [`SuggestLocation`] asks, without `idempotency_key` — a query carries none (`.claude/rules/api-versioning-and-idempotency.md`).",
            "properties": {
              "container_id": {
                "description": "Same field, same meaning as [`SuggestLocation::container_id`].",
                "format": "int64",
                "type": "integer"
              },
              "exclude_locations": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "trace_detail": {
                "allOf": [
                  {
                    "$ref": "#/definitions/TraceDetail"
                  }
                ],
                "default": "Summary"
              }
            },
            "required": [
              "container_id"
            ],
            "title": "ExplainLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The answer, over the wire — and deliberately NOT [`SuggestLocationResult`].\n\nThat struct carries `pending_move_in_id` and `expires_at`: handles to a row this call's transaction never commits. Shipping them here would hand a client an id that names nothing the moment the response leaves the process — worse than omitting it, because a caller could mistake it for something `move_execute` might accept. `location`, `reason` and `trace` are facts about the DECISION the engine reached, which the rollback does not erase; nothing on this struct is a handle to a database row.",
          "properties": {
            "location": {
              "type": [
                "string",
                "null"
              ]
            },
            "reason": {
              "description": "Set exactly when `location` is `None`. Same vocabulary as [`SuggestLocationResult::reason`].",
              "type": [
                "string",
                "null"
              ]
            },
            "trace": {
              "description": "[`PutawayTrace`], as JSON — same shape [`SuggestLocationResult::trace`] carries."
            }
          },
          "required": [
            "trace"
          ],
          "title": "ExplainLocationResult",
          "type": "object"
        }
      },
      "summary": "Ask the putaway engine which location it would choose for a received LPN, without reserving anything. Runs the identical policy walk putaway_suggest_location runs, inside a transaction that is always rolled back before this returns — so a real reservation the pallet already held (an operator walking toward it) is untouched, and nothing this call writes survives it. The response carries location, reason and trace — the same fields putaway_suggest_location returns for those — but never pending_move_in_id or expires_at: this call reserves nothing, so there is no row for either to name. Built for the putaway step page's dry-run panel; any caller wanting to preview a policy without disturbing a live pallet is the intended audience.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "putaway",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f4987b0ca1dd9baef3ce7301f3ad94a6de2aa8bad51eaf48387cb87d9b28072a",
      "x-quark-response-schema-hash": "sha256:03a9fcd2ca9aa9cb49115f92b5a92371054e031c683a973d59c18b55b485a762",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "putaway_release_reservation",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "pending_move_in_id": {
                "description": "`inventory_pending_move_in.id` — the row the supervisor selected on the Pending Move-In screen.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "pending_move_in_id"
            ],
            "title": "ReleaseReservationParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "released": {
              "description": "`false` when the reservation was already consumed, cancelled or expired. That is a normal answer, not an error: the sweeper may have reached the row between the page render and the click, and a double-click makes the second press land on a row that is no longer Active.",
              "type": "boolean"
            }
          },
          "required": [
            "released"
          ],
          "title": "ReleaseReservationResult",
          "type": "object"
        }
      },
      "summary": "Release a pending putaway reservation, freeing the location before its TTL expires. Cancels the inventory_pending_move_in row named by id, together with any neighbour positions it shares a reservation group with (an oversized load spanning several positions holds one row per position) — the whole group releases as one call. The location's promised space (active_totals) drops by the released rows' cube and weight immediately, so the next putaway_suggest_location can offer the location again. Active-only: a reservation already consumed by an arriving pallet, cancelled, or expired by the sweeper is left exactly as it is and the call answers released: false — a normal outcome for a double-click or a row the sweeper reached first, not an error.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "putaway",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2c53f7b996cb263f69e1158a1a9a002b74b4d650aab40e6c538b39f0f36e9b7d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:85f8fcafdda14253dfcdd350df8a78e57533e7a3b2e84e3ff969dd89937dfa12",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_pending_move_in",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryPendingMoveIn": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "The pallet whose space this is. A pallet may hold several live reservations at once — one per position an oversized load spans — but never two for the SAME location: `uq_inventory_pending_move_in_active_container_location` enforces one live row per (container, location). A multi-position group is tied together by `share_of`.",
                  "format": "int64",
                  "type": "integer"
                },
                "cube": {
                  "description": "Cube and weight are 0 by default and 0 is a legitimate footprint, not a placeholder: `sku.cube` is NOT NULL DEFAULT 0, so an item whose dimensions were never captured genuinely promises nothing.",
                  "format": "double",
                  "type": "number"
                },
                "expires_at": {
                  "description": "TTL resolution order: `owner_config.putaway_reservation_ttl_min` → `system_settings.PUTAWAY_RESERVATION_TTL_MIN` → its `default_value`.",
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "description": "`location.code` — the location being held.",
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "share_of": {
                  "description": "Номер главной записи, если эта строка держит соседнюю ячейку под негабарит. Пусто у обычных назначений и у самой главной — главная и есть та, куда идёт кладовщик, и наружу показывается только её номер.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source": {
                  "$ref": "#/definitions/PendingMoveInSource"
                },
                "status": {
                  "$ref": "#/definitions/PendingMoveInStatus"
                },
                "weight": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "container_id",
                "cube",
                "expires_at",
                "id",
                "location",
                "mod_when",
                "mod_who",
                "source",
                "status",
                "weight"
              ],
              "type": "object"
            },
            "PendingMoveInSource": {
              "oneOf": [
                {
                  "description": "Held by the directed-putaway engine for a suggested location.",
                  "enum": [
                    "Putaway"
                  ],
                  "type": "string"
                },
                {
                  "description": "Held by replenishment for the pick face it is topping up.",
                  "enum": [
                    "Replenishment"
                  ],
                  "type": "string"
                },
                {
                  "description": "Held by an operator-driven move.",
                  "enum": [
                    "Move"
                  ],
                  "type": "string"
                }
              ]
            },
            "PendingMoveInStatus": {
              "oneOf": [
                {
                  "description": "Holding space. The ONLY status that counts toward promised space.",
                  "enum": [
                    "Active"
                  ],
                  "type": "string"
                },
                {
                  "description": "The stock arrived — the space is now real occupancy in `inventory_balances`, so this row must stop counting or the location is charged twice. That is literal on the ANCHOR row: the load landed in exactly that location. A NEIGHBOUR row (`share_of` set) never receives stock itself — `retire_group` still stamps it `Consumed`, one status for the whole group rather than the group disagreeing about one event — and there it means the promise ended because the load it was holding a position FOR has arrived; from that moment the position is held by the section holds landing places (`putaway::section_holds`), not by this reservation any more.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The suggestion was withdrawn (re-suggest, operator refusal).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                },
                {
                  "description": "The TTL ran out before the stock arrived; the sweeper flipped it.",
                  "enum": [
                    "Expired"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryPendingMoveIn"
          },
          "title": "Array_of_InventoryPendingMoveIn",
          "type": "array"
        }
      },
      "summary": "List inventory_pending_move_in — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "putaway",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:89cf28ac98d5d7588ceb4d1d5f74f449ee7586c366d80b6415fd4446310ec157",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_pending_move_in",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_pending_move_in — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "putaway",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_active_holds_by_lpn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "description": "Optional filter by hold-type identifier (`inventory_hold.code`, e.g. \"QcQuarantine\"). When omitted — returns all active holds on the LPN.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lpn": {
                "type": "string"
              }
            },
            "required": [
              "lpn"
            ],
            "title": "ListActiveHoldsByLpnParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryHoldRowDto": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "comments": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "date_on": {
                  "description": "ISO-8601 / RFC-3339 string (serde-default for `time::OffsetDateTime`).",
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_hold_on": {
                  "type": "boolean"
                },
                "loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "date_on",
                "id",
                "is_hold_on"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryHoldRowDto"
          },
          "title": "Array_of_InventoryHoldRowDto",
          "type": "array"
        }
      },
      "summary": "List active inventory holds attached to an LPN; optional `code` filter narrows by hold-type.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "hold",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5fcfc2288924d8cc4bf8efbd990f72170de111d4a0a9cf90d9f738290ac158c4",
      "x-quark-response-schema-hash": "sha256:5bbba6a1c9bc9f5a06e3f83c6d0cebe4a04f3395ea5011e37e07bed8c84891c0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_inventory_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The business fields needed to place a hold. Shared by BOTH create entry points — the idempotent `create_inventory_hold` command (`CommandParams` envelope) and the CRUD-shape `create_inventory_hold_row` the Holds form posts to (`ParamsForCreate` envelope). It deliberately carries only the operator-supplied fields — the system columns (`is_hold_on` / `status` / `date_on` / `who_on`) are filled by `HoldService::execute`, NOT by the caller, so they are absent here (using the DB-insert `InventoryHoldForCreate` as the wire type would force the form to post them).",
            "properties": {
              "auto_release_date": {
                "description": "Optional release instant. The DateTimePicker sends RFC 3339 in UTC; an omitted/null value means the hold has no scheduled release.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "code": {
                "description": "Hold reason code (`inventory_hold.code`), e.g. `\"Damaged\"`, `\"QcQuarantine\"`, `\"Rtv\"`.",
                "type": "string"
              },
              "comments": {
                "description": "Optional free-text note.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot": {
                "description": "Hold scope: set EXACTLY ONE of lot / loc / lpn — that field's value is the thing being frozen. These mirror the three `inventory_hold` scope columns, so the create form's three pickers map straight through.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lpn": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "HoldRequestData",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "hold_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "hold_id"
          ],
          "title": "CreateHoldResult",
          "type": "object"
        }
      },
      "summary": "Create an inventory hold scoped to a lot, location, or container (LPN).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "hold",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:013369f40d69b035646c0fa5d63b9907a97bf69d4508c19bf220f43b5b41407a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a45a3ba96fa2fb9a9c06cd3b896077ec2ca15858af5191479180c7d3b92c10e1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_inventory_hold_row",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The business fields needed to place a hold. Shared by BOTH create entry points — the idempotent `create_inventory_hold` command (`CommandParams` envelope) and the CRUD-shape `create_inventory_hold_row` the Holds form posts to (`ParamsForCreate` envelope). It deliberately carries only the operator-supplied fields — the system columns (`is_hold_on` / `status` / `date_on` / `who_on`) are filled by `HoldService::execute`, NOT by the caller, so they are absent here (using the DB-insert `InventoryHoldForCreate` as the wire type would force the form to post them).",
            "properties": {
              "auto_release_date": {
                "description": "Optional release instant. The DateTimePicker sends RFC 3339 in UTC; an omitted/null value means the hold has no scheduled release.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "code": {
                "description": "Hold reason code (`inventory_hold.code`), e.g. `\"Damaged\"`, `\"QcQuarantine\"`, `\"Rtv\"`.",
                "type": "string"
              },
              "comments": {
                "description": "Optional free-text note.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot": {
                "description": "Hold scope: set EXACTLY ONE of lot / loc / lpn — that field's value is the thing being frozen. These mirror the three `inventory_hold` scope columns, so the create form's three pickers map straight through.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "lpn": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "HoldRequestData",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_release_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "comments": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_off": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "date_on": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "hours_to_hold": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_hold_on": {
              "type": "boolean"
            },
            "loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/InventoryStatusHold"
            },
            "who_off": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "who_on": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_hold_on",
            "mod_when",
            "mod_who",
            "status"
          ],
          "title": "InventoryHold",
          "type": "object"
        }
      },
      "summary": "Create an inventory hold from the Holds form (CRUD shape; system fields filled by HoldService).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "hold",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e797c06f34d966e682f60681304f5158cd793fda31506458365e522790cb6878",
      "x-quark-response-schema-hash": "sha256:412f4381d721f32a906f4078aa87977e6b26adf7bedbd6aa82d29c0df6291cf0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "release_inventory_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "hold_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "hold_id"
            ],
            "title": "ReleaseHoldCommand",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "released": {
              "type": "boolean"
            }
          },
          "required": [
            "released"
          ],
          "title": "ReleaseHoldResult",
          "type": "object"
        }
      },
      "summary": "Release an inventory hold by id.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "hold",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a6bc488995a1e5cb0dfd16bbaec8858eb4bdaf5689c511cb196b779a46348d86",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:6887b2ab003c561fa278c2731fab7a01af8bc560fe041d1476988cbacb4132de",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "serial_reserve",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "allocation_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "serial_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "allocation_id",
              "idempotency_key",
              "serial_id"
            ],
            "title": "ReserveSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "serial_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_number": {
              "type": "string"
            }
          },
          "required": [
            "serial_id",
            "serial_number"
          ],
          "title": "ReserveSerialResult",
          "type": "object"
        }
      },
      "summary": "Reserve a serial for an allocation (Active → Reserved).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9e2e11c2452b29542127ee8c23c6dd13a641e0676c4e5aa48be334d7a3e275f6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:550e7e202a93130882a6bcae9b133240533819b1d75e34ac418d806bf4c8aa81",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "serial_pick",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "pick_task_id": {
                "format": "int64",
                "type": "integer"
              },
              "picked_to_container": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "pick_task_id",
              "serial_id"
            ],
            "title": "PickSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "serial_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_number": {
              "type": "string"
            }
          },
          "required": [
            "serial_id",
            "serial_number"
          ],
          "title": "PickSerialResult",
          "type": "object"
        }
      },
      "summary": "Pick a reserved serial onto a pick task (Reserved → Picked).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0a244b4dec5bb398862919b6fe5c523562ed3fbc22a0dfc0044c8ddab3eb78f3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:12ae3860793e4f3242a00ea9715051d922e50708fdcd89e8984afbc853a3c363",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "serial_ship",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "customer_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "serial_id": {
                "format": "int64",
                "type": "integer"
              },
              "shipment_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "customer_id",
              "idempotency_key",
              "serial_id",
              "shipment_id"
            ],
            "title": "ShipSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "serial_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_number": {
              "type": "string"
            }
          },
          "required": [
            "serial_id",
            "serial_number"
          ],
          "title": "ShipSerialResult",
          "type": "object"
        }
      },
      "summary": "Ship a picked serial to a customer (Picked → Shipped, clears location).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac019e86f834eac610d4a2513e085d58956a9dfa0b48e19be9da196e7c077433",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:2c206e1a7f49005b251bbff147302a90db015f4497d1c2d53044187e7471f019",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "serial_return",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "new_container_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "new_location": {
                "type": "string"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "return_via": {
                "format": "int64",
                "type": "integer"
              },
              "serial_number": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "new_location",
              "owner_id",
              "return_via",
              "serial_number"
            ],
            "title": "ReturnSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "serial_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_number": {
              "type": "string"
            }
          },
          "required": [
            "serial_id",
            "serial_number"
          ],
          "title": "ReturnSerialResult",
          "type": "object"
        }
      },
      "summary": "Return a previously shipped serial via RMA receipt (Shipped → Returned). Anomaly 88 if status != Shipped.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cbdb05913c690b18fc88dde35e9d7c82986c0261616a3afdc7c95022e1c250d9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f067b3dd1a3de4dd3295024ded9fca1814e5ede8f75fe943bf480b80eba8494f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "serial_dispose",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "serial_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "reason",
              "serial_id"
            ],
            "title": "DisposeSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "serial_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_number": {
              "type": "string"
            }
          },
          "required": [
            "serial_id",
            "serial_number"
          ],
          "title": "DisposeSerialResult",
          "type": "object"
        }
      },
      "summary": "Dispose a damaged or returned serial (terminal).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bc693cbe81a2564a57fc37f993135dfe7c664209a407250e44a197a172ad6a92",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c78b0a3e624035c4d39d7388672fc9bdd38dafd8d87368d32d768507861d6ab6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "serial_move",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The bare serial move. It does NOT judge or place a `new_container_id`: the landing rule for an existing container lives in `wms-inventory`, which this crate cannot reach. Every generic caller goes through `wms_inventory::service::container::commands::serial_landing::MoveSerialIntoPlace` (the `serial_move` RPC does); only a caller that has already landed the container itself may run this directly.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "new_container_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "new_location": {
                "type": "string"
              },
              "serial_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "new_location",
              "serial_id"
            ],
            "title": "MoveSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "serial_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_number": {
              "type": "string"
            }
          },
          "required": [
            "serial_id",
            "serial_number"
          ],
          "title": "MoveSerialResult",
          "type": "object"
        }
      },
      "summary": "Move an Active or Held serial to a new location/container.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:68ff41cbba4c5b6dd38a7507cb72499cd3ac68fbbec52ffa26453fec9832c2e9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:54f51477b5bc257e8cd013564b5e102e5fc6e60a29f5ec1305895e954d78457e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "remove_captured_serial",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "episode_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "serial_number": {
                "description": "Serial to drop. Must match an existing `serial_capture_episode_item.serial_number` for this episode.",
                "type": "string"
              }
            },
            "required": [
              "episode_id",
              "idempotency_key",
              "serial_number"
            ],
            "title": "RemoveCapturedSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "serials_collected_qty": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "episode_id",
            "serials_collected_qty"
          ],
          "title": "RemoveCapturedSerialResult",
          "type": "object"
        }
      },
      "summary": "Drop one wrongly-captured serial from an open episode. Decrements captured_qty. Spec §7.4 (RemoveCapturedSerial).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:13f5863842860e180fcb58ef455c2a762fa62d8afe725054c24df7fc29bcd340",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:da26ce26b6181265355ec438d10ad9a419f1970a5ecc015364e05124d324a3cf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "capture_serial",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "EpisodeBusinessOperation": {
                "enum": [
                  "Receive",
                  "Putaway",
                  "Move",
                  "Pick",
                  "Pack",
                  "Ship",
                  "Return",
                  "Adjust",
                  "Inventory"
                ],
                "type": "string"
              }
            },
            "properties": {
              "business_operation": {
                "allOf": [
                  {
                    "$ref": "#/definitions/EpisodeBusinessOperation"
                  }
                ],
                "default": "Receive",
                "description": "Polymorphic discriminator (spec §7.4 / §16.8). Drives both the open-context extractor and the commit dispatcher. Defaults to `Receive` so callers from the existing receipt flow don't need to be updated."
              },
              "business_ref_id": {
                "description": "Polymorphic reference to the business document the episode is anchored to: * Receive  → `receipt_detail.id` * Move     → `move.id` * Pick     → `pick_task.id` (line via `business_ref_line`) * Pack     → `shipping_carton.id` * Ship     → `shipment.id` * Return   → `receipt.id` (RMA) * Adjust   → `inventory_adjustment.id` * Inventory→ `count_session.id`",
                "format": "int64",
                "type": "integer"
              },
              "business_ref_line": {
                "default": null,
                "description": "Optional line-level discriminator within the document (e.g. `pick_task_line.id`). Null when the op is anchored at the document level (typical Receive case).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "serial_number": {
                "description": "The serial barcode the operator just scanned.",
                "type": "string"
              },
              "to_location": {
                "default": null,
                "description": "Receive-context location. Required on the FIRST `Receive` call (no open episode yet); ignored on subsequent. Server stores on the episode and reuses at commit time.\n\nNote: container_id is NOT a client-side input — the server resolves it from the business document (`receipt_detail .container_id` for Receive). Client doesn't have a numeric container_id anyway, only the LPN string operators typed at receive-time, which the receive handler already resolved into the FK before we get here.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "business_ref_id",
              "idempotency_key",
              "serial_number"
            ],
            "title": "CaptureSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EpisodeStatus": {
              "enum": [
                "Open",
                "InProgress",
                "AwaitingConfirmation",
                "Committed",
                "Cancelled",
                "Abandoned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "already_captured": {
              "description": "`true` when `serial_number` was already in this episode — the insert was a no-op and the counter did NOT increment. UI uses it to surface the spec §10.1 \"accidentally scanned twice? Y/N\" prompt.",
              "type": "boolean"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "episode_status": {
              "$ref": "#/definitions/EpisodeStatus"
            },
            "serials_collected_qty": {
              "description": "How many serials have been captured in this episode so far. Matches `serial_capture_episode.captured_qty`. Named with the `serials_` prefix so the rf-go seed reads `response.serials_*_qty` alongside the same names returned by `receive_against_asn` — one vocabulary across the whole capture flow.",
              "format": "int32",
              "type": "integer"
            },
            "serials_to_collect_qty": {
              "description": "How many serials this episode aims to collect — derived from the business document (receipt_detail.qty_expected for Receive).",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_captured",
            "episode_id",
            "episode_status",
            "serials_collected_qty",
            "serials_to_collect_qty"
          ],
          "title": "CaptureSerialResult",
          "type": "object"
        }
      },
      "summary": "Capture one serial during a receipt-line collection loop. Server-side episode is auto-opened on first call and auto-committed (serials registered into inventory_balances_serial, episode closed) when captured_qty reaches expected_qty. See ADR-062.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:42dc4a1ccdca88e6c1faea9fa5194483dec8fb7b4ea1846b8c94e96d9df2f8a3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:2b5dc338845dde4613f0bc3462f3911e7cae7cf9235dded246ced6bbdda42260",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cancel_episode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "episode_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "default": null,
                "description": "Free-text reason persisted to `serial_capture_episode.closed_reason`. Defaults to `operator_cancel` when caller omits it.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "episode_id",
              "idempotency_key"
            ],
            "title": "CancelEpisode",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EpisodeStatus": {
              "enum": [
                "Open",
                "InProgress",
                "AwaitingConfirmation",
                "Committed",
                "Cancelled",
                "Abandoned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "captured_qty_at_cancel": {
              "description": "`captured_qty` at the moment of cancel — UI surfaces \"discarded N scanned serials\" so the operator sees what was lost.",
              "format": "int32",
              "type": "integer"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/EpisodeStatus"
            }
          },
          "required": [
            "captured_qty_at_cancel",
            "episode_id",
            "status"
          ],
          "title": "CancelEpisodeResult",
          "type": "object"
        }
      },
      "summary": "Operator-explicit episode cancellation. status → Cancelled, items preserved for audit, qty_received untouched. Spec §7.4. Stateless: operator's decision is intent-driven (cancel this episode), independent of captured_qty / status — re-checked atomically inside tx.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:851230f18f558fabfb798b7b68c51980c99e5debef6470f551d2940d1e4dd815",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:34a4335db68798921a938bb85d7ae112b03b4c5e26f042f255bf49c57b0ad29c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "force_close_episode",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "episode_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "description": "Free-text reason, persisted to `serial_capture_episode.closed_reason` as `\"supervisor_force_close:{reason}\"`. Required — supervisor terminating someone else's work always needs an audit trail.",
                "type": "string"
              }
            },
            "required": [
              "episode_id",
              "idempotency_key",
              "reason"
            ],
            "title": "ForceCloseEpisode",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EpisodeStatus": {
              "enum": [
                "Open",
                "InProgress",
                "AwaitingConfirmation",
                "Committed",
                "Cancelled",
                "Abandoned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "captured_qty_at_close": {
              "description": "`captured_qty` at the moment of force-close. Lets the supervisor UI display \"discarded N pending serials\" so the impact is visible before/after the action.",
              "format": "int32",
              "type": "integer"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "original_operator_id": {
              "description": "Original operator who owned the episode. Surfaced so the supervisor's audit log can show \"force-closed operator X's episode\" without an extra round-trip.",
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/EpisodeStatus"
            }
          },
          "required": [
            "captured_qty_at_close",
            "episode_id",
            "original_operator_id",
            "status"
          ],
          "title": "ForceCloseEpisodeResult",
          "type": "object"
        }
      },
      "summary": "Supervisor force-close of an episode that's stuck or abandoned. status → Cancelled, items preserved for audit, closed_reason='supervisor_force_close:{reason}'. Used to unblock receipt_close when the original operator can't drive the episode to a terminal state. Spec §7.4 / slice 3d. Stateless: supervisor's intent is fixed (force-close THIS episode); idempotent on re-entry (already-terminal returns current state).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b5c233b3b34274b29d69eb0c6b827f5b4e93872d80ebd166b8df6acfc61d76f7",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:16b12629c8cac9dec121e73c2bf9a2daa5511b416c750d535c9725de09d64339",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_open_episodes_for_receipt",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "receipt_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "receipt_id"
            ],
            "title": "ListOpenEpisodesForReceiptInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenEpisodeRow": {
              "description": "One row per still-open episode attached to any detail of `receipt_id`. Trimmed to the fields RF needs for the resume / blocker prompts.",
              "properties": {
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "description": "Where the capture's goods are — the scan page sends it back as `to_location`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty",
                "receipt_detail_id",
                "sku_code",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OpenEpisodeRow"
          },
          "title": "Array_of_OpenEpisodeRow",
          "type": "array"
        }
      },
      "summary": "List Open / InProgress / AwaitingConfirmation serial-capture episodes attached to any detail of a receipt. Used by RF to surface the resume-prompt on ASN re-entry and by close_receipt to enforce the close-blocker. Spec §7.4 / §10.13.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a3c11e65bb303412603259439d84118630d7be803b9fc78e1c28b45533cea9ca",
      "x-quark-response-schema-hash": "sha256:1e348163f72d9a2089784fc73a6aa526803cb62cf5f7d7b38591f907e60c9e72",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_open_episodes_for_operator",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OperatorOpenEpisodeRow": {
              "description": "Denormalised row returned by [`SerialCaptureEpisodeBmc::list_open_for_operator_with_receipt_info`]. Pre-joins receipt + owner so the RF recovery screen can render rows like `\"ASN-0000003 / OWNER001 / SKU005 / 2/3 / opened 14:32\"` without an extra round-trip per row.\n\nKept distinct from `SerialCaptureEpisode` because callers want the flat shape (one row = one display line) and shouldn't pay for the full audit row. Add fields only when the UI actually needs them.",
              "properties": {
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "owner_code": {
                  "type": "string"
                },
                "owner_company": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_number": {
                  "type": "string"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty",
                "opened_at",
                "owner_code",
                "owner_company",
                "owner_id",
                "receipt_detail_id",
                "receipt_id",
                "receipt_number",
                "sku_code",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OperatorOpenEpisodeRow"
          },
          "title": "Array_of_OperatorOpenEpisodeRow",
          "type": "array"
        }
      },
      "summary": "List the calling operator's own still-open serial-capture episodes (Open / InProgress / AwaitingConfirmation). Pre-enriched with receipt_number + owner_code + owner_company so the RF recovery screen can render each row without per-row lookups. Used by RCSN_RECOVERY (slice 3b) to let an operator returning to a terminal pick up wherever they left off.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:675b61a6579cd92af6a64161ee1d20c60a1be72d9c13200614293844145c371f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_force_close_candidates",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EpisodeForceCloseRow": {
              "description": "Denormalised row returned by [`SerialCaptureEpisodeBmc::list_force_close_candidates_for_warehouse`]. Sibling of [`OperatorOpenEpisodeRow`] tailored for the supervisor force-close screen (slice B):\n\n- Adds `operator_id` so the supervisor knows whose episode they're about to terminate. - Status filter is broader — also includes `Abandoned` (TTL- terminated, needs supervisor decision per slice 3f). - No operator filter — supervisor sees every blocking episode in the warehouse, not just their own.\n\n- Covers Receive AND Pick episodes. An Abandoned Pick episode blocks moves of its stock through the movement service (`move_execute`; ADR-090 `EpisodeMoveGuard`) until a supervisor resolves it, so the supervisor must be able to find it here.\n\nDisplay fields are joined in, so the picker renders without N+1 lookups.",
              "properties": {
                "business_operation": {
                  "description": "`Receive` or `Pick`.",
                  "type": "string"
                },
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "document_number": {
                  "description": "The document the episode works on: the receipt number for Receive, the shipment order number for Pick.",
                  "type": "string"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "description": "Where the scanned units are. Always set for Pick; Receive episodes usually have none.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "opened_at": {
                  "type": "string"
                },
                "operator_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_code": {
                  "type": "string"
                },
                "owner_company": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_detail_id": {
                  "description": "Receive only.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "receipt_id": {
                  "description": "Receive only.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "receipt_number": {
                  "description": "Receive only.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "task_id": {
                  "description": "Pick only: the task the episode belongs to.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "business_operation",
                "captured_qty",
                "document_number",
                "episode_id",
                "expected_qty",
                "opened_at",
                "operator_id",
                "owner_code",
                "owner_company",
                "owner_id",
                "sku_code",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/EpisodeForceCloseRow"
          },
          "title": "Array_of_EpisodeForceCloseRow",
          "type": "array"
        }
      },
      "summary": "List every unresolved Receive or Pick serial-capture episode in the warehouse — Open / InProgress / AwaitingConfirmation / Abandoned. No operator filter: the supervisor sees everyone's stuck episodes so they can drive `force_close_episode` (slice 3d): a Receive episode blocks `receipt_close`, an Abandoned Pick episode blocks `move_execute` of its stock. Pre-enriched with business_operation, document_number (receipt or order number), location, owner and operator_id for the RCSN_FORCE picker label (slice B).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "serial_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:0c5484ad0c913e6a710eca22b4d7e0b8123cba6f6899eba1afae2fbf5ee0f2e6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_transaction_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            },
            "TransactionLog": {
              "description": "Core transaction log entity tracking inventory movements",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "effective_date": {
                  "type": "string"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_loc": {
                  "type": "string"
                },
                "from_lpn": {
                  "type": "string"
                },
                "hold_code": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/InventoryStatusHold"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "idempotency_key": {
                  "description": "Correlates rows from the same MoveCommand (one UUID, multiple fragments). NULL on receive-time deposits.",
                  "format": "uuid",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_after": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_before": {
                  "description": "Balance quantity before / after this row (wms-app 052) — written by inventory adjustments; NULL for other operations.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason_code": {
                  "description": "Free-form audit hint (≤80 chars).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "source_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_type": {
                  "description": "Snake-case discriminator (`MoveSourceType::as_code()`) — populated by Move-primitive writes since migration 144. Receive-time deposits leave this NULL.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string"
                },
                "to_loc": {
                  "type": "string"
                },
                "to_lpn": {
                  "type": "string"
                },
                "transaction_type": {
                  "$ref": "#/definitions/TransactionType"
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "effective_date",
                "from_loc",
                "from_lpn",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "qty",
                "sku_code",
                "status",
                "to_loc",
                "to_lpn",
                "transaction_type"
              ],
              "type": "object"
            },
            "TransactionType": {
              "enum": [
                "Deposit",
                "Pick",
                "Ship",
                "Withdraw",
                "Move",
                "Transfer",
                "Adjust",
                "None"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/TransactionLog"
          },
          "title": "Array_of_TransactionLog",
          "type": "array"
        }
      },
      "summary": "List transaction_log — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "transaction_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:d7e59580fe6511b00a1c34b8150f7c15a4df2420621c7418050932e8350afc7e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_transaction_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            },
            "TransactionType": {
              "enum": [
                "Deposit",
                "Pick",
                "Ship",
                "Withdraw",
                "Move",
                "Transfer",
                "Adjust",
                "None"
              ],
              "type": "string"
            }
          },
          "description": "Core transaction log entity tracking inventory movements",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "best_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "delivery_by_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "effective_date": {
              "type": "string"
            },
            "expiration_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "from_loc": {
              "type": "string"
            },
            "from_lpn": {
              "type": "string"
            },
            "hold_code": {
              "anyOf": [
                {
                  "$ref": "#/definitions/InventoryStatusHold"
                },
                {
                  "type": "null"
                }
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "idempotency_key": {
              "description": "Correlates rows from the same MoveCommand (one UUID, multiple fragments). NULL on receive-time deposits.",
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "manufactured_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "qty_after": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_before": {
              "description": "Balance quantity before / after this row (wms-app 052) — written by inventory adjustments; NULL for other operations.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "reason_code": {
              "description": "Free-form audit hint (≤80 chars).",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "source_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_type": {
              "description": "Snake-case discriminator (`MoveSourceType::as_code()`) — populated by Move-primitive writes since migration 144. Receive-time deposits leave this NULL.",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string"
            },
            "to_loc": {
              "type": "string"
            },
            "to_lpn": {
              "type": "string"
            },
            "transaction_type": {
              "$ref": "#/definitions/TransactionType"
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "effective_date",
            "from_loc",
            "from_lpn",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "qty",
            "sku_code",
            "status",
            "to_loc",
            "to_lpn",
            "transaction_type"
          ],
          "title": "TransactionLog",
          "type": "object"
        }
      },
      "summary": "Get a transaction_log by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "transaction_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5526843cf9d73aa5e596fe3ff52d5df6f468bf7a6193709372c9b00f0f2ee080",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_transaction_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count transaction_log — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "transaction_log",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_pick_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickLocationType": {
              "enum": [
                "Each",
                "InnerPack",
                "Case",
                "Pallet"
              ],
              "type": "string"
            }
          },
          "description": "A row of `sku_pick_location_view`: what the SKU card lists and shows.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "max_qty": {
              "format": "double",
              "type": "number"
            },
            "min_qty": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_type": {
              "$ref": "#/definitions/PickLocationType"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "location",
            "max_qty",
            "min_qty",
            "mod_when",
            "mod_who",
            "owner_code",
            "owner_id",
            "pick_type",
            "sku_code",
            "sku_id",
            "uom",
            "version"
          ],
          "title": "SkuPickLocationView",
          "type": "object"
        }
      },
      "summary": "Get one pick location of a SKU.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_pick_location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:88bfad55d3c6655bfa91d7d98fab87e24590f763dd8f9f62ac2e349fcc340828",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_sku_pick_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickLocationType": {
              "enum": [
                "Each",
                "InnerPack",
                "Case",
                "Pallet"
              ],
              "type": "string"
            },
            "SkuPickLocationView": {
              "description": "A row of `sku_pick_location_view`: what the SKU card lists and shows.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "max_qty": {
                  "format": "double",
                  "type": "number"
                },
                "min_qty": {
                  "format": "double",
                  "type": "number"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_code": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_type": {
                  "$ref": "#/definitions/PickLocationType"
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "route_sequence": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "location",
                "max_qty",
                "min_qty",
                "mod_when",
                "mod_who",
                "owner_code",
                "owner_id",
                "pick_type",
                "sku_code",
                "sku_id",
                "uom",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SkuPickLocationView"
          },
          "title": "Array_of_SkuPickLocationView",
          "type": "array"
        }
      },
      "summary": "List the pick locations of SKUs, with the SKU's owner and the location's zone and route.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_pick_location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:a22b09f5bb59ff11fabccd5ef5635b5100eaf66856537057fbd2fc8492b1b782",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_sku_pick_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count the pick locations of SKUs.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_pick_location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_sku_pick_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PickLocationType": {
                "enum": [
                  "Each",
                  "InnerPack",
                  "Case",
                  "Pallet"
                ],
                "type": "string"
              }
            },
            "properties": {
              "location": {
                "type": "string"
              },
              "max_qty": {
                "format": "double",
                "type": "number"
              },
              "min_qty": {
                "format": "double",
                "type": "number"
              },
              "pick_type": {
                "$ref": "#/definitions/PickLocationType"
              },
              "sku_id": {
                "format": "int64",
                "type": "integer"
              },
              "uom": {
                "type": "string"
              }
            },
            "required": [
              "location",
              "max_qty",
              "min_qty",
              "pick_type",
              "sku_id",
              "uom"
            ],
            "title": "SkuPickLocationForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickLocationType": {
              "enum": [
                "Each",
                "InnerPack",
                "Case",
                "Pallet"
              ],
              "type": "string"
            }
          },
          "description": "A row of `sku_pick_location_view`: what the SKU card lists and shows.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "max_qty": {
              "format": "double",
              "type": "number"
            },
            "min_qty": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_type": {
              "$ref": "#/definitions/PickLocationType"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "location",
            "max_qty",
            "min_qty",
            "mod_when",
            "mod_who",
            "owner_code",
            "owner_id",
            "pick_type",
            "sku_code",
            "sku_id",
            "uom",
            "version"
          ],
          "title": "SkuPickLocationView",
          "type": "object"
        }
      },
      "summary": "Assign a pick location to a SKU: a Pick, SpeedPick or Case location, in a unit of the SKU's pack.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku_pick_location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3fd8cd8e92e2027ae80f4292e771081d3dfd09fc8c24be847750ea617c8413d6",
      "x-quark-response-schema-hash": "sha256:88bfad55d3c6655bfa91d7d98fab87e24590f763dd8f9f62ac2e349fcc340828",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_sku_pick_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "PickLocationType": {
                "enum": [
                  "Each",
                  "InnerPack",
                  "Case",
                  "Pallet"
                ],
                "type": "string"
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "definitions": {
                  "PickLocationType": {
                    "enum": [
                      "Each",
                      "InnerPack",
                      "Case",
                      "Pallet"
                    ],
                    "type": "string"
                  }
                },
                "description": "The editable fields; `sku_id` is the row's identity and never changes.",
                "properties": {
                  "location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "max_qty": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "min_qty": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "pick_type": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickLocationType"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "uom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "title": "SkuPickLocationForUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickLocationType": {
              "enum": [
                "Each",
                "InnerPack",
                "Case",
                "Pallet"
              ],
              "type": "string"
            }
          },
          "description": "A row of `sku_pick_location_view`: what the SKU card lists and shows.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "max_qty": {
              "format": "double",
              "type": "number"
            },
            "min_qty": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_type": {
              "$ref": "#/definitions/PickLocationType"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "route_sequence": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "location",
            "max_qty",
            "min_qty",
            "mod_when",
            "mod_who",
            "owner_code",
            "owner_id",
            "pick_type",
            "sku_code",
            "sku_id",
            "uom",
            "version"
          ],
          "title": "SkuPickLocationView",
          "type": "object"
        }
      },
      "summary": "Edit a pick location of a SKU on the version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku_pick_location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:768626a6e5a0eab46c97939b6c8d5de2711a1a1615e051bed13b93aa51e3749f",
      "x-quark-response-schema-hash": "sha256:88bfad55d3c6655bfa91d7d98fab87e24590f763dd8f9f62ac2e349fcc340828",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "sku_pick_location",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "delete_sku_pick_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickLocationType": {
              "enum": [
                "Each",
                "InnerPack",
                "Case",
                "Pallet"
              ],
              "type": "string"
            }
          },
          "description": "One row of `sku_pick_location`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "max_qty": {
              "format": "double",
              "type": "number"
            },
            "min_qty": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pick_type": {
              "$ref": "#/definitions/PickLocationType"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "location",
            "max_qty",
            "min_qty",
            "mod_when",
            "mod_who",
            "pick_type",
            "sku_id",
            "uom",
            "version"
          ],
          "title": "SkuPickLocation",
          "type": "object"
        }
      },
      "summary": "Unassign a pick location from a SKU; refused while the location holds the SKU.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku_pick_location",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c090439e1f490c3cd2ec8fa7619a478f92a5f7e1523c4442f17dc415fcf9e647",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_take_next",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "work_area_code": {
                "default": null,
                "description": "The work area scanned; blank or absent — the whole warehouse.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "TakeNextReplenishment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReplenishmentStatus": {
              "oneOf": [
                {
                  "description": "Planned, not yet brought: counts as on its way to the pick location.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought in full.",
                  "enum": [
                    "Done"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought less than planned (the source held less); closed.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Called off by a supervisor before it was brought.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "One row of `replenishment`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "from_location": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "qty_moved": {
              "format": "double",
              "type": "number"
            },
            "short_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReplenishmentStatus"
            },
            "to_location": {
              "type": "string"
            },
            "uom": {
              "type": "string"
            },
            "uom_qty": {
              "format": "double",
              "type": "number"
            },
            "urgency": {
              "format": "int16",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "from_location",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "qty",
            "qty_moved",
            "sku_code",
            "status",
            "to_location",
            "uom",
            "uom_qty",
            "urgency",
            "version"
          ],
          "title": "Replenishment",
          "type": "object"
        }
      },
      "summary": "Give the operator their next replenishment: the one in hand first, else one from the pool of their areas.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:37bc2df816a345874835503d97a22146895ca0e03c89ce78d197a5eeed3969ef",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:3827a223325e92ba0b885414dccf55db1c9ad5f44229d792d66809b2def66a5a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_confirm",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "from_location": {
                "description": "The location scanned at the source.",
                "type": "string"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "replenishment_id": {
                "format": "int64",
                "type": "integer"
              },
              "short_reason": {
                "default": null,
                "description": "Why less than planned was brought; required then.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "to_location": {
                "description": "The pick location scanned on arrival.",
                "type": "string"
              },
              "uom_qty": {
                "description": "Units of the replenishment's unit brought.",
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "from_location",
              "replenishment_id",
              "to_location",
              "uom_qty"
            ],
            "title": "ConfirmReplenishment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReplenishmentStatus": {
              "oneOf": [
                {
                  "description": "Planned, not yet brought: counts as on its way to the pick location.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought in full.",
                  "enum": [
                    "Done"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought less than planned (the source held less); closed.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Called off by a supervisor before it was brought.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "One row of `replenishment`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "from_location": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "qty_moved": {
              "format": "double",
              "type": "number"
            },
            "short_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReplenishmentStatus"
            },
            "to_location": {
              "type": "string"
            },
            "uom": {
              "type": "string"
            },
            "uom_qty": {
              "format": "double",
              "type": "number"
            },
            "urgency": {
              "format": "int16",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "from_location",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "qty",
            "qty_moved",
            "sku_code",
            "status",
            "to_location",
            "uom",
            "uom_qty",
            "urgency",
            "version"
          ],
          "title": "Replenishment",
          "type": "object"
        }
      },
      "summary": "The operator brought a replenishment: the stock moves into the pick location and the task closes (short with a reason).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4c7e0c0b84b236d390a93f9d7d49ca2462431954d44217952b59db6e4cb6de23",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:3827a223325e92ba0b885414dccf55db1c9ad5f44229d792d66809b2def66a5a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_plan",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "title": "PlanReplenishment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What one pass ordered.",
          "properties": {
            "created": {
              "description": "The replenishments created, in the order they were planned.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "without_source": {
              "description": "Pick locations due but with nothing to take anywhere.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "created",
            "without_source"
          ],
          "title": "PlanOutcome",
          "type": "object"
        }
      },
      "summary": "Replenish now: every pick location at or below its minimum gets what it lacks from storage, as Replenish tasks.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d472df9311825c569c3fe40e1b60183d7c6eedc63bd9a34c242e8f82f95c9edf",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:53c62ecb620dc9f7ac0a023fdc29086c9f071cca9150d1c9fd3add989c16909b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "replenishment_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "replenishment_id"
            ],
            "title": "CancelReplenishment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReplenishmentStatus": {
              "oneOf": [
                {
                  "description": "Planned, not yet brought: counts as on its way to the pick location.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought in full.",
                  "enum": [
                    "Done"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought less than planned (the source held less); closed.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Called off by a supervisor before it was brought.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "One row of `replenishment`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "from_location": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "qty_moved": {
              "format": "double",
              "type": "number"
            },
            "short_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReplenishmentStatus"
            },
            "to_location": {
              "type": "string"
            },
            "uom": {
              "type": "string"
            },
            "uom_qty": {
              "format": "double",
              "type": "number"
            },
            "urgency": {
              "format": "int16",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "from_location",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "qty",
            "qty_moved",
            "sku_code",
            "status",
            "to_location",
            "uom",
            "uom_qty",
            "urgency",
            "version"
          ],
          "title": "Replenishment",
          "type": "object"
        }
      },
      "summary": "Call an open replenishment off on the version read; its task leaves the pool.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c1af440f68cdaf4abfd790945b0567a4e2e77fa4f3bb0cdbe279a819b7163282",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:3827a223325e92ba0b885414dccf55db1c9ad5f44229d792d66809b2def66a5a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "replenishment",
          "id_field": "replenishment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "replenishment_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReplenishmentStatus": {
              "oneOf": [
                {
                  "description": "Planned, not yet brought: counts as on its way to the pick location.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought in full.",
                  "enum": [
                    "Done"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought less than planned (the source held less); closed.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Called off by a supervisor before it was brought.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "One row of `replenishment`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "from_location": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "qty_moved": {
              "format": "double",
              "type": "number"
            },
            "short_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/ReplenishmentStatus"
            },
            "to_location": {
              "type": "string"
            },
            "uom": {
              "type": "string"
            },
            "uom_qty": {
              "format": "double",
              "type": "number"
            },
            "urgency": {
              "format": "int16",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "from_location",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "qty",
            "qty_moved",
            "sku_code",
            "status",
            "to_location",
            "uom",
            "uom_qty",
            "urgency",
            "version"
          ],
          "title": "Replenishment",
          "type": "object"
        }
      },
      "summary": "Get one replenishment.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:3827a223325e92ba0b885414dccf55db1c9ad5f44229d792d66809b2def66a5a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Replenishment": {
              "description": "One row of `replenishment`.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_location": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_moved": {
                  "format": "double",
                  "type": "number"
                },
                "short_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ReplenishmentStatus"
                },
                "to_location": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "uom_qty": {
                  "format": "double",
                  "type": "number"
                },
                "urgency": {
                  "format": "int16",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_location",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "qty",
                "qty_moved",
                "sku_code",
                "status",
                "to_location",
                "uom",
                "uom_qty",
                "urgency",
                "version"
              ],
              "type": "object"
            },
            "ReplenishmentStatus": {
              "oneOf": [
                {
                  "description": "Planned, not yet brought: counts as on its way to the pick location.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought in full.",
                  "enum": [
                    "Done"
                  ],
                  "type": "string"
                },
                {
                  "description": "Brought less than planned (the source held less); closed.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Called off by a supervisor before it was brought.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Replenishment"
          },
          "title": "Array_of_Replenishment",
          "type": "array"
        }
      },
      "summary": "List replenishments, filtered like any list (by status, pick location, SKU).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:30d356d75e958d9352ccf033890ac2a1ad4b9f1806762431eae5e41700a367f8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_count",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count replenishments.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "replenishment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_sku_serial_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "SerialParseMode": {
                "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
                "enum": [
                  "None",
                  "Fixed",
                  "Bounded"
                ],
                "type": "string"
              }
            },
            "properties": {
              "allow_asn_pre_advised": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_deferred_capture": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "allow_receive_capture": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "anomaly_block_severity": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "anomaly_max_per_lpn": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "anomaly_velocity_threshold_min": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "anomaly_vendor_surge_factor": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "check_digit_algorithm": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuous_serial_tracking": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "industry_profile": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "multi_serial_delimiter": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "multi_serial_fixed_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pick_episode_reassignment_mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_mode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "require_unique_global": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "serial_auto_increment": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "serial_format": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_increment_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_increment_source_position": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_mask_format": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_parse_frequency": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_parse_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/SerialParseMode"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "serial_parse_start_after": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_parse_start_position": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_scope": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serials_per_barcode": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sku_id": {
                "format": "int64",
                "type": "integer"
              },
              "warranty_period_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "sku_id"
            ],
            "title": "SkuSerialConfigForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_asn_pre_advised": {
              "type": "boolean"
            },
            "allow_deferred_capture": {
              "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
              "type": "boolean"
            },
            "allow_receive_capture": {
              "type": "boolean"
            },
            "anomaly_block_severity": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "anomaly_max_per_lpn": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "anomaly_velocity_threshold_min": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "anomaly_vendor_surge_factor": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "check_digit_algorithm": {
              "type": [
                "string",
                "null"
              ]
            },
            "continuous_serial_tracking": {
              "description": "Master flag. If false — other fields ignored.",
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "industry_profile": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "multi_serial_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "multi_serial_fixed_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "pick_episode_reassignment_mode": {
              "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
              "type": "string"
            },
            "profile_mode": {
              "description": "Movement/capture coupling policy (ADR-090).",
              "type": "string"
            },
            "require_unique_global": {
              "type": "boolean"
            },
            "serial_auto_increment": {
              "type": "boolean"
            },
            "serial_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_increment_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_increment_source_position": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_mask_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_parse_frequency": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_parse_mode": {
              "$ref": "#/definitions/SerialParseMode"
            },
            "serial_parse_start_after": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_parse_start_position": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_scope": {
              "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
              "type": "string"
            },
            "serials_per_barcode": {
              "format": "int32",
              "type": "integer"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "warranty_period_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_asn_pre_advised",
            "allow_deferred_capture",
            "allow_receive_capture",
            "continuous_serial_tracking",
            "id",
            "mod_when",
            "mod_who",
            "pick_episode_reassignment_mode",
            "profile_mode",
            "require_unique_global",
            "serial_auto_increment",
            "serial_parse_mode",
            "serial_scope",
            "serials_per_barcode",
            "sku_id"
          ],
          "title": "SkuSerialConfig",
          "type": "object"
        }
      },
      "summary": "Create the optional serial-tracking configuration owned by one SKU.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "sku_serial_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:88c65d745bd07431686be1d0c56d6656cf4f19014c98b52c2523d600ec98beea",
      "x-quark-response-schema-hash": "sha256:0e43630b345b07056d9158c0b4adb274c48a8eb72762a5e760765340a9b30899",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_serial_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_asn_pre_advised": {
              "type": "boolean"
            },
            "allow_deferred_capture": {
              "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
              "type": "boolean"
            },
            "allow_receive_capture": {
              "type": "boolean"
            },
            "anomaly_block_severity": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "anomaly_max_per_lpn": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "anomaly_velocity_threshold_min": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "anomaly_vendor_surge_factor": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "check_digit_algorithm": {
              "type": [
                "string",
                "null"
              ]
            },
            "continuous_serial_tracking": {
              "description": "Master flag. If false — other fields ignored.",
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "industry_profile": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "multi_serial_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "multi_serial_fixed_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "pick_episode_reassignment_mode": {
              "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
              "type": "string"
            },
            "profile_mode": {
              "description": "Movement/capture coupling policy (ADR-090).",
              "type": "string"
            },
            "require_unique_global": {
              "type": "boolean"
            },
            "serial_auto_increment": {
              "type": "boolean"
            },
            "serial_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_increment_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_increment_source_position": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_mask_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_parse_frequency": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_parse_mode": {
              "$ref": "#/definitions/SerialParseMode"
            },
            "serial_parse_start_after": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_parse_start_position": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_scope": {
              "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
              "type": "string"
            },
            "serials_per_barcode": {
              "format": "int32",
              "type": "integer"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "warranty_period_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_asn_pre_advised",
            "allow_deferred_capture",
            "allow_receive_capture",
            "continuous_serial_tracking",
            "id",
            "mod_when",
            "mod_who",
            "pick_episode_reassignment_mode",
            "profile_mode",
            "require_unique_global",
            "serial_auto_increment",
            "serial_parse_mode",
            "serial_scope",
            "serials_per_barcode",
            "sku_id"
          ],
          "title": "SkuSerialConfig",
          "type": "object"
        }
      },
      "summary": "Get a sku_serial_config by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_serial_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:0e43630b345b07056d9158c0b4adb274c48a8eb72762a5e760765340a9b30899",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_sku_serial_config_by_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/SkuSerialConfig"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            },
            "SkuSerialConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_asn_pre_advised": {
                  "type": "boolean"
                },
                "allow_deferred_capture": {
                  "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
                  "type": "boolean"
                },
                "allow_receive_capture": {
                  "type": "boolean"
                },
                "anomaly_block_severity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "anomaly_max_per_lpn": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_velocity_threshold_min": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_vendor_surge_factor": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "check_digit_algorithm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuous_serial_tracking": {
                  "description": "Master flag. If false — other fields ignored.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "industry_profile": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "multi_serial_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "multi_serial_fixed_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pick_episode_reassignment_mode": {
                  "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
                  "type": "string"
                },
                "profile_mode": {
                  "description": "Movement/capture coupling policy (ADR-090).",
                  "type": "string"
                },
                "require_unique_global": {
                  "type": "boolean"
                },
                "serial_auto_increment": {
                  "type": "boolean"
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_increment_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_increment_source_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_mask_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_parse_frequency": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_mode": {
                  "$ref": "#/definitions/SerialParseMode"
                },
                "serial_parse_start_after": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_start_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_scope": {
                  "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
                  "type": "string"
                },
                "serials_per_barcode": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warranty_period_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_asn_pre_advised",
                "allow_deferred_capture",
                "allow_receive_capture",
                "continuous_serial_tracking",
                "id",
                "mod_when",
                "mod_who",
                "pick_episode_reassignment_mode",
                "profile_mode",
                "require_unique_global",
                "serial_auto_increment",
                "serial_parse_mode",
                "serial_scope",
                "serials_per_barcode",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_SkuSerialConfig"
        }
      },
      "summary": "Get SKU serial config by SKU ID (1:1 relationship)",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_serial_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f6fc206e1b662e737fd4ebe4214695a63c38f90a41bac57312a66a737492fa02",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_sku_serial_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            },
            "SkuSerialConfig": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_asn_pre_advised": {
                  "type": "boolean"
                },
                "allow_deferred_capture": {
                  "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
                  "type": "boolean"
                },
                "allow_receive_capture": {
                  "type": "boolean"
                },
                "anomaly_block_severity": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "anomaly_max_per_lpn": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_velocity_threshold_min": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "anomaly_vendor_surge_factor": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "check_digit_algorithm": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuous_serial_tracking": {
                  "description": "Master flag. If false — other fields ignored.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "industry_profile": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "multi_serial_delimiter": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "multi_serial_fixed_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pick_episode_reassignment_mode": {
                  "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
                  "type": "string"
                },
                "profile_mode": {
                  "description": "Movement/capture coupling policy (ADR-090).",
                  "type": "string"
                },
                "require_unique_global": {
                  "type": "boolean"
                },
                "serial_auto_increment": {
                  "type": "boolean"
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_increment_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_increment_source_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_length": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_mask_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_parse_frequency": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_mode": {
                  "$ref": "#/definitions/SerialParseMode"
                },
                "serial_parse_start_after": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_parse_start_position": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "serial_scope": {
                  "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
                  "type": "string"
                },
                "serials_per_barcode": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "warranty_period_days": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_asn_pre_advised",
                "allow_deferred_capture",
                "allow_receive_capture",
                "continuous_serial_tracking",
                "id",
                "mod_when",
                "mod_who",
                "pick_episode_reassignment_mode",
                "profile_mode",
                "require_unique_global",
                "serial_auto_increment",
                "serial_parse_mode",
                "serial_scope",
                "serials_per_barcode",
                "sku_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SkuSerialConfig"
          },
          "title": "Array_of_SkuSerialConfig",
          "type": "array"
        }
      },
      "summary": "List sku_serial_config — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_serial_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:dc29f1da3a5139353c55530c79500a86437b1bca58b84c751809de1432f68cfc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_sku_serial_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "allow_asn_pre_advised": {
                "type": "boolean"
              },
              "allow_deferred_capture": {
                "type": "boolean"
              },
              "allow_receive_capture": {
                "type": "boolean"
              },
              "anomaly_block_severity": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "anomaly_max_per_lpn": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "anomaly_velocity_threshold_min": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "anomaly_vendor_surge_factor": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "check_digit_algorithm": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "continuous_serial_tracking": {
                "type": "boolean"
              },
              "industry_profile": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "multi_serial_delimiter": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "multi_serial_fixed_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pick_episode_reassignment_mode": {
                "oneOf": [
                  {
                    "enum": [
                      "Block",
                      "CancelAndRestart"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The open episode is handed over to the operator the work moved to.",
                    "enum": [
                      "Handover"
                    ],
                    "type": "string"
                  }
                ]
              },
              "profile_mode": {
                "description": "Operational policy for stock whose serial capture is not complete yet.\n\nStored as VARCHAR so the profile remains an application-level policy and can evolve without a PostgreSQL enum migration.",
                "oneOf": [
                  {
                    "description": "Every inventory movement requires a fully committed serial register.",
                    "enum": [
                      "Strict"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Capture may be deferred; only an unchanged full LPN may move while an episode follows that LPN atomically.",
                    "enum": [
                      "Flexible"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Serial tracking is disabled for movement-policy purposes.",
                    "enum": [
                      "NotTracked"
                    ],
                    "type": "string"
                  }
                ]
              },
              "require_unique_global": {
                "type": "boolean"
              },
              "serial_auto_increment": {
                "type": "boolean"
              },
              "serial_format": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_increment_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_increment_source_position": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_length": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_mask_format": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial_parse_frequency": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_parse_mode": {
                "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
                "enum": [
                  "None",
                  "Fixed",
                  "Bounded"
                ],
                "type": "string"
              },
              "serial_parse_start_after": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_parse_start_position": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "serial_scope": {
                "description": "Supported serial granularity at the public API boundary.",
                "enum": [
                  "PerUnit",
                  "PerCase",
                  "PerPallet",
                  "PerInnerPack"
                ],
                "type": "string"
              },
              "serials_per_barcode": {
                "format": "int32",
                "type": "integer"
              },
              "warranty_period_days": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "SkuSerialConfigUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SerialParseMode": {
              "description": "Per Decisions Log D-32. How serial is extracted from a scanned barcode.",
              "enum": [
                "None",
                "Fixed",
                "Bounded"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_asn_pre_advised": {
              "type": "boolean"
            },
            "allow_deferred_capture": {
              "description": "Explicit permission to receive inventory before serial capture is complete. Deliberately separate from `allow_receive_capture`, which merely enables capture at the receive checkpoint.",
              "type": "boolean"
            },
            "allow_receive_capture": {
              "type": "boolean"
            },
            "anomaly_block_severity": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "anomaly_max_per_lpn": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "anomaly_velocity_threshold_min": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "anomaly_vendor_surge_factor": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "check_digit_algorithm": {
              "type": [
                "string",
                "null"
              ]
            },
            "continuous_serial_tracking": {
              "description": "Master flag. If false — other fields ignored.",
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "industry_profile": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "multi_serial_delimiter": {
              "type": [
                "string",
                "null"
              ]
            },
            "multi_serial_fixed_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "pick_episode_reassignment_mode": {
              "description": "Behaviour when a different operator resumes a Pick with an unfinished serial episode.",
              "type": "string"
            },
            "profile_mode": {
              "description": "Movement/capture coupling policy (ADR-090).",
              "type": "string"
            },
            "require_unique_global": {
              "type": "boolean"
            },
            "serial_auto_increment": {
              "type": "boolean"
            },
            "serial_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_increment_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_increment_source_position": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_length": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_mask_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_parse_frequency": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_parse_mode": {
              "$ref": "#/definitions/SerialParseMode"
            },
            "serial_parse_start_after": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_parse_start_position": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "serial_scope": {
              "description": "Migration 153 — serial granularity. Tells receive_against_asn / capture_serial how to compute `serials_to_collect_qty` from the operator's submitted qty: - `PerUnit`      → 1 serial per atomic EA (qty_base from pack hierarchy) - `PerCase`      → 1 serial per submitted UOM (typical SSCC) - `PerPallet`    → 1 serial per pack_item.uom='PL' tier - `PerInnerPack` → 1 serial per pack_item.uom='IP' tier Default `PerUnit`. Stored as VARCHAR with CHECK constraint.",
              "type": "string"
            },
            "serials_per_barcode": {
              "format": "int32",
              "type": "integer"
            },
            "sku_id": {
              "format": "int64",
              "type": "integer"
            },
            "warranty_period_days": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_asn_pre_advised",
            "allow_deferred_capture",
            "allow_receive_capture",
            "continuous_serial_tracking",
            "id",
            "mod_when",
            "mod_who",
            "pick_episode_reassignment_mode",
            "profile_mode",
            "require_unique_global",
            "serial_auto_increment",
            "serial_parse_mode",
            "serial_scope",
            "serials_per_barcode",
            "sku_id"
          ],
          "title": "SkuSerialConfig",
          "type": "object"
        }
      },
      "summary": "Update serial-tracking settings without changing their SKU identity.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_serial_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e11916dfc57f0c12e2fdb48271962bcefac25f96c6dad510c30c4cfbf22f25bf",
      "x-quark-response-schema-hash": "sha256:0e43630b345b07056d9158c0b4adb274c48a8eb72762a5e760765340a9b30899",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_sku_serial_config",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count sku_serial_config — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "sku_serial_config",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_inventory_balance_serial",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SerialCaptureMethod": {
              "oneOf": [
                {
                  "description": "Vendor pre-advised in ASN.",
                  "enum": [
                    "Asn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Operator scanned at receive.",
                  "enum": [
                    "Receive"
                  ],
                  "type": "string"
                },
                {
                  "description": "Pre-applied by manufacturer (Phase 5+).",
                  "enum": [
                    "Manufacturer"
                  ],
                  "type": "string"
                },
                {
                  "description": "Manually entered by admin.",
                  "enum": [
                    "Manual"
                  ],
                  "type": "string"
                }
              ]
            },
            "SerialStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Reserved",
                    "Picked",
                    "Shipped",
                    "Returned",
                    "Damaged",
                    "Disposed",
                    "Held"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Exists for DB compatibility only.** `serial_status` has had this label since the serial spec's phase 1 (`PackSerial`, `Picked → Packed → Shipped`), but the command and its transitions never landed. Without the variant a row carrying it would not decode, and every `SELECT *` over `inventory_balances_serial` would fail.\n\nPacking MUST NOT write this status: the FSM has no transition into or out of it, and `contract-tests::packed_serial_status` keeps every other file from naming it. A packed serial's place is its container (post-pick spec D-51); serial-aware packing is a later decision.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "A count expected it here and did not find it (count spec Appendix K): not in the warehouse, no location. A later count that finds it brings it back to `Active`.",
                  "enum": [
                    "Missing"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "anomaly_flags": true,
            "capture_method": {
              "$ref": "#/definitions/SerialCaptureMethod"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "customer_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "damage_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "disposal_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "disposed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "has_planned_line": {
              "type": "boolean"
            },
            "hold_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_moved_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_moved_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "location": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "picked_via": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "previous_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SerialStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "received_at": {
              "type": "string"
            },
            "received_by": {
              "format": "int64",
              "type": "integer"
            },
            "received_via": {
              "description": "`receipt_detail.id` of the line that captured it; `None` for a serial a count registered (`registered_via_count`).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "registered_via_adjustment": {
              "description": "The adjustment that registered one (adjustment spec Appendix D).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "registered_via_count": {
              "description": "The count task that registered a serial no receipt brought (count spec Appendix K).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reserved_for": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "return_via": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "returned_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "serial_format": {
              "type": [
                "string",
                "null"
              ]
            },
            "serial_number": {
              "type": "string"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "shipped_via": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/SerialStatus"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "capture_method",
            "has_planned_line",
            "id",
            "mod_when",
            "mod_who",
            "owner_id",
            "received_at",
            "received_by",
            "serial_number",
            "sku_code",
            "status"
          ],
          "title": "InventoryBalanceSerial",
          "type": "object"
        }
      },
      "summary": "Get a inventory_balance_serial by ID — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_balance_serial",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:3edc006f7a95e36c92074d23494a2af3bb16fdfec01720a6b6c463286dc66723",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_serial",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryBalanceSerial": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "anomaly_flags": true,
                "capture_method": {
                  "$ref": "#/definitions/SerialCaptureMethod"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "customer_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "damage_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "disposal_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "disposed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "has_planned_line": {
                  "type": "boolean"
                },
                "hold_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_moved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_moved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "picked_via": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "previous_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/SerialStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "received_at": {
                  "type": "string"
                },
                "received_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "received_via": {
                  "description": "`receipt_detail.id` of the line that captured it; `None` for a serial a count registered (`registered_via_count`).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "registered_via_adjustment": {
                  "description": "The adjustment that registered one (adjustment spec Appendix D).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "registered_via_count": {
                  "description": "The count task that registered a serial no receipt brought (count spec Appendix K).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reserved_for": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "return_via": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "returned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_format": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_number": {
                  "type": "string"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "shipped_via": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/SerialStatus"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "capture_method",
                "has_planned_line",
                "id",
                "mod_when",
                "mod_who",
                "owner_id",
                "received_at",
                "received_by",
                "serial_number",
                "sku_code",
                "status"
              ],
              "type": "object"
            },
            "SerialCaptureMethod": {
              "oneOf": [
                {
                  "description": "Vendor pre-advised in ASN.",
                  "enum": [
                    "Asn"
                  ],
                  "type": "string"
                },
                {
                  "description": "Operator scanned at receive.",
                  "enum": [
                    "Receive"
                  ],
                  "type": "string"
                },
                {
                  "description": "Pre-applied by manufacturer (Phase 5+).",
                  "enum": [
                    "Manufacturer"
                  ],
                  "type": "string"
                },
                {
                  "description": "Manually entered by admin.",
                  "enum": [
                    "Manual"
                  ],
                  "type": "string"
                }
              ]
            },
            "SerialStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Reserved",
                    "Picked",
                    "Shipped",
                    "Returned",
                    "Damaged",
                    "Disposed",
                    "Held"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Exists for DB compatibility only.** `serial_status` has had this label since the serial spec's phase 1 (`PackSerial`, `Picked → Packed → Shipped`), but the command and its transitions never landed. Without the variant a row carrying it would not decode, and every `SELECT *` over `inventory_balances_serial` would fail.\n\nPacking MUST NOT write this status: the FSM has no transition into or out of it, and `contract-tests::packed_serial_status` keeps every other file from naming it. A packed serial's place is its container (post-pick spec D-51); serial-aware packing is a later decision.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "A count expected it here and did not find it (count spec Appendix K): not in the warehouse, no location. A later count that finds it brings it back to `Active`.",
                  "enum": [
                    "Missing"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceSerial"
          },
          "title": "Array_of_InventoryBalanceSerial",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_serial — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_balance_serial",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:92883db30e1330dbdd47500841d048ff51964b3fac3030bd9112d4aed6f0b1ee",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance_serial",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance_serial — CRUD.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_balance_serial",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "handling_unit_register",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AssetOwnerKind": {
                "description": "Whose property the new units are. Flat on the wire (a kind plus an optional `owner_id`) because the web modal can only send scalars; the combination is checked by [`RegisterHandlingUnits::asset_owner_choice`].",
                "oneOf": [
                  {
                    "description": "The warehouse that registers them.",
                    "enum": [
                      "ThisWarehouse"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A client of the warehouse, named by `owner_id`.",
                    "enum": [
                      "Owner"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "asset_owner_kind": {
                "$ref": "#/definitions/AssetOwnerKind"
              },
              "count": {
                "format": "uint32",
                "minimum": 0.0,
                "type": "integer"
              },
              "handling_unit_type_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "owner_id": {
                "default": null,
                "description": "Required with `Owner`, refused with `ThisWarehouse`.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "print": {
                "default": false,
                "type": "boolean"
              },
              "printer_id": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "asset_owner_kind",
              "count",
              "handling_unit_type_id",
              "idempotency_key",
              "location"
            ],
            "title": "RegisterHandlingUnits",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RegisteredHandlingUnit": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "container_id"
              ],
              "type": "object"
            }
          },
          "properties": {
            "containers": {
              "items": {
                "$ref": "#/definitions/RegisteredHandlingUnit"
              },
              "type": "array"
            },
            "handling_unit_type_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "containers",
            "handling_unit_type_id"
          ],
          "title": "RegisterHandlingUnitsResult",
          "type": "object"
        }
      },
      "summary": "Register N handling units of one type at a location and print their labels once.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "handling_unit",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fefd15bea9b098a963fd4c7cf19f3265156e6e4076d4b1468100bc2879b239f4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7620f1caedb6d25053f4d08723e0a622ffc8ed5d52c63250924e2a98d6186b23",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_handling_unit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Container": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "asset_owner_id": {
                  "description": "Владелец имущества — клиент склада (`owners`).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "asset_warehouse_id": {
                  "description": "Владелец имущества — склад предприятия. Ровно одно из двух с `asset_owner_id` (ck_container_asset_owner_is_one).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cartonization_policy_detail_id": {
                  "description": "Строка политики картонизации, по которой создана эта коробка.\n\n`None` — тара родилась не из картонизации, ЛИБО той строки политики больше нет: ссылка обнуляется вместе с кандидатом, потому что запрет удалять кандидата из-за прошлогодней отгрузки — не та цена.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "container_type": {
                  "$ref": "#/definitions/ContainerType"
                },
                "current_loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "disposable": {
                  "type": "boolean"
                },
                "handling_unit_type_id": {
                  "description": "Тип тары, если контейнер — её экземпляр (enterprise.handling_unit_type; ссылку держит сервис регистрации, FK в enterprise нет).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_reusable": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "origin": {
                  "$ref": "#/definitions/ContainerOrigin"
                },
                "origin_context_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "parent_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "planned_at_receipt_id": {
                  "description": "ADR-046 — non-NULL when this container was minted by `CreateCaseLevelAsn` ahead of physical arrival (planned case or planned pallet); NULL for the dominant post-receive creation path. Populated from migration 128.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sscc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/ContainerStatus"
                },
                "usage_policy_override": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/HandlingUnitUsagePolicy"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Исключение из `default_usage_policy` типа для этого экземпляра."
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "container_type",
                "disposable",
                "id",
                "is_reusable",
                "mod_when",
                "mod_who",
                "origin",
                "owner_id",
                "status"
              ],
              "type": "object"
            },
            "ContainerOrigin": {
              "oneOf": [
                {
                  "enum": [
                    "Receipt",
                    "Manual",
                    "Production",
                    "System"
                  ],
                  "type": "string"
                },
                {
                  "description": "The container arrived from another facility of the same company.",
                  "enum": [
                    "InterFacilityTransfer"
                  ],
                  "type": "string"
                },
                {
                  "description": "Тару породил план картонизации, а не человек и не приёмка.",
                  "enum": [
                    "Cartonization"
                  ],
                  "type": "string"
                }
              ]
            },
            "ContainerStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Empty",
                    "Disposed",
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.",
                  "enum": [
                    "Planned"
                  ],
                  "type": "string"
                }
              ]
            },
            "ContainerType": {
              "oneOf": [
                {
                  "enum": [
                    "Pallet",
                    "Case",
                    "Tote",
                    "Generic"
                  ],
                  "type": "string"
                },
                {
                  "description": "Коробка отгрузки, созданная картонизацией. Физика берётся не из мастера типов, а из строки политики, по которой её создали (`cartonization_policy_detail_id`).",
                  "enum": [
                    "Carton"
                  ],
                  "type": "string"
                }
              ]
            },
            "HandlingUnitUsagePolicy": {
              "description": "To whom an instance may be handed out by default.",
              "enum": [
                "OwnOnly",
                "WarehouseShared"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Container"
          },
          "title": "Array_of_Container",
          "type": "array"
        }
      },
      "summary": "List registered handling units, filtered like any list (by type, status, location).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "handling_unit",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:a7fdd4e0c0e884a91b483c5726bb72ccc5a0da59b816ead5e690c87c7eddacb4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryAdjustmentTargetMode": {
                "enum": [
                  "Existing",
                  "CreateIfMissing"
                ],
                "type": "string"
              },
              "NewAdjustmentLine": {
                "description": "A line as a client adds it: an identity and what it should hold (§5).",
                "properties": {
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "container_id": {
                    "description": "`None` = loose stock.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "location": {
                    "type": "string"
                  },
                  "lot": {
                    "type": "string"
                  },
                  "owner_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "pack_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "reason_code": {
                    "description": "`None` = the document's reason.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serials_in": {
                    "default": [],
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "serials_out": {
                    "default": [],
                    "description": "A serial-tracked SKU's serials to write off and to add (Appendix D); then the server works out the target. Empty for any other SKU.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "sku_code": {
                    "type": "string"
                  },
                  "target_mode": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                      }
                    ],
                    "default": "Existing",
                    "description": "EXISTING unless the line is stock the system does not have (§6, A.1)."
                  },
                  "target_qty": {
                    "format": "double",
                    "type": "number"
                  },
                  "uom": {
                    "type": "string"
                  }
                },
                "required": [
                  "location",
                  "lot",
                  "owner_id",
                  "pack_id",
                  "sku_code",
                  "target_qty",
                  "uom"
                ],
                "type": "object"
              }
            },
            "properties": {
              "adjustment_number": {
                "default": null,
                "description": "The number the new form already showed (its counter ran at New, as for receipts and orders); `None` = take the next one now.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "lines": {
                "default": [],
                "items": {
                  "$ref": "#/definitions/NewAdjustmentLine"
                },
                "type": "array"
              },
              "reason_code": {
                "type": "string"
              },
              "source_type": {
                "description": "`Manual` (default) or `Import`.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "reason_code"
            ],
            "title": "CreateInventoryAdjustment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Create a Draft inventory adjustment, optionally with its lines.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:08aaa64b6c30cf338f8a0e6b610390ea1dae5dd9f3168e1446700291af3043d6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_add_lines",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryAdjustmentTargetMode": {
                "enum": [
                  "Existing",
                  "CreateIfMissing"
                ],
                "type": "string"
              },
              "NewAdjustmentLine": {
                "description": "A line as a client adds it: an identity and what it should hold (§5).",
                "properties": {
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "container_id": {
                    "description": "`None` = loose stock.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "location": {
                    "type": "string"
                  },
                  "lot": {
                    "type": "string"
                  },
                  "owner_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "pack_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "reason_code": {
                    "description": "`None` = the document's reason.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serials_in": {
                    "default": [],
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "serials_out": {
                    "default": [],
                    "description": "A serial-tracked SKU's serials to write off and to add (Appendix D); then the server works out the target. Empty for any other SKU.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "sku_code": {
                    "type": "string"
                  },
                  "target_mode": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                      }
                    ],
                    "default": "Existing",
                    "description": "EXISTING unless the line is stock the system does not have (§6, A.1)."
                  },
                  "target_qty": {
                    "format": "double",
                    "type": "number"
                  },
                  "uom": {
                    "type": "string"
                  }
                },
                "required": [
                  "location",
                  "lot",
                  "owner_id",
                  "pack_id",
                  "sku_code",
                  "target_qty",
                  "uom"
                ],
                "type": "object"
              }
            },
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "lines": {
                "items": {
                  "$ref": "#/definitions/NewAdjustmentLine"
                },
                "type": "array"
              }
            },
            "required": [
              "adjustment_id",
              "lines"
            ],
            "title": "AddInventoryAdjustmentLines",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Add lines (identity + target quantity) to an unposted adjustment.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1f5ea455ca0aad1b894ce924785268d4c692b33f59ffa66c4f43a82a56768feb",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_add_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "container_code": {
                "description": "The container's code (LPN); empty = loose stock.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "lot": {
                "type": "string"
              },
              "owner_code": {
                "description": "The owner by its code — picked from the list or typed.",
                "type": "string"
              },
              "pack_id": {
                "description": "Empty = the SKU's pack.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serials_in": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "serials_out": {
                "default": null,
                "description": "A serial-tracked SKU's serials to write off and to add, as typed or scanned: one a line (Appendix D). Then the target follows from them.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              },
              "target_qty": {
                "format": "double",
                "type": "number"
              },
              "uom": {
                "description": "Empty = the SKU's default unit.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "adjustment_id",
              "location",
              "lot",
              "owner_code",
              "sku_code",
              "target_qty"
            ],
            "title": "AddInventoryAdjustmentLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Add one line from flat fields (container by code; pack and unit default to the SKU's).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c13bde02cbf4e011ab5e92b76d40e1d8e239201b921bc69368a1021290a1d370",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_generate_lines",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_code": {
                "description": "The owner by its code.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zone": {
                "description": "The location's put-away zone.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "adjustment_id"
            ],
            "title": "GenerateInventoryAdjustmentLines",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Add a line, target = current quantity, for every stock row a filter names.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f84f9b675175d4658f7845d50335f2101b056153a92c643f515c69121bed62c0",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_update_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason_code": {
                "description": "`None` = the document's reason.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "serials_in": {
                "default": null,
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "serials_out": {
                "default": null,
                "description": "A serial line's serials named again (Appendix D); `None` keeps the ones it names. A serial line's target follows its serials.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "target_qty": {
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "expected_version",
              "line_id",
              "target_qty"
            ],
            "title": "UpdateInventoryAdjustmentLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Change one line's target quantity, reason or comment.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8365ee1680d59e46264f129b284fdfc3110c5e62ca792f84b9a2a4bdf21d6eed",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment_detail",
          "id_field": "line_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_adjustment_remove_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "line_id"
            ],
            "title": "RemoveInventoryAdjustmentLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Remove one line from an unposted adjustment.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7f20ec52dde918e30c1d19e01c6c1479edae8129c2fd11025722a87e4c136947",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment_detail",
          "id_field": "line_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_adjustment_validate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "adjustment_id"
            ],
            "title": "ValidateInventoryAdjustment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Judge every line without changing stock; Validated when all pass.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f0efec300968b8a4e8e70a489203d68ea70c9362b1918a06abf69777a2f2a24d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_post",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "override_grant_id": {
                "default": null,
                "description": "A shift lead's grant (`supervisor_override_grant`) authorising this posting into a location an open Hard count is counting (owner's decision 2026-10-21 §6). The SAME single-use grant the move and the receipt doors redeem — not a second mechanism. Absent on an ordinary posting, and absent when the count's own accept posts.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "adjustment_id",
              "expected_version"
            ],
            "title": "PostInventoryAdjustment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Post the adjustment: set every line's stock to its target, all or nothing. Refused while an open Hard inventory count is counting any line's location (LOCATION_BEING_COUNTED); context.pairs names the pair a shift lead's supervisor_override_grant must carry, and its id goes in override_grant_id. A count's own variance adjustment needs none.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:06b3a7fab6195c191c5339e79b02f0387cfd0ae7ba39cf5a29e3a64c9a4e833f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment",
          "id_field": "adjustment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_adjustment_reverse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "description": "The posted document to reverse.",
                "format": "int64",
                "type": "integer"
              },
              "comment": {
                "description": "Why it is reversed. Optional here: the reversal's reason requires a comment, so validation refuses the reversal until its header says why — written on the new document's own header form.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "adjustment_id"
            ],
            "title": "ReverseInventoryAdjustment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Make a Draft that sets a posted adjustment's stock back (target = ledger before).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:34877cfd8db34f627bcac410ab409b7db170b0977caff705b351c3ce75277c69",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "adjustment_id",
              "expected_version"
            ],
            "title": "DeleteInventoryAdjustment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What was removed, for the answer.",
          "properties": {
            "adjustment_number": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "adjustment_number",
            "id"
          ],
          "title": "DeletedInventoryAdjustment",
          "type": "object"
        }
      },
      "summary": "Delete an adjustment that was never posted, with its lines.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f0633d81f6ad09cf4b90ad6a0780012e723371a2dee77bdd2080eed08b34e1b6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b31b4e086c0fe2f63874fc0eb0852c6de7c480184a30fc63bb7dbac52b701232",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment",
          "id_field": "adjustment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_inventory_adjustment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What the header form sends on create.",
            "properties": {
              "adjustment_number": {
                "default": null,
                "description": "What the new form showed: `generic_new` drew it from the counter.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason_code": {
                "type": "string"
              }
            },
            "required": [
              "reason_code"
            ],
            "title": "HeaderFormNew",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "The document's header flat, with whether it needs approval — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "adjustment_number": {
              "type": "string"
            },
            "approved_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "approved_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lines_editable": {
              "description": "Whether lines may be added, changed or removed now — not posted, and not a reversal, whose lines are the original's set back.",
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "needs_approval": {
              "type": "boolean"
            },
            "postable": {
              "description": "Whether Post would be accepted now (validated, and approved when a reason asks) — the command's own rule, so Post greys exactly when the server would refuse it.",
              "type": "boolean"
            },
            "posted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "posted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reason_code": {
              "type": "string"
            },
            "reversal_of_adjustment_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reversal_of_number": {
              "description": "The document this one reverses, by number (the audit link, §18).",
              "type": [
                "string",
                "null"
              ]
            },
            "reversed_by_number": {
              "description": "The document that reverses this one, by number.",
              "type": [
                "string",
                "null"
              ]
            },
            "reversible": {
              "description": "Whether Reverse would be accepted now — the same rule the command applies, so the screen greys the button exactly when the server would refuse it.",
              "type": "boolean"
            },
            "source_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "source_type": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryAdjustmentStatus"
            },
            "validatable": {
              "description": "Whether Validate would be accepted now — a Draft or a Validated document; an approved one keeps its approval.",
              "type": "boolean"
            },
            "validated_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "validated_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "adjustment_number",
            "id",
            "lines_editable",
            "mod_when",
            "mod_who",
            "needs_approval",
            "postable",
            "reason_code",
            "reversible",
            "source_type",
            "status",
            "validatable",
            "version"
          ],
          "title": "InventoryAdjustmentCard",
          "type": "object"
        }
      },
      "summary": "Create a Draft inventory adjustment from its header form (reason, comment).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:081aa6575ab1f220107cc692043accbf93f9c9e1ad83bda57d07a577472c3dc7",
      "x-quark-response-schema-hash": "sha256:5c341167611801e1e031e4646b8dba06c394f13a561183d6a01c2100581c76ea",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_inventory_adjustment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What the header form sends on save: only what changed.",
                "properties": {
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reason_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "title": "HeaderFormChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "The document's header flat, with whether it needs approval — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "adjustment_number": {
              "type": "string"
            },
            "approved_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "approved_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lines_editable": {
              "description": "Whether lines may be added, changed or removed now — not posted, and not a reversal, whose lines are the original's set back.",
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "needs_approval": {
              "type": "boolean"
            },
            "postable": {
              "description": "Whether Post would be accepted now (validated, and approved when a reason asks) — the command's own rule, so Post greys exactly when the server would refuse it.",
              "type": "boolean"
            },
            "posted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "posted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reason_code": {
              "type": "string"
            },
            "reversal_of_adjustment_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reversal_of_number": {
              "description": "The document this one reverses, by number (the audit link, §18).",
              "type": [
                "string",
                "null"
              ]
            },
            "reversed_by_number": {
              "description": "The document that reverses this one, by number.",
              "type": [
                "string",
                "null"
              ]
            },
            "reversible": {
              "description": "Whether Reverse would be accepted now — the same rule the command applies, so the screen greys the button exactly when the server would refuse it.",
              "type": "boolean"
            },
            "source_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "source_type": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryAdjustmentStatus"
            },
            "validatable": {
              "description": "Whether Validate would be accepted now — a Draft or a Validated document; an approved one keeps its approval.",
              "type": "boolean"
            },
            "validated_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "validated_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "adjustment_number",
            "id",
            "lines_editable",
            "mod_when",
            "mod_who",
            "needs_approval",
            "postable",
            "reason_code",
            "reversible",
            "source_type",
            "status",
            "validatable",
            "version"
          ],
          "title": "InventoryAdjustmentCard",
          "type": "object"
        }
      },
      "summary": "Save an adjustment's header form: reason and comment, on the version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:411cad23f1046b15730c74d700a028fc06922c067815b38c16ef08b5be7cd0bd",
      "x-quark-response-schema-hash": "sha256:5c341167611801e1e031e4646b8dba06c394f13a561183d6a01c2100581c76ea",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_inventory_adjustment_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What the line form sends on create. The document comes from the parent record (`generic_new`'s parent FK); owner, SKU, lot, location and container are picked or typed.",
            "properties": {
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "container_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inventory_adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "location": {
                "type": "string"
              },
              "lot": {
                "type": "string"
              },
              "owner_code": {
                "type": "string"
              },
              "reason_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "serials_in": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "serials_out": {
                "default": null,
                "description": "Serials to write off and to add, one a line.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              },
              "target_qty": {
                "default": null,
                "description": "Required, except on a line that names serials: its target follows from them (Appendix D).",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "inventory_adjustment_id",
              "location",
              "lot",
              "owner_code",
              "sku_code"
            ],
            "title": "LineFormNew",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A line as its form shows it: the line flat, with the owner and the container by code — what the pickers hold.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "error_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "error_message": {
              "type": [
                "string",
                "null"
              ]
            },
            "error_spoken": {
              "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
            },
            "expected_qty": {
              "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_adjustment_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "lot": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "serials_in": {
              "type": [
                "string",
                "null"
              ]
            },
            "serials_out": {
              "description": "The serials the line writes off and adds, one a line (Appendix D).",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryAdjustmentLineStatus"
            },
            "target_mode": {
              "$ref": "#/definitions/InventoryAdjustmentTargetMode"
            },
            "target_qty": {
              "format": "double",
              "type": "number"
            },
            "transaction_log_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "inventory_adjustment_id",
            "line_no",
            "location",
            "lot",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "status",
            "target_mode",
            "target_qty",
            "uom",
            "version"
          ],
          "title": "AdjustmentLineCard",
          "type": "object"
        }
      },
      "summary": "Add a line from the line form: owner, SKU, lot, location, container picked or typed.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d9ea9d180c8a24cc038e0ff240da33acfe854b307c9ae599dcf646e01dad7ce4",
      "x-quark-response-schema-hash": "sha256:a7501146b6765017ec286712b99a695b48b856ef7e17185d241681183e75ebc7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_inventory_adjustment_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What the line form sends on save: only what changed. The identity never changes (§5.2).",
                "properties": {
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reason_code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serials_in": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "serials_out": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "target_qty": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "title": "LineFormChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A line as its form shows it: the line flat, with the owner and the container by code — what the pickers hold.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "error_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "error_message": {
              "type": [
                "string",
                "null"
              ]
            },
            "error_spoken": {
              "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
            },
            "expected_qty": {
              "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_adjustment_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "lot": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "serials_in": {
              "type": [
                "string",
                "null"
              ]
            },
            "serials_out": {
              "description": "The serials the line writes off and adds, one a line (Appendix D).",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryAdjustmentLineStatus"
            },
            "target_mode": {
              "$ref": "#/definitions/InventoryAdjustmentTargetMode"
            },
            "target_qty": {
              "format": "double",
              "type": "number"
            },
            "transaction_log_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "inventory_adjustment_id",
            "line_no",
            "location",
            "lot",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "status",
            "target_mode",
            "target_qty",
            "uom",
            "version"
          ],
          "title": "AdjustmentLineCard",
          "type": "object"
        }
      },
      "summary": "Save a line form: target, reason, comment, on the line's version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9b64fa04ffe0bfe19a74eb6acec6bfa27a48583fdce38fd96939cff4f77c131e",
      "x-quark-response-schema-hash": "sha256:a7501146b6765017ec286712b99a695b48b856ef7e17185d241681183e75ebc7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment_detail",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_adjustment_approve",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "adjustment_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "adjustment_id",
              "expected_version"
            ],
            "title": "ApproveInventoryAdjustment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Approve a validated adjustment whose reason requires approval.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:553e6ef6a3fc2f7b07f46fbf5322dd05cd22256445581477afed35ab0c89367a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_adjustment",
          "id_field": "adjustment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_adjust_reason_set_count",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "count_after_post": {
                "type": "boolean"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "reason_code": {
                "type": "string"
              }
            },
            "required": [
              "count_after_post",
              "reason_code"
            ],
            "title": "SetReasonCountAfterPost",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "count_after_post": {
              "type": "boolean"
            },
            "reason_code": {
              "type": "string"
            }
          },
          "required": [
            "count_after_post",
            "reason_code"
          ],
          "title": "ReasonCountAfterPostSet",
          "type": "object"
        }
      },
      "summary": "Set whether posting an adjustment with this reason counts the locations it changed.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a57ebaddc961fdc9e8701dce2966068c84a431da704728cf5d59d25ae393c66d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fd7027e8f86484c216e5e198549a7f523b01de1923d47f4742141160771be941",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "has_invalid_lines": {
              "description": "Whether any line was judged Invalid — a validation that refused. The command went through and the document is Draft; the screen shows the [`summary`] as a warning, not as a success.",
              "type": "boolean"
            },
            "header": {
              "$ref": "#/definitions/InventoryAdjustment"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/InventoryAdjustmentDetail"
              },
              "type": "array"
            },
            "needs_approval": {
              "description": "Whether a reason the document uses asks for approval before posting.",
              "type": "boolean"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command. A refused validation names the lines and why ([`summary`]).",
              "type": "string"
            }
          },
          "required": [
            "has_invalid_lines",
            "header",
            "lines",
            "needs_approval",
            "summary"
          ],
          "title": "InventoryAdjustmentView",
          "type": "object"
        }
      },
      "summary": "Get one inventory adjustment with its lines.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:76d06c781f9b766c0f5793a6806a23c42895e1f8b611656cfd2205adfbe4569a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_number": {
                  "type": "string"
                },
                "approved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approved_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": "string"
                },
                "reversal_of_adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentStatus"
                },
                "validated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "validated_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "adjustment_number",
                "id",
                "mod_when",
                "mod_who",
                "reason_code",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryAdjustment"
          },
          "title": "Array_of_InventoryAdjustment",
          "type": "array"
        }
      },
      "summary": "List inventory adjustments, filtered like any list (by status, reason, number).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:39cb1264d2a09e2a7776870e952fa5c41c6994d29c708a8ccb42bfae9e36400f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_list_lines",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_spoken": {
                  "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
                },
                "expected_qty": {
                  "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryAdjustmentDetail"
          },
          "title": "Array_of_InventoryAdjustmentDetail",
          "type": "array"
        }
      },
      "summary": "List adjustment lines, filtered like any list (by adjustment, status, SKU).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9e7215fe9c90e2da8c4c21002d7adf0a3e1c8317146f75d040343570c6d6f6d2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_card_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentStatus": {
              "enum": [
                "Draft",
                "Validated",
                "Approved",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "The document's header flat, with whether it needs approval — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "adjustment_number": {
              "type": "string"
            },
            "approved_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "approved_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lines_editable": {
              "description": "Whether lines may be added, changed or removed now — not posted, and not a reversal, whose lines are the original's set back.",
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "needs_approval": {
              "type": "boolean"
            },
            "postable": {
              "description": "Whether Post would be accepted now (validated, and approved when a reason asks) — the command's own rule, so Post greys exactly when the server would refuse it.",
              "type": "boolean"
            },
            "posted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "posted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reason_code": {
              "type": "string"
            },
            "reversal_of_adjustment_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "reversal_of_number": {
              "description": "The document this one reverses, by number (the audit link, §18).",
              "type": [
                "string",
                "null"
              ]
            },
            "reversed_by_number": {
              "description": "The document that reverses this one, by number.",
              "type": [
                "string",
                "null"
              ]
            },
            "reversible": {
              "description": "Whether Reverse would be accepted now — the same rule the command applies, so the screen greys the button exactly when the server would refuse it.",
              "type": "boolean"
            },
            "source_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "source_type": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryAdjustmentStatus"
            },
            "validatable": {
              "description": "Whether Validate would be accepted now — a Draft or a Validated document; an approved one keeps its approval.",
              "type": "boolean"
            },
            "validated_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "validated_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "adjustment_number",
            "id",
            "lines_editable",
            "mod_when",
            "mod_who",
            "needs_approval",
            "postable",
            "reason_code",
            "reversible",
            "source_type",
            "status",
            "validatable",
            "version"
          ],
          "title": "InventoryAdjustmentCard",
          "type": "object"
        }
      },
      "summary": "Get one inventory adjustment's header, flat, with whether it needs approval.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5c341167611801e1e031e4646b8dba06c394f13a561183d6a01c2100581c76ea",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjustment_line_preview_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AdjustmentLinePreview": {
              "description": "A line as the grid shows it (§23). Before POST: CURRENT and EFFECT are a live forecast — the same rules POST applies, read without locks — and a line that would be refused says why. After POST: BEFORE / DELTA / AFTER are what the ledger recorded.",
              "properties": {
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "current_qty": {
                  "description": "Live: the identity's quantity now (0 when it has no row). `None` when the forecast refuses the line, or once the document is posted.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "effect_qty": {
                  "description": "Live: TARGET − CURRENT.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "forecast_code": {
                  "description": "Live: why POST would refuse this line now; `None` if it would not.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "forecast_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_adjustment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "owner_code": {
                  "description": "The owner and the container by code, as the operator names them.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty_after": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_before": {
                  "description": "Posted: what the ledger recorded (NoChange: before = after = target).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_delta": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryAdjustmentLineStatus"
                },
                "target_mode": {
                  "$ref": "#/definitions/InventoryAdjustmentTargetMode"
                },
                "target_qty": {
                  "format": "double",
                  "type": "number"
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "inventory_adjustment_id",
                "line_no",
                "location",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "status",
                "target_mode",
                "target_qty",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/AdjustmentLinePreview"
          },
          "title": "Array_of_AdjustmentLinePreview",
          "type": "array"
        }
      },
      "summary": "List adjustment lines with the live current/effect forecast or the posted effect.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:99a4a7d841a3aad0e9a3b3816d691f33122aef3e800734d5128b2b3d543b4708",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_inventory_adjustment_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryAdjustmentLineStatus": {
              "enum": [
                "Pending",
                "Valid",
                "Invalid",
                "Posted",
                "NoChange"
              ],
              "type": "string"
            },
            "InventoryAdjustmentTargetMode": {
              "enum": [
                "Existing",
                "CreateIfMissing"
              ],
              "type": "string"
            }
          },
          "description": "A line as its form shows it: the line flat, with the owner and the container by code — what the pickers hold.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "error_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "error_message": {
              "type": [
                "string",
                "null"
              ]
            },
            "error_spoken": {
              "description": "The same refusal as `{template, args}` (wms-app 107), said in the reader's language when the line is read."
            },
            "expected_qty": {
              "description": "What the identity held when the stock was observed — set only by an inventory count (wms-app 056). POST refuses the line when the stock no longer holds it: the observation is about THAT stock, and applying its target over later movements would erase them.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_adjustment_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "lot": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "serials_in": {
              "type": [
                "string",
                "null"
              ]
            },
            "serials_out": {
              "description": "The serials the line writes off and adds, one a line (Appendix D).",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryAdjustmentLineStatus"
            },
            "target_mode": {
              "$ref": "#/definitions/InventoryAdjustmentTargetMode"
            },
            "target_qty": {
              "format": "double",
              "type": "number"
            },
            "transaction_log_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "inventory_adjustment_id",
            "line_no",
            "location",
            "lot",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "sku_code",
            "status",
            "target_mode",
            "target_qty",
            "uom",
            "version"
          ],
          "title": "AdjustmentLineCard",
          "type": "object"
        }
      },
      "summary": "Get one adjustment line as its form shows it (owner and container by code).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:a7501146b6765017ec286712b99a695b48b856ef7e17185d241681183e75ebc7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_adjust_reason_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AdjustReasonRow": {
              "description": "One reason with its policy — a row of the settings screen.",
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "allow_negative": {
                  "type": "boolean"
                },
                "allow_positive": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "count_after_post": {
                  "type": "boolean"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "requires_approval": {
                  "type": "boolean"
                },
                "requires_comment": {
                  "type": "boolean"
                }
              },
              "required": [
                "active",
                "allow_negative",
                "allow_positive",
                "code",
                "count_after_post",
                "description",
                "id",
                "requires_approval",
                "requires_comment"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AdjustReasonRow"
          },
          "title": "Array_of_AdjustReasonRow",
          "type": "array"
        }
      },
      "summary": "List the inventory adjustment reasons with their policy, retired ones too (or the one an id names).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_adjustment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:30966f552dd26ea88aadedbce72254cca16d901ef806417159e27ccbcc459d8b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_task_take_next",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "work_area_code": {
                "default": null,
                "description": "The work area scanned; blank or absent — the whole warehouse.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "TakeNextCountLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Give the counter their next location to count: in the work area named, or across the areas they may count in.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:dd8ab15e41ec07b701b62c9ab21d9cd36d9fcabc143da59e40a66d56ae48870e",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_task_at_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "location": {
                "description": "The location scanned.",
                "type": "string"
              }
            },
            "required": [
              "location"
            ],
            "title": "ConfirmCountLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "The counter is at the location given to them: scanning it starts (or resumes) its count.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c5adb1e6f7c1995cd177c140333bad6d10c247c3f9f4c902c117ee09a3e4f448",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_task_leave",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "task_id"
            ],
            "title": "LeaveCountLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The location left, in words.",
          "properties": {
            "location": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "location",
            "message",
            "task_id"
          ],
          "title": "CountLocationLeft",
          "type": "object"
        }
      },
      "summary": "Leave the location being counted for later: it goes back to the pool.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e2509208f12a86eb5f1441c5e36b8f255efb823da075769264e816aaad97e33b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b368bfa2f55ad65e1c77db7de9a3476443246552eff4e10345c5c58e2a6febac",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_observe",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What the counter scanned. A SKU code, a lot and a quantity are enough on the floor: the owner is needed only when several owners stock the code, pack and unit default to the SKU's, a container is named by its LPN.",
            "properties": {
              "container_code": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "container_id": {
                "default": null,
                "description": "The container by id or by code (LPN); both empty = loose stock.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "lot": {
                "type": "string"
              },
              "owner_code": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "default": null,
                "description": "The owner by id or by code; empty = the only owner of the SKU code.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pack_id": {
                "default": null,
                "description": "Empty = the SKU's pack.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "serials": {
                "default": [],
                "description": "The serials scanned — required for a serial-tracked SKU (then `qty` is their number), refused for any other.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "sku_code": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "uom": {
                "default": null,
                "description": "Empty = the SKU's default unit.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lot",
              "qty",
              "sku_code",
              "task_id"
            ],
            "title": "RecordCountObservation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Record stock found in the location being counted (SKU, lot, quantity).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4f190d27d6a12f3cb9fa6c47966c492930703a002de70a1d09e4fcffe7b02f59",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_void_observation",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "observation_id": {
                "format": "int64",
                "type": "integer"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "observation_id",
              "task_id"
            ],
            "title": "VoidCountObservation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Take back one recorded entry of the location being counted.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cdf7f6b65afa63c30c8d553eaec5e2ba825f110edc97420cc723f68780d9564f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_confirm_empty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "task_id"
            ],
            "title": "ConfirmCountLocationEmpty",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Confirm the location being counted holds nothing.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:910fc9bb2ef884ffc29f667535b647f187038a154b9a43588b2aaa13021f69e6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_complete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "task_id"
            ],
            "title": "CompleteCountTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Finish counting a location: compare with its snapshot; close it or leave a variance.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0cbbcba30418f435e22e9fe8e886bbdfe5213202391ac4b9e8e40de95a95eaa4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "location_confirm_empty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "EvidenceSource": {
                "description": "Where the question was asked.",
                "oneOf": [
                  {
                    "description": "After a pick that emptied the location (`pick_to_zero = Confirm`); `source_id` is the pick.",
                    "enum": [
                      "PickCommit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "After a manual move that emptied its source location, when the moved stock's owner asks (`owner_config.confirm_empty_on_move`); `source_id` is the move's first `transaction_log` row.",
                    "enum": [
                      "Move"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator's own report of unexpected stock (Appendix M); no operation asked, `source_id` is empty.",
                    "enum": [
                      "Report"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "empty": {
                "description": "`true` — the operator sees nothing there; `false` — stock is left.",
                "type": "boolean"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "source_id": {
                "default": null,
                "description": "The operation that asked: the pick for `PickCommit`, the move's first `transaction_log` row for `Move`.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "source_type": {
                "$ref": "#/definitions/EvidenceSource"
              }
            },
            "required": [
              "empty",
              "location",
              "source_type"
            ],
            "title": "ConfirmLocationEmpty",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocationEvidenceKind": {
              "oneOf": [
                {
                  "description": "\"Empty\", and the stock holds nothing there.",
                  "enum": [
                    "ConfirmedEmpty"
                  ],
                  "type": "string"
                },
                {
                  "description": "\"Not empty\", while the stock holds nothing there.",
                  "enum": [
                    "DeniedEmpty"
                  ],
                  "type": "string"
                },
                {
                  "description": "\"Empty\", while the stock holds something there.",
                  "enum": [
                    "EmptyAgainstStock"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator reports stock the system does not show there (Appendix M).",
                  "enum": [
                    "UnexpectedStock"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "What the answer amounted to.",
          "properties": {
            "count_requested": {
              "description": "The answer and the stock disagree: the location will be counted.",
              "type": "boolean"
            },
            "evidence_id": {
              "description": "The evidence kept; `None` when the answer said nothing worth keeping (\"not empty\" where the stock holds something).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "kind": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocationEvidenceKind"
                },
                {
                  "type": "null"
                }
              ]
            },
            "location": {
              "type": "string"
            }
          },
          "required": [
            "count_requested",
            "location"
          ],
          "title": "LocationEmptyAnswer",
          "type": "object"
        }
      },
      "summary": "Answer whether a location is empty, where an operation asked: kept as evidence; an answer the stock contradicts asks for a count.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:19cecafda57095dc98e7e671a8bbe42eb8d078045fa57d098ba201ed54a625ea",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9dccd7ece7bad08c9f53aeec25641075e3b314696ee49faab43219d4d9ae4f9e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "location_report_unexpected",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "lpn": {
                "default": null,
                "description": "The LPN the operator sees there, as scanned.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "default": null,
                "description": "Anything else they want to say.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku": {
                "default": null,
                "description": "The SKU the operator sees there.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "location"
            ],
            "title": "ReportUnexpectedStock",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What the report came to.",
          "properties": {
            "count_requested": {
              "description": "Always true: a report always asks for the location to be counted.",
              "type": "boolean"
            },
            "evidence_id": {
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "system_qty": {
              "description": "What the stock held at the location when the report came.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "count_requested",
            "evidence_id",
            "location",
            "system_qty"
          ],
          "title": "UnexpectedStockReport",
          "type": "object"
        }
      },
      "summary": "Report stock the system does not show at a location: kept as evidence, and the location is counted.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4c949bfdfd924c2a5ab1232d835ed3ea768904671f9408fc05ff9d3929ae6495",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:2696586b36a5ba60dcd43e24ec6d7d509dd7ce25525de37e03b7533099139a93",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryCountFreeze": {
                "enum": [
                  "Hard",
                  "Soft"
                ],
                "type": "string"
              },
              "InventoryCountMode": {
                "enum": [
                  "Blind",
                  "Informed"
                ],
                "type": "string"
              }
            },
            "properties": {
              "comment": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "count_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountMode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Blind` (default): the counter does not see the system quantity."
              },
              "count_number": {
                "default": null,
                "description": "The number the new form already showed (its counter ran at New, as for adjustments); `None` = take the next one now.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "freeze_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountFreeze"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Hard` (default): the locations are frozen while they are counted. `Soft`: stock keeps moving; the count expects the snapshot plus what moved after it (count spec Appendix F)."
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "locations": {
                "description": "The locations to count, by code. An entry may name several, separated by commas, semicolons or white space — what a person types into one field of a form.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "max_recounts": {
                "default": null,
                "description": "How many times one location may be recounted (default 2, at most [`MAX_RECOUNTS_CEILING`]; 0 = never).",
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "recount_by_other_counter": {
                "default": null,
                "description": "A recount must be counted by somebody else (default `true`).",
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "locations"
            ],
            "title": "CreateInventoryCount",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCount": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "count_number": {
                  "type": "string"
                },
                "count_type": {
                  "$ref": "#/definitions/InventoryCountType"
                },
                "freeze_mode": {
                  "$ref": "#/definitions/InventoryCountFreeze"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_containers": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "item_lots": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "item_skus": {
                  "description": "The count's item (Appendix G): an empty list is \"not named\".",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "max_recounts": {
                  "description": "How many times one location may be recounted (attempts = 1 + this).",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_by_other_counter": {
                  "type": "boolean"
                },
                "scope_mode": {
                  "$ref": "#/definitions/InventoryCountScope"
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "count_mode",
                "count_number",
                "count_type",
                "freeze_mode",
                "id",
                "item_containers",
                "item_lots",
                "item_skus",
                "max_recounts",
                "mod_when",
                "mod_who",
                "recount_by_other_counter",
                "scope_mode",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "description": "A count with its tasks, as the count-level commands answer.",
          "properties": {
            "header": {
              "$ref": "#/definitions/InventoryCount"
            },
            "summary": {
              "description": "Where the count stands, in words.",
              "type": "string"
            },
            "tasks": {
              "items": {
                "$ref": "#/definitions/InventoryCountTask"
              },
              "type": "array"
            }
          },
          "required": [
            "header",
            "summary",
            "tasks"
          ],
          "title": "InventoryCountView",
          "type": "object"
        }
      },
      "summary": "Start a selective count of locations: freeze them and snapshot their stock.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0f92d8fc878395c9700c6b20ef7629becdf573761d6e141c5a6e8356d76aafc2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:49ff2919f5b660f4ff6cad75fe7c794eb471822c1dba72a098cbba2670f154ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_add_locations",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "count_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "locations": {
                "default": [],
                "description": "Location codes; an entry may name several, separated by commas, semicolons or white space — what a picker of several values sends.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "zones": {
                "default": [],
                "description": "Putaway zones, written the same way: every countable location of each.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "count_id"
            ],
            "title": "AddCountLocations",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What was added, and what was passed over.",
          "properties": {
            "added": {
              "description": "The locations now counted, sorted.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "count_id": {
              "format": "int64",
              "type": "integer"
            },
            "count_number": {
              "type": "string"
            },
            "message": {
              "description": "The outcome, in words.",
              "type": "string"
            },
            "skipped": {
              "description": "Locations of the zones left out (blocked, under another operation or counted elsewhere) and those this count already held, sorted.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "added",
            "count_id",
            "count_number",
            "message",
            "skipped"
          ],
          "title": "CountLocationsAdded",
          "type": "object"
        }
      },
      "summary": "Add locations to an open count — by code, or every countable one of zones: freeze and snapshot them.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2a8eab6507c17bb9aecc6bf37ed615e49711e54a94635c3a0bca45a9d4eefe79",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:1aa1993c113b41fa751282a48b8b624fe52317066b2afe50fb05371499e47994",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_remove_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "task_id"
            ],
            "title": "RemoveCountLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCount": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "count_number": {
                  "type": "string"
                },
                "count_type": {
                  "$ref": "#/definitions/InventoryCountType"
                },
                "freeze_mode": {
                  "$ref": "#/definitions/InventoryCountFreeze"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_containers": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "item_lots": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "item_skus": {
                  "description": "The count's item (Appendix G): an empty list is \"not named\".",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "max_recounts": {
                  "description": "How many times one location may be recounted (attempts = 1 + this).",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_by_other_counter": {
                  "type": "boolean"
                },
                "scope_mode": {
                  "$ref": "#/definitions/InventoryCountScope"
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "count_mode",
                "count_number",
                "count_type",
                "freeze_mode",
                "id",
                "item_containers",
                "item_lots",
                "item_skus",
                "max_recounts",
                "mod_when",
                "mod_who",
                "recount_by_other_counter",
                "scope_mode",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "description": "A count with its tasks, as the count-level commands answer.",
          "properties": {
            "header": {
              "$ref": "#/definitions/InventoryCount"
            },
            "summary": {
              "description": "Where the count stands, in words.",
              "type": "string"
            },
            "tasks": {
              "items": {
                "$ref": "#/definitions/InventoryCountTask"
              },
              "type": "array"
            }
          },
          "required": [
            "header",
            "summary",
            "tasks"
          ],
          "title": "InventoryCountView",
          "type": "object"
        }
      },
      "summary": "Take a location nobody counted off a count; it thaws.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4c7c1ac916d2ff6cf72a40c02c0eb64c7b8f328b8dc7c6a3113405c58fb84808",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:49ff2919f5b660f4ff6cad75fe7c794eb471822c1dba72a098cbba2670f154ff",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_task",
          "id_field": "task_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_count_accept",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "cause_code": {
                "default": null,
                "description": "Why the count differs: a code of the list `count_variance_cause` (ADR-093 D2, required from a person).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "comment": {
                "default": null,
                "description": "What the supervisor adds to the cause.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "task_id"
            ],
            "title": "AcceptCountVariance",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Accept a location's variance with its cause: post an adjustment to what was counted.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5ad9b3a16ce05bf438746b20f2d3ea277a5df46a26bd2a4f194209c5d410f039",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_task",
          "id_field": "task_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_count_recount",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "task_id"
            ],
            "title": "RecountCountTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "Have a location with a variance counted again, as a new attempt.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:be44579fa7447ebd529216fcedd31a425b1f002ea5fb44cd47445ae90c809269",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_task",
          "id_field": "task_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_count_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "count_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "count_id",
              "expected_version"
            ],
            "title": "CancelInventoryCount",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCount": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "count_number": {
                  "type": "string"
                },
                "count_type": {
                  "$ref": "#/definitions/InventoryCountType"
                },
                "freeze_mode": {
                  "$ref": "#/definitions/InventoryCountFreeze"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_containers": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "item_lots": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "item_skus": {
                  "description": "The count's item (Appendix G): an empty list is \"not named\".",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "max_recounts": {
                  "description": "How many times one location may be recounted (attempts = 1 + this).",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_by_other_counter": {
                  "type": "boolean"
                },
                "scope_mode": {
                  "$ref": "#/definitions/InventoryCountScope"
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "count_mode",
                "count_number",
                "count_type",
                "freeze_mode",
                "id",
                "item_containers",
                "item_lots",
                "item_skus",
                "max_recounts",
                "mod_when",
                "mod_who",
                "recount_by_other_counter",
                "scope_mode",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "description": "A count with its tasks, as the count-level commands answer.",
          "properties": {
            "header": {
              "$ref": "#/definitions/InventoryCount"
            },
            "summary": {
              "description": "Where the count stands, in words.",
              "type": "string"
            },
            "tasks": {
              "items": {
                "$ref": "#/definitions/InventoryCountTask"
              },
              "type": "array"
            }
          },
          "required": [
            "header",
            "summary",
            "tasks"
          ],
          "title": "InventoryCountView",
          "type": "object"
        }
      },
      "summary": "Cancel a count: its live locations thaw, nothing is adjusted.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6fcda8ce94f673c637de0a8ff76cf74cd818dbcca842368ab1d210cb38b24bbd",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:49ff2919f5b660f4ff6cad75fe7c794eb471822c1dba72a098cbba2670f154ff",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count",
          "id_field": "count_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_count_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "count_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "count_id",
              "expected_version"
            ],
            "title": "DeleteInventoryCount",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cancelled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "closed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_type": {
              "$ref": "#/definitions/InventoryCountType"
            },
            "freeze_mode": {
              "$ref": "#/definitions/InventoryCountFreeze"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_containers": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "item_lots": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "item_skus": {
              "description": "The count's item (Appendix G): an empty list is \"not named\".",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "max_recounts": {
              "description": "How many times one location may be recounted (attempts = 1 + this).",
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "recount_by_other_counter": {
              "type": "boolean"
            },
            "scope_mode": {
              "$ref": "#/definitions/InventoryCountScope"
            },
            "source_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "source_type": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryCountStatus"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "count_mode",
            "count_number",
            "count_type",
            "freeze_mode",
            "id",
            "item_containers",
            "item_lots",
            "item_skus",
            "max_recounts",
            "mod_when",
            "mod_who",
            "recount_by_other_counter",
            "scope_mode",
            "source_type",
            "status",
            "version"
          ],
          "title": "InventoryCount",
          "type": "object"
        }
      },
      "summary": "Delete a count nothing was counted in; its locations thaw.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:320da54a0e284f88fe3f7cbde7734985ada2d06235b30f00208c5eceda85db50",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a753218ce59a16c61f40034b17b56c684bfa1bb6a232847be13945c65bedb027",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count",
          "id_field": "count_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_inventory_count",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryCountFreeze": {
                "enum": [
                  "Hard",
                  "Soft"
                ],
                "type": "string"
              },
              "InventoryCountMode": {
                "enum": [
                  "Blind",
                  "Informed"
                ],
                "type": "string"
              },
              "InventoryCountScope": {
                "enum": [
                  "LocationFull",
                  "IdentitySubset"
                ],
                "type": "string"
              },
              "InventoryCountType": {
                "enum": [
                  "Full",
                  "Cycle",
                  "Selective",
                  "Event"
                ],
                "type": "string"
              }
            },
            "description": "What the header form sends on save: the count's choices. Its locations are added afterwards, from the list below it (`AddCountLocations`).",
            "properties": {
              "comment": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "count_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountMode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Blind` (default) or `Informed`."
              },
              "count_number": {
                "default": null,
                "description": "What the new form showed: `generic_new` drew it from the counter.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "count_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountType"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Selective` (default) or `Full`."
              },
              "freeze_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountFreeze"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Hard` (default) or `Soft` (count spec Appendix F)."
              },
              "item_lots": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "item_lpns": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "item_skus": {
                "default": null,
                "description": "«Товары», «Партии», «LPN»: what a picker of several values sends — codes separated by commas.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_recounts": {
                "default": null,
                "description": "How many times one location may be recounted; empty = the default.",
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scope_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountScope"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "«Охват»: `LocationFull` (default) or `IdentitySubset` (Appendix G)."
              }
            },
            "title": "CountFormNew",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "description": "A count flat, for a card form (`generic_rpc_form_load`).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "cancelled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "closed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_type": {
              "$ref": "#/definitions/InventoryCountType"
            },
            "freeze_mode": {
              "$ref": "#/definitions/InventoryCountFreeze"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_lots": {
              "type": "string"
            },
            "item_lpns": {
              "type": "string"
            },
            "item_skus": {
              "description": "The count's item, as the header form names it: codes, comma-separated (empty = not named).",
              "type": "string"
            },
            "locations": {
              "description": "The counted locations, sorted, comma-separated.",
              "type": "string"
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "scope_mode": {
              "$ref": "#/definitions/InventoryCountScope"
            },
            "source_type": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryCountStatus"
            },
            "summary": {
              "description": "Where the count stands, in words.",
              "type": "string"
            },
            "tasks_closed": {
              "format": "int32",
              "type": "integer"
            },
            "tasks_open": {
              "format": "int32",
              "type": "integer"
            },
            "tasks_variance": {
              "format": "int32",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "count_mode",
            "count_number",
            "count_type",
            "freeze_mode",
            "id",
            "item_lots",
            "item_lpns",
            "item_skus",
            "locations",
            "max_recounts",
            "scope_mode",
            "source_type",
            "status",
            "summary",
            "tasks_closed",
            "tasks_open",
            "tasks_variance",
            "version"
          ],
          "title": "InventoryCountCard",
          "type": "object"
        }
      },
      "summary": "Open a count from its header form: kind, mode, recounts, a comment — no location yet.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:04dea344da1d7e9618f979ab764abd697dbf67ffb1682f41950cc082de86ee4d",
      "x-quark-response-schema-hash": "sha256:ce7765dca932c386f4176bbd7944030060a356c0e11fc2a55eeba5da49e32292",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_policy_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryCountFreeze": {
                "enum": [
                  "Hard",
                  "Soft"
                ],
                "type": "string"
              },
              "InventoryCountMode": {
                "enum": [
                  "Blind",
                  "Informed"
                ],
                "type": "string"
              },
              "InventoryCountPolicyBasis": {
                "enum": [
                  "Locations",
                  "Items"
                ],
                "type": "string"
              }
            },
            "properties": {
              "abc": {
                "default": null,
                "description": "`A`, `B` or `C`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "aisle": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "basis": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountPolicyBasis"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Locations` (default) or `Items` (count spec Appendix H). Only the chosen basis' properties are part of the policy: the others are dropped."
              },
              "code": {
                "type": "string"
              },
              "count_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountMode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Blind` (default) or `Informed`."
              },
              "daily_limit": {
                "default": null,
                "description": "At most this many locations a run.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "description": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "freeze_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountFreeze"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Hard` (default) or `Soft` (count spec Appendix F)."
              },
              "frequency_days": {
                "default": null,
                "description": "Count a location every this many days.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "is_active": {
                "default": null,
                "description": "Default `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "loc_type": {
                "default": null,
                "description": "A location type as `location.loc_type` spells it (`Case`, `Pick`, …).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_recounts": {
                "default": null,
                "description": "Recounts per location in the counts it makes (default 2).",
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "putawayzone": {
                "default": null,
                "description": "Scope — at least one of the four.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_abc": {
                "default": null,
                "description": "`Items`: the SKUs' ABC class, `A`, `B` or `C`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_group": {
                "default": null,
                "description": "`Items`: the SKUs' group.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "trust_empty_confirmation": {
                "default": null,
                "description": "A location confirmed empty in passing counts as checked (count spec Appendix L.6). Default `false`; a policy over items keeps none.",
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "CreateCountPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": [
                "string",
                "null"
              ]
            },
            "basis": {
              "$ref": "#/definitions/InventoryCountPolicyBasis"
            },
            "code": {
              "type": "string"
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "daily_limit": {
              "format": "int32",
              "type": "integer"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "freeze_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryCountFreeze"
                }
              ],
              "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
            },
            "frequency_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_run_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "loc_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
            },
            "sku_group": {
              "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
              "type": [
                "string",
                "null"
              ]
            },
            "trust_empty_confirmation": {
              "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
              "type": "boolean"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "basis",
            "code",
            "count_mode",
            "daily_limit",
            "freeze_mode",
            "frequency_days",
            "id",
            "is_active",
            "max_recounts",
            "mod_when",
            "mod_who",
            "trust_empty_confirmation",
            "version"
          ],
          "title": "InventoryCountPolicy",
          "type": "object"
        }
      },
      "summary": "Create a cycle-count policy: which locations, how often, how many a run.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5654cabf30241bca1d3ac5f09a42acac83774b1aa544433f8765456afec98ff8",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cc79dd28683e65d45427b259f300e911341e55a7bb8f73308c61d534caebd40d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_policy_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryCountFreeze": {
                "enum": [
                  "Hard",
                  "Soft"
                ],
                "type": "string"
              },
              "InventoryCountMode": {
                "enum": [
                  "Blind",
                  "Informed"
                ],
                "type": "string"
              },
              "InventoryCountPolicyBasis": {
                "enum": [
                  "Locations",
                  "Items"
                ],
                "type": "string"
              }
            },
            "properties": {
              "abc": {
                "default": null,
                "description": "`A`, `B` or `C`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "aisle": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "basis": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountPolicyBasis"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Locations` (default) or `Items` (count spec Appendix H). Only the chosen basis' properties are part of the policy: the others are dropped."
              },
              "code": {
                "type": "string"
              },
              "count_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountMode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Blind` (default) or `Informed`."
              },
              "daily_limit": {
                "default": null,
                "description": "At most this many locations a run.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "description": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "freeze_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountFreeze"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Hard` (default) or `Soft` (count spec Appendix F)."
              },
              "frequency_days": {
                "default": null,
                "description": "Count a location every this many days.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "is_active": {
                "default": null,
                "description": "Default `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "loc_type": {
                "default": null,
                "description": "A location type as `location.loc_type` spells it (`Case`, `Pick`, …).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_recounts": {
                "default": null,
                "description": "Recounts per location in the counts it makes (default 2).",
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "putawayzone": {
                "default": null,
                "description": "Scope — at least one of the four.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_abc": {
                "default": null,
                "description": "`Items`: the SKUs' ABC class, `A`, `B` or `C`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_group": {
                "default": null,
                "description": "`Items`: the SKUs' group.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "trust_empty_confirmation": {
                "default": null,
                "description": "A location confirmed empty in passing counts as checked (count spec Appendix L.6). Default `false`; a policy over items keeps none.",
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "expected_version",
              "policy_id"
            ],
            "title": "SaveCountPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": [
                "string",
                "null"
              ]
            },
            "basis": {
              "$ref": "#/definitions/InventoryCountPolicyBasis"
            },
            "code": {
              "type": "string"
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "daily_limit": {
              "format": "int32",
              "type": "integer"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "freeze_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryCountFreeze"
                }
              ],
              "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
            },
            "frequency_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_run_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "loc_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
            },
            "sku_group": {
              "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
              "type": [
                "string",
                "null"
              ]
            },
            "trust_empty_confirmation": {
              "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
              "type": "boolean"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "basis",
            "code",
            "count_mode",
            "daily_limit",
            "freeze_mode",
            "frequency_days",
            "id",
            "is_active",
            "max_recounts",
            "mod_when",
            "mod_who",
            "trust_empty_confirmation",
            "version"
          ],
          "title": "InventoryCountPolicy",
          "type": "object"
        }
      },
      "summary": "Change a cycle-count policy, on the version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:929754c2f12073cd589786902e1f529379b535a0753df38e5f84b9eb101962e5",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cc79dd28683e65d45427b259f300e911341e55a7bb8f73308c61d534caebd40d",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_count_policy_run",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "policy_id"
            ],
            "title": "RunCountPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCount": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "count_number": {
                  "type": "string"
                },
                "count_type": {
                  "$ref": "#/definitions/InventoryCountType"
                },
                "freeze_mode": {
                  "$ref": "#/definitions/InventoryCountFreeze"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_containers": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "item_lots": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "item_skus": {
                  "description": "The count's item (Appendix G): an empty list is \"not named\".",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "max_recounts": {
                  "description": "How many times one location may be recounted (attempts = 1 + this).",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_by_other_counter": {
                  "type": "boolean"
                },
                "scope_mode": {
                  "$ref": "#/definitions/InventoryCountScope"
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "count_mode",
                "count_number",
                "count_type",
                "freeze_mode",
                "id",
                "item_containers",
                "item_lots",
                "item_skus",
                "max_recounts",
                "mod_when",
                "mod_who",
                "recount_by_other_counter",
                "scope_mode",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicy": {
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "aisle": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "basis": {
                  "$ref": "#/definitions/InventoryCountPolicyBasis"
                },
                "code": {
                  "type": "string"
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "daily_limit": {
                  "format": "int32",
                  "type": "integer"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "freeze_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryCountFreeze"
                    }
                  ],
                  "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
                },
                "frequency_days": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_run_on": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "loc_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "max_recounts": {
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
                },
                "sku_group": {
                  "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trust_empty_confirmation": {
                  "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
                  "type": "boolean"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "basis",
                "code",
                "count_mode",
                "daily_limit",
                "freeze_mode",
                "frequency_days",
                "id",
                "is_active",
                "max_recounts",
                "mod_when",
                "mod_who",
                "trust_empty_confirmation",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            },
            "InventoryCountView": {
              "description": "A count with its tasks, as the count-level commands answer.",
              "properties": {
                "header": {
                  "$ref": "#/definitions/InventoryCount"
                },
                "summary": {
                  "description": "Where the count stands, in words.",
                  "type": "string"
                },
                "tasks": {
                  "items": {
                    "$ref": "#/definitions/InventoryCountTask"
                  },
                  "type": "array"
                }
              },
              "required": [
                "header",
                "summary",
                "tasks"
              ],
              "type": "object"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "What a run did.",
          "properties": {
            "count": {
              "anyOf": [
                {
                  "$ref": "#/definitions/InventoryCountView"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The count it started; `None` when nothing was due (or the scheduler found the policy already run today)."
            },
            "message": {
              "description": "What happened, in words.",
              "type": "string"
            },
            "policy": {
              "$ref": "#/definitions/InventoryCountPolicy"
            }
          },
          "required": [
            "message",
            "policy"
          ],
          "title": "PolicyRun",
          "type": "object"
        }
      },
      "summary": "Run a cycle-count policy now: start a count of the locations it finds due.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c917a792cadf2f7f089c76df03932c7811fc7566fdb87fbadf11b314dfd18412",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a18a998dfe84a9ed99f4c08d67bb5895f2bd5d8e86aa41c39b0eab8d200925ee",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_policy_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "policy_id"
            ],
            "title": "DeleteCountPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": [
                "string",
                "null"
              ]
            },
            "basis": {
              "$ref": "#/definitions/InventoryCountPolicyBasis"
            },
            "code": {
              "type": "string"
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "daily_limit": {
              "format": "int32",
              "type": "integer"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "freeze_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryCountFreeze"
                }
              ],
              "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
            },
            "frequency_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_run_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "loc_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
            },
            "sku_group": {
              "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
              "type": [
                "string",
                "null"
              ]
            },
            "trust_empty_confirmation": {
              "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
              "type": "boolean"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "basis",
            "code",
            "count_mode",
            "daily_limit",
            "freeze_mode",
            "frequency_days",
            "id",
            "is_active",
            "max_recounts",
            "mod_when",
            "mod_who",
            "trust_empty_confirmation",
            "version"
          ],
          "title": "InventoryCountPolicy",
          "type": "object"
        }
      },
      "summary": "Delete a cycle-count policy, on the version read; the counts it made stay.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fedb3c332f07c6c18bd6fca93948cd35b54e4cb3c80d6df599fae270bf66ff21",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cc79dd28683e65d45427b259f300e911341e55a7bb8f73308c61d534caebd40d",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_inventory_count_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "InventoryCountFreeze": {
                "enum": [
                  "Hard",
                  "Soft"
                ],
                "type": "string"
              },
              "InventoryCountMode": {
                "enum": [
                  "Blind",
                  "Informed"
                ],
                "type": "string"
              },
              "InventoryCountPolicyBasis": {
                "enum": [
                  "Locations",
                  "Items"
                ],
                "type": "string"
              }
            },
            "properties": {
              "abc": {
                "default": null,
                "description": "`A`, `B` or `C`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "aisle": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "basis": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountPolicyBasis"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Locations` (default) or `Items` (count spec Appendix H). Only the chosen basis' properties are part of the policy: the others are dropped."
              },
              "code": {
                "type": "string"
              },
              "count_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountMode"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Blind` (default) or `Informed`."
              },
              "daily_limit": {
                "default": null,
                "description": "At most this many locations a run.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "description": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "freeze_mode": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/InventoryCountFreeze"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "`Hard` (default) or `Soft` (count spec Appendix F)."
              },
              "frequency_days": {
                "default": null,
                "description": "Count a location every this many days.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "is_active": {
                "default": null,
                "description": "Default `true`.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "loc_type": {
                "default": null,
                "description": "A location type as `location.loc_type` spells it (`Case`, `Pick`, …).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_recounts": {
                "default": null,
                "description": "Recounts per location in the counts it makes (default 2).",
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "putawayzone": {
                "default": null,
                "description": "Scope — at least one of the four.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_abc": {
                "default": null,
                "description": "`Items`: the SKUs' ABC class, `A`, `B` or `C`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_group": {
                "default": null,
                "description": "`Items`: the SKUs' group.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "trust_empty_confirmation": {
                "default": null,
                "description": "A location confirmed empty in passing counts as checked (count spec Appendix L.6). Default `false`; a policy over items keeps none.",
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "CountPolicyForm",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": [
                "string",
                "null"
              ]
            },
            "basis": {
              "$ref": "#/definitions/InventoryCountPolicyBasis"
            },
            "code": {
              "type": "string"
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "daily_limit": {
              "format": "int32",
              "type": "integer"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "freeze_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryCountFreeze"
                }
              ],
              "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
            },
            "frequency_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_run_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "loc_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
            },
            "sku_group": {
              "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
              "type": [
                "string",
                "null"
              ]
            },
            "trust_empty_confirmation": {
              "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
              "type": "boolean"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "basis",
            "code",
            "count_mode",
            "daily_limit",
            "freeze_mode",
            "frequency_days",
            "id",
            "is_active",
            "max_recounts",
            "mod_when",
            "mod_who",
            "trust_empty_confirmation",
            "version"
          ],
          "title": "InventoryCountPolicy",
          "type": "object"
        }
      },
      "summary": "Create a cycle-count policy from its form.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6d213772a6efb3ef83c16f42ef4b791b310ef11b11a10e954a22e90cbe494c5f",
      "x-quark-response-schema-hash": "sha256:cc79dd28683e65d45427b259f300e911341e55a7bb8f73308c61d534caebd40d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_inventory_count_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "InventoryCountFreeze": {
                "enum": [
                  "Hard",
                  "Soft"
                ],
                "type": "string"
              },
              "InventoryCountMode": {
                "enum": [
                  "Blind",
                  "Informed"
                ],
                "type": "string"
              },
              "InventoryCountPolicyBasis": {
                "enum": [
                  "Locations",
                  "Items"
                ],
                "type": "string"
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "definitions": {
                  "InventoryCountFreeze": {
                    "enum": [
                      "Hard",
                      "Soft"
                    ],
                    "type": "string"
                  },
                  "InventoryCountMode": {
                    "enum": [
                      "Blind",
                      "Informed"
                    ],
                    "type": "string"
                  },
                  "InventoryCountPolicyBasis": {
                    "enum": [
                      "Locations",
                      "Items"
                    ],
                    "type": "string"
                  }
                },
                "description": "What a saved form changed — `generic_save` sends only the fields the person touched. Absent = unchanged; `null` (or empty text) = cleared.",
                "properties": {
                  "abc": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "aisle": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "basis": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/InventoryCountPolicyBasis"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "code": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "count_mode": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/InventoryCountMode"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "daily_limit": {
                    "default": null,
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "description": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "freeze_mode": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/InventoryCountFreeze"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "frequency_days": {
                    "default": null,
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "is_active": {
                    "default": null,
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "loc_type": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "max_recounts": {
                    "default": null,
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "putawayzone": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sku_abc": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sku_group": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "trust_empty_confirmation": {
                    "default": null,
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "title": "CountPolicyChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": [
                "string",
                "null"
              ]
            },
            "basis": {
              "$ref": "#/definitions/InventoryCountPolicyBasis"
            },
            "code": {
              "type": "string"
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "daily_limit": {
              "format": "int32",
              "type": "integer"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "freeze_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryCountFreeze"
                }
              ],
              "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
            },
            "frequency_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_run_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "loc_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "sku_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
            },
            "sku_group": {
              "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
              "type": [
                "string",
                "null"
              ]
            },
            "trust_empty_confirmation": {
              "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
              "type": "boolean"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "basis",
            "code",
            "count_mode",
            "daily_limit",
            "freeze_mode",
            "frequency_days",
            "id",
            "is_active",
            "max_recounts",
            "mod_when",
            "mod_who",
            "trust_empty_confirmation",
            "version"
          ],
          "title": "InventoryCountPolicy",
          "type": "object"
        }
      },
      "summary": "Save a cycle-count policy's form, on the version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b614273b763fbf91d3cb667eed9600e4fe5e182fd0ced20421f73483105a645c",
      "x-quark-response-schema-hash": "sha256:cc79dd28683e65d45427b259f300e911341e55a7bb8f73308c61d534caebd40d",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "update_inventory_count_tolerance",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What a saved card changed — `generic_save` sends only the fields the person touched. Absent = unchanged; `null` = cleared (the rule no longer applies).",
                "properties": {
                  "approval_value": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "auto_pct": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "auto_qty": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "auto_value": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "title": "ToleranceChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            }
          },
          "description": "One ABC class's tolerance. Every rule is optional: `None` does not apply.",
          "properties": {
            "abc": {
              "$ref": "#/definitions/AbcRotationSpeed"
            },
            "approval_value": {
              "description": "A task's variance worth more than this is accepted only with `inventory_count.accept_large_variance`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "auto_pct": {
              "description": "…and by at most this percent of what was expected…",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "auto_qty": {
              "description": "Accepted on its own when the line differs by at most this many units…",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "auto_value": {
              "description": "…and its value is at most this.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "abc",
            "id",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "InventoryCountTolerance",
          "type": "object"
        }
      },
      "summary": "Count variance tolerances: save a class's card, on the version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4eb57e8af3a62e5f64ab9771ca57cda5c36834b841e703a11527facaa0faf580",
      "x-quark-response-schema-hash": "sha256:337658838b3b5de180c0e5a76eca38f6ea20f3f35a18fbef486edd2cbb0da617",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "inventory_count_tolerance",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "inventory_count_task_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountObservation": {
              "description": "One scan or entry of the counter. Append-only; voided, never edited.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "inventory_count_task_id",
                "lot",
                "observed_qty",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResult": {
              "description": "What completing the task found for one identity.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` the stock deltas between the snapshot and the completion made (a `Soft` count); 0 otherwise.",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "$ref": "#/definitions/InventoryCountResultType"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "movement_qty",
                "observed_qty",
                "owner_id",
                "pack_id",
                "result_type",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountResultType": {
              "enum": [
                "Match",
                "QtyVariance",
                "ExpectedButMissing",
                "UnexpectedFound",
                "SerialMismatch"
              ],
              "type": "string"
            },
            "InventoryCountSnapshot": {
              "description": "One identity the task is counted against.",
              "properties": {
                "container_id": {
                  "description": "`None` = loose stock.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "expected_qty",
                "id",
                "inventory_count_task_id",
                "lot",
                "owner_id",
                "pack_id",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "SystemStockLine": {
              "description": "One identity the system holds at a location, as the counter reads it.",
              "properties": {
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "The container's code; `None` = loose stock.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "lot",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "One location's count, as the counter and the supervisor see it.",
          "properties": {
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_only": {
              "description": "What the counter counts here, in words, when it is not the whole location — a count of the item (Appendix G): \"SKU A; lot L1\". No quantity: the count stays blind.",
              "type": [
                "string",
                "null"
              ]
            },
            "expected": {
              "description": "The stock the location is counted against — `None` while a blind count is being counted (spec §8, AC-03).",
              "items": {
                "$ref": "#/definitions/InventoryCountSnapshot"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "observations": {
              "description": "What the counter recorded, voided rows included (history, spec §29).",
              "items": {
                "$ref": "#/definitions/InventoryCountObservation"
              },
              "type": "array"
            },
            "results": {
              "description": "What completing the task found; empty until it is counted.",
              "items": {
                "$ref": "#/definitions/InventoryCountResult"
              },
              "type": "array"
            },
            "stock_moved_under_count": {
              "description": "A shift lead let an operation move stock under this count while it was frozen (owner's decision 2026-10-21 §6, `inventory_count_disturbance`). The counter is told because their number is then in doubt — the point of recording the override at all. Always `false` for a `Soft` count, which freezes nothing and so is never overridden.",
              "type": "boolean"
            },
            "system_stock": {
              "description": "What the system holds here now, for the counter of an `Informed` count's first attempt while it is counted (count spec §8); `None` otherwise. A soft count's movements since its snapshot included.",
              "items": {
                "$ref": "#/definitions/SystemStockLine"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "task": {
              "$ref": "#/definitions/InventoryCountTask"
            }
          },
          "required": [
            "count_mode",
            "count_number",
            "observations",
            "results",
            "stock_moved_under_count",
            "task"
          ],
          "title": "CountTaskView",
          "type": "object"
        }
      },
      "summary": "One location's count; a blind count hides the system quantity until counted.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:a9e42c3cf75e4699967cc70b4ff078cc4ab04c35efedc4485b09e9c0d9b795d6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCount": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "count_number": {
                  "type": "string"
                },
                "count_type": {
                  "$ref": "#/definitions/InventoryCountType"
                },
                "freeze_mode": {
                  "$ref": "#/definitions/InventoryCountFreeze"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_containers": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "item_lots": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "item_skus": {
                  "description": "The count's item (Appendix G): an empty list is \"not named\".",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "max_recounts": {
                  "description": "How many times one location may be recounted (attempts = 1 + this).",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_by_other_counter": {
                  "type": "boolean"
                },
                "scope_mode": {
                  "$ref": "#/definitions/InventoryCountScope"
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "count_mode",
                "count_number",
                "count_type",
                "freeze_mode",
                "id",
                "item_containers",
                "item_lots",
                "item_skus",
                "max_recounts",
                "mod_when",
                "mod_who",
                "recount_by_other_counter",
                "scope_mode",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountTask": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "description": "A count with its tasks, as the count-level commands answer.",
          "properties": {
            "header": {
              "$ref": "#/definitions/InventoryCount"
            },
            "summary": {
              "description": "Where the count stands, in words.",
              "type": "string"
            },
            "tasks": {
              "items": {
                "$ref": "#/definitions/InventoryCountTask"
              },
              "type": "array"
            }
          },
          "required": [
            "header",
            "summary",
            "tasks"
          ],
          "title": "InventoryCountView",
          "type": "object"
        }
      },
      "summary": "Get one inventory count with its tasks.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:49ff2919f5b660f4ff6cad75fe7c794eb471822c1dba72a098cbba2670f154ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCount": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "count_number": {
                  "type": "string"
                },
                "count_type": {
                  "$ref": "#/definitions/InventoryCountType"
                },
                "freeze_mode": {
                  "$ref": "#/definitions/InventoryCountFreeze"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_containers": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "item_lots": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "item_skus": {
                  "description": "The count's item (Appendix G): an empty list is \"not named\".",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "max_recounts": {
                  "description": "How many times one location may be recounted (attempts = 1 + this).",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_by_other_counter": {
                  "type": "boolean"
                },
                "scope_mode": {
                  "$ref": "#/definitions/InventoryCountScope"
                },
                "source_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_type": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "count_mode",
                "count_number",
                "count_type",
                "freeze_mode",
                "id",
                "item_containers",
                "item_lots",
                "item_skus",
                "max_recounts",
                "mod_when",
                "mod_who",
                "recount_by_other_counter",
                "scope_mode",
                "source_type",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryCount"
          },
          "title": "Array_of_InventoryCount",
          "type": "array"
        }
      },
      "summary": "List inventory counts, filtered like any list (by status, number).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7a93722f6df4d9b2eb17c218da48011fee32bed6df039eb9b04aa44d61c20b7e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_list_tasks",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CountTaskRow": {
              "description": "A task as the supervisor's grid and the location card show it: the task, how many identities its count found different, and whether it may be counted again. What differs is not squeezed into a line of text — the card lists it line by line ([`count_location_results`], spec §32 v0.3).",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "auto_accepted": {
                  "default": false,
                  "type": "boolean"
                },
                "counted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "counted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "decided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "decided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "differences": {
                  "description": "Identities that did not match; 0 until the task is counted.",
                  "format": "int32",
                  "type": "integer"
                },
                "empty_confirmed": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inventory_count_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "recount_allowed": {
                  "description": "Whether the count's `max_recounts` still lets this location be counted again — what greys «Пересчитать» before the server refuses.",
                  "type": "boolean"
                },
                "recount_of_task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "snapshot_at": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/InventoryCountTaskStatus"
                },
                "variance_cause": {
                  "default": null,
                  "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "variance_comment": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_no",
                "differences",
                "empty_confirmed",
                "id",
                "inventory_count_id",
                "location",
                "mod_when",
                "mod_who",
                "recount_allowed",
                "snapshot_at",
                "status",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/CountTaskRow"
          },
          "title": "Array_of_CountTaskRow",
          "type": "array"
        }
      },
      "summary": "List count tasks with what each count found (by count, location, status).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:701e2d3c014f7653c38e629994f380b86606e60f464c9063842a3e80d85215ba",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_card_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountScope": {
              "enum": [
                "LocationFull",
                "IdentitySubset"
              ],
              "type": "string"
            },
            "InventoryCountStatus": {
              "enum": [
                "Open",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "InventoryCountType": {
              "enum": [
                "Full",
                "Cycle",
                "Selective",
                "Event"
              ],
              "type": "string"
            }
          },
          "description": "A count flat, for a card form (`generic_rpc_form_load`).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "cancelled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "closed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "count_number": {
              "type": "string"
            },
            "count_type": {
              "$ref": "#/definitions/InventoryCountType"
            },
            "freeze_mode": {
              "$ref": "#/definitions/InventoryCountFreeze"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_lots": {
              "type": "string"
            },
            "item_lpns": {
              "type": "string"
            },
            "item_skus": {
              "description": "The count's item, as the header form names it: codes, comma-separated (empty = not named).",
              "type": "string"
            },
            "locations": {
              "description": "The counted locations, sorted, comma-separated.",
              "type": "string"
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "scope_mode": {
              "$ref": "#/definitions/InventoryCountScope"
            },
            "source_type": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryCountStatus"
            },
            "summary": {
              "description": "Where the count stands, in words.",
              "type": "string"
            },
            "tasks_closed": {
              "format": "int32",
              "type": "integer"
            },
            "tasks_open": {
              "format": "int32",
              "type": "integer"
            },
            "tasks_variance": {
              "format": "int32",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "count_mode",
            "count_number",
            "count_type",
            "freeze_mode",
            "id",
            "item_lots",
            "item_lpns",
            "item_skus",
            "locations",
            "max_recounts",
            "scope_mode",
            "source_type",
            "status",
            "summary",
            "tasks_closed",
            "tasks_open",
            "tasks_variance",
            "version"
          ],
          "title": "InventoryCountCard",
          "type": "object"
        }
      },
      "summary": "Get one inventory count flat, with its locations and where its tasks stand.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ce7765dca932c386f4176bbd7944030060a356c0e11fc2a55eeba5da49e32292",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_location_results",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CountResultLine": {
              "description": "One result line of a counted location, as the supervisor's card reads it (spec §32 v0.3): which attempt, what identity — the lot with its dates and attributes, the LPN by its code — expected, counted, the difference, the verdict, and the adjustment it went into.",
              "properties": {
                "adjustment_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "adjustment_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "difference": {
                  "format": "double",
                  "type": "number"
                },
                "expected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "lot_attributes": {
                  "description": "`CODE value, …` — the lot policy's attributes of the lot.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "movement_qty": {
                  "description": "The part of `expected_qty` stock movements made (a `Soft` count).",
                  "format": "double",
                  "type": "number"
                },
                "observed_qty": {
                  "format": "double",
                  "type": "number"
                },
                "owner_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result_type": {
                  "type": "string"
                },
                "sku_code": {
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_status": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "attempt_no",
                "difference",
                "expected_qty",
                "id",
                "location",
                "lot",
                "movement_qty",
                "observed_qty",
                "pack_id",
                "result_type",
                "sku_code",
                "task_id",
                "task_status",
                "uom"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CountResultLine"
          },
          "title": "Array_of_CountResultLine",
          "type": "array"
        }
      },
      "summary": "Every result line of a counted location — all attempts: lot and its attributes, LPN, expected, counted, difference, adjustment.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:69c1dc58974ea7b07c735f96ae439a0d0aa7997c1ebe8e89e6fa4e20efc1a918",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_location_serials",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CountSerialLine": {
              "description": "One serial result of a counted location, as the location card lists it (count spec Appendix K.5): which attempt, which serial, where the count puts it and what it made of it, and where the system held it.",
              "properties": {
                "attempt_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "outcome": {
                  "description": "`Found` / `Missing` / `Relocated` / `Registered`.",
                  "type": "string"
                },
                "seen_location": {
                  "description": "Where the system held it when the count judged it.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "seen_lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "seen_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "serial_number": {
                  "type": "string"
                },
                "sku_code": {
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "attempt_no",
                "id",
                "lot",
                "outcome",
                "serial_number",
                "sku_code",
                "task_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CountSerialLine"
          },
          "title": "Array_of_CountSerialLine",
          "type": "array"
        }
      },
      "summary": "Every serial a count of the location judged — all attempts: serial, SKU, lot, LPN, outcome (Found, Missing, Relocated, Registered), where the system held it.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:39bf93cd46e6958ad68b10f68c5403fd8311a018ef1b0fdac5f5254aa26e80df",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_task_card_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountTaskStatus": {
              "enum": [
                "Open",
                "Variance",
                "Closed",
                "Recounted",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "description": "A task as the supervisor's grid and the location card show it: the task, how many identities its count found different, and whether it may be counted again. What differs is not squeezed into a line of text — the card lists it line by line ([`count_location_results`], spec §32 v0.3).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "adjustment_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "attempt_no": {
              "format": "int32",
              "type": "integer"
            },
            "auto_accepted": {
              "default": false,
              "type": "boolean"
            },
            "counted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "counted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "decided_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "decided_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "differences": {
              "description": "Identities that did not match; 0 until the task is counted.",
              "format": "int32",
              "type": "integer"
            },
            "empty_confirmed": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inventory_count_id": {
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "recount_allowed": {
              "description": "Whether the count's `max_recounts` still lets this location be counted again — what greys «Пересчитать» before the server refuses.",
              "type": "boolean"
            },
            "recount_of_task_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "snapshot_at": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/InventoryCountTaskStatus"
            },
            "variance_cause": {
              "default": null,
              "description": "ADR-093 (wms-app 132): why the accepted variance happened — a code of the `count_variance_cause` list — with what the supervisor added, and whether the accept was the system's own within tolerance.",
              "type": [
                "string",
                "null"
              ]
            },
            "variance_comment": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attempt_no",
            "differences",
            "empty_confirmed",
            "id",
            "inventory_count_id",
            "location",
            "mod_when",
            "mod_who",
            "recount_allowed",
            "snapshot_at",
            "status",
            "version"
          ],
          "title": "CountTaskRow",
          "type": "object"
        }
      },
      "summary": "Get one count task flat: location, attempt, status, how many lines differ, whether a recount is allowed.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d360c096c747083480a80d5d3a4278da4038c4c8d3df4e96b6d738ebf86248a5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_policy_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "One policy, as its card loads it: the policy flat, and that it is saved — what greys Delete and Run Now on a policy the form has not saved yet (wms-meta-ui 098; a card outside a shell has no parent record to ask).",
          "properties": {
            "abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "aisle": {
              "type": [
                "string",
                "null"
              ]
            },
            "basis": {
              "$ref": "#/definitions/InventoryCountPolicyBasis"
            },
            "code": {
              "type": "string"
            },
            "count_mode": {
              "$ref": "#/definitions/InventoryCountMode"
            },
            "daily_limit": {
              "format": "int32",
              "type": "integer"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "freeze_mode": {
              "allOf": [
                {
                  "$ref": "#/definitions/InventoryCountFreeze"
                }
              ],
              "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
            },
            "frequency_days": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_run_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "loc_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "max_recounts": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "saved": {
              "description": "Always `true` on a read: only a saved policy can be read.",
              "type": "boolean"
            },
            "sku_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
            },
            "sku_group": {
              "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
              "type": [
                "string",
                "null"
              ]
            },
            "trust_empty_confirmation": {
              "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
              "type": "boolean"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "basis",
            "code",
            "count_mode",
            "daily_limit",
            "freeze_mode",
            "frequency_days",
            "id",
            "is_active",
            "max_recounts",
            "mod_when",
            "mod_who",
            "saved",
            "trust_empty_confirmation",
            "version"
          ],
          "title": "CountPolicyCard",
          "type": "object"
        }
      },
      "summary": "Get one cycle-count policy, flat, as its card loads it.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:8a0692ff9bc3ae61950dd6b9f3d16f6a721489958b5adbe2d6531ff8beb92435",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_policy_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountFreeze": {
              "enum": [
                "Hard",
                "Soft"
              ],
              "type": "string"
            },
            "InventoryCountMode": {
              "enum": [
                "Blind",
                "Informed"
              ],
              "type": "string"
            },
            "InventoryCountPolicy": {
              "properties": {
                "abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "aisle": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "basis": {
                  "$ref": "#/definitions/InventoryCountPolicyBasis"
                },
                "code": {
                  "type": "string"
                },
                "count_mode": {
                  "$ref": "#/definitions/InventoryCountMode"
                },
                "daily_limit": {
                  "format": "int32",
                  "type": "integer"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "freeze_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/InventoryCountFreeze"
                    }
                  ],
                  "description": "`Hard` freezes the locations the policy's counts count; `Soft` lets stock move (count spec Appendix F)."
                },
                "frequency_days": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_run_on": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "loc_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "max_recounts": {
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`Items`: the SKUs of this ABC class (`sku.abc`)."
                },
                "sku_group": {
                  "description": "`Items`: the SKUs of this group (`sku.sku_group`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "trust_empty_confirmation": {
                  "description": "A location confirmed empty in passing counts as checked then (count spec Appendix L.6). Only a policy over locations reads it.",
                  "type": "boolean"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "basis",
                "code",
                "count_mode",
                "daily_limit",
                "freeze_mode",
                "frequency_days",
                "id",
                "is_active",
                "max_recounts",
                "mod_when",
                "mod_who",
                "trust_empty_confirmation",
                "version"
              ],
              "type": "object"
            },
            "InventoryCountPolicyBasis": {
              "enum": [
                "Locations",
                "Items"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryCountPolicy"
          },
          "title": "Array_of_InventoryCountPolicy",
          "type": "array"
        }
      },
      "summary": "List cycle-count policies (by code, active).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:ef3ac8cee72011361f6b5f9cda5f38cbff61aa156ba46916433f3a7d7a4645c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_tolerance_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            }
          },
          "description": "One ABC class's tolerance. Every rule is optional: `None` does not apply.",
          "properties": {
            "abc": {
              "$ref": "#/definitions/AbcRotationSpeed"
            },
            "approval_value": {
              "description": "A task's variance worth more than this is accepted only with `inventory_count.accept_large_variance`.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "auto_pct": {
              "description": "…and by at most this percent of what was expected…",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "auto_qty": {
              "description": "Accepted on its own when the line differs by at most this many units…",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "auto_value": {
              "description": "…and its value is at most this.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "abc",
            "id",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "InventoryCountTolerance",
          "type": "object"
        }
      },
      "summary": "Count variance tolerances: one class's, as its card loads it.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:337658838b3b5de180c0e5a76eca38f6ea20f3f35a18fbef486edd2cbb0da617",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "inventory_count_tolerance_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "InventoryCountTolerance": {
              "description": "One ABC class's tolerance. Every rule is optional: `None` does not apply.",
              "properties": {
                "abc": {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                "approval_value": {
                  "description": "A task's variance worth more than this is accepted only with `inventory_count.accept_large_variance`.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "auto_pct": {
                  "description": "…and by at most this percent of what was expected…",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "auto_qty": {
                  "description": "Accepted on its own when the line differs by at most this many units…",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "auto_value": {
                  "description": "…and its value is at most this.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "abc",
                "id",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryCountTolerance"
          },
          "title": "Array_of_InventoryCountTolerance",
          "type": "array"
        }
      },
      "summary": "Count variance tolerances: every SKU ABC class's, A to C.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:453fee4f6865dcc8904baf08916d088d52412f772da755686b4882d0cfab3745",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "location_checks",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocationCheck": {
              "description": "One check of a location.",
              "properties": {
                "check_kind": {
                  "description": "`Count`, or what the answer was against the stock: `ConfirmedEmpty` / `DeniedEmpty` / `EmptyAgainstStock`; or `UnexpectedStock`, an operator's report (Appendix M).",
                  "type": "string"
                },
                "checked_at": {
                  "type": "string"
                },
                "id": {
                  "description": "`C<task id>` for a count, `E<evidence id>` for an answer: one key across both.",
                  "type": "string"
                },
                "location": {
                  "type": "string"
                },
                "operator": {
                  "description": "The operator's login, or `#<id>` for one the warehouse no longer has.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "outcome": {
                  "description": "A count: its task's status (`Closed`, `Variance`, `Recounted` …). An answer the stock contradicted: `CountRequested`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "description": "Which operation: the count's number and attempt (`INV-12 / 2`), the one that asked (`PickCommit #701`), or a report with what it named (`Report: LPN L-7 / SKU SKU002`).",
                  "type": "string"
                },
                "system_qty": {
                  "description": "An answer: what the location held when it came (`SUM(qty)`).",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "check_kind",
                "checked_at",
                "id",
                "location",
                "source"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LocationCheck"
          },
          "title": "Array_of_LocationCheck",
          "type": "array"
        }
      },
      "summary": "Every check of a location, the latest first: its counts and every answer to \"is it empty?\" — when, who, what it came to, which operation asked.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_count",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:5071de4c002d1385bcb499e0280b1356cd1ccbeede6504a1a0e7adf3dbde0b6e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_transfer_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "transfer_number": {
                "default": null,
                "description": "The number the new form already showed (its counter ran at New, as for receipts and orders); `None` = take the next one now.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "CreateLotTransfer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransfer": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "header": {
              "$ref": "#/definitions/LotTransfer"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LotTransferDetail"
              },
              "type": "array"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command.",
              "type": "string"
            }
          },
          "required": [
            "header",
            "lines",
            "summary"
          ],
          "title": "LotTransferView",
          "type": "object"
        }
      },
      "summary": "Create a Draft lot transfer (its number is drawn unless one is given).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:19aabfbee67967f3298d891246bb026ed409ff9bb0117e5cb4483f64227f91d8",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58af1fb37dc152d9460c3c9be69b1fc311c12c359f0bf2f3d52234b4619d5332",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_transfer_update_header",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "comment": {
                "description": "`None` = unchanged; blank text clears it.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "transfer_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "transfer_id"
            ],
            "title": "UpdateLotTransferHeader",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransfer": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "header": {
              "$ref": "#/definitions/LotTransfer"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LotTransferDetail"
              },
              "type": "array"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command.",
              "type": "string"
            }
          },
          "required": [
            "header",
            "lines",
            "summary"
          ],
          "title": "LotTransferView",
          "type": "object"
        }
      },
      "summary": "Change a Draft lot transfer's comment, on the header version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9ffac7725ae406dc8dc27e83815d00de2f2a132313bd891b3f9765365575cafd",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58af1fb37dc152d9460c3c9be69b1fc311c12c359f0bf2f3d52234b4619d5332",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer",
          "id_field": "transfer_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "lot_transfer_add_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "balance_id": {
                "description": "The stock row, as the balances screen shows it.",
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "qty": {
                "default": null,
                "description": "`None` = everything that is free of the row.",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "serials": {
                "default": null,
                "description": "A serial-tracked stock's serials, when a part of it is taken. They ride with the line so that a line is never added without the serials the form named.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "transfer_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "balance_id",
              "transfer_id"
            ],
            "title": "AddLotTransferLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransfer": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "header": {
              "$ref": "#/definitions/LotTransfer"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LotTransferDetail"
              },
              "type": "array"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command.",
              "type": "string"
            }
          },
          "required": [
            "header",
            "lines",
            "summary"
          ],
          "title": "LotTransferView",
          "type": "object"
        }
      },
      "summary": "Add a line for a stock row (default: everything free of it), with its serials if tracked.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a0e8a007d5b6b2de76b588313f117aa0845c8f4bbd6b171fbd2a51c1168bd3c7",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58af1fb37dc152d9460c3c9be69b1fc311c12c359f0bf2f3d52234b4619d5332",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_transfer_update_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "serials": {
                "default": null,
                "description": "A serial-tracked stock's serials, named again as a whole; `None` keeps the ones the line names, an empty list names none.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "required": [
              "expected_version",
              "line_id",
              "qty"
            ],
            "title": "UpdateLotTransferLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransfer": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "header": {
              "$ref": "#/definitions/LotTransfer"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LotTransferDetail"
              },
              "type": "array"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command.",
              "type": "string"
            }
          },
          "required": [
            "header",
            "lines",
            "summary"
          ],
          "title": "LotTransferView",
          "type": "object"
        }
      },
      "summary": "Change one line's quantity (and serials), on the line version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:db84fdcf8d2e5e21eda39483bcb02fe971bd328ede0fc8c65c56377d0f40dfca",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58af1fb37dc152d9460c3c9be69b1fc311c12c359f0bf2f3d52234b4619d5332",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer_detail",
          "id_field": "line_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "lot_transfer_set_line_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "values": {
                "additionalProperties": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": "Attribute code to its new \"to\" value; blank or `None` clears it.",
                "type": "object"
              }
            },
            "required": [
              "expected_version",
              "line_id",
              "values"
            ],
            "title": "SetLotTransferLineAttributes",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The line's version after the change, for the grid's next edit.",
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "line_id",
            "new_version"
          ],
          "title": "LineAttributesSet",
          "type": "object"
        }
      },
      "summary": "Set the lot attributes a line's stock is given, on the line version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5084c7bccbbdaa27d968f84ab99082c9b6db5f599079681d884d2d46d33ab401",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b768a6c926b4359868c39f86c3b2b1d60042c58bfe34b72a9833b5aac0ac6bee",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer_detail",
          "id_field": "line_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "lot_transfer_remove_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "line_id"
            ],
            "title": "RemoveLotTransferLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransfer": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "header": {
              "$ref": "#/definitions/LotTransfer"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LotTransferDetail"
              },
              "type": "array"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command.",
              "type": "string"
            }
          },
          "required": [
            "header",
            "lines",
            "summary"
          ],
          "title": "LotTransferView",
          "type": "object"
        }
      },
      "summary": "Remove one line from a Draft lot transfer, on the line version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:093eab969f72eca90388efd6affe842d93f9b3aefc4577ee171e35f79461a3dd",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58af1fb37dc152d9460c3c9be69b1fc311c12c359f0bf2f3d52234b4619d5332",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer_detail",
          "id_field": "line_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "lot_transfer_post",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "override_grant_id": {
                "default": null,
                "description": "A shift lead's grant (`supervisor_override_grant`) authorising this posting into a location an open Hard count is counting (owner's decision 2026-10-21 §6, defect Д-2). The SAME single-use grant the move and the adjustment redeem — overridable like them, because a lot transfer is ordinary warehouse work with no second door of its own that a count pair could slip past.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "transfer_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "transfer_id"
            ],
            "title": "PostLotTransfer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransfer": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A document with its lines, as every command answers.",
          "properties": {
            "header": {
              "$ref": "#/definitions/LotTransfer"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LotTransferDetail"
              },
              "type": "array"
            },
            "summary": {
              "description": "Where the document stands, in words — what the screen says after a command.",
              "type": "string"
            }
          },
          "required": [
            "header",
            "lines",
            "summary"
          ],
          "title": "LotTransferView",
          "type": "object"
        }
      },
      "summary": "Post the transfer: move every line's stock into its new lot, all or nothing.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2af2bdb1a24de972a63a5cc76a148cb6ba36cbb517047806532d8c3e986d063f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:58af1fb37dc152d9460c3c9be69b1fc311c12c359f0bf2f3d52234b4619d5332",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer",
          "id_field": "transfer_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "lot_transfer_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "transfer_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "transfer_id"
            ],
            "title": "DeleteLotTransfer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What was removed, for the answer.",
          "properties": {
            "transfer_id": {
              "format": "int64",
              "type": "integer"
            },
            "transfer_number": {
              "type": "string"
            }
          },
          "required": [
            "transfer_id",
            "transfer_number"
          ],
          "title": "DeletedLotTransfer",
          "type": "object"
        }
      },
      "summary": "Delete a lot transfer that was never posted, with its lines.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1d4996cc0abd76c4a0e7570d3a458432bc80aaf12cd76d702366970f41e14f21",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:6f0269df0e967700c1df6a041fc73d8b8240f6c26e091e01b8440dbb771f0ae9",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer",
          "id_field": "transfer_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_lot_transfer",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What the header form sends on create.",
            "properties": {
              "comment": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "transfer_number": {
                "default": null,
                "description": "What the new form showed: `generic_new` drew it from the counter.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "HeaderFormNew",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "The document's header flat, with what the screen greys buttons by — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_count": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "postable": {
              "description": "Whether Post would be accepted now — a Draft with at least one line, the command's own rule, so Post greys exactly when the server would refuse it.",
              "type": "boolean"
            },
            "posted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "posted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LotTransferStatus"
            },
            "transfer_number": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "line_count",
            "mod_when",
            "mod_who",
            "postable",
            "status",
            "transfer_number",
            "version"
          ],
          "title": "LotTransferCard",
          "type": "object"
        }
      },
      "summary": "Create a Draft lot transfer from its header form (number as New drew it, comment).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3661ea025e06ab0782d283d14e18ddb12e0168d36c6f44e19e4a17d14b6f3b2a",
      "x-quark-response-schema-hash": "sha256:6fe557b02f567ef9691b4fbb0017863186316190a5eb4cff0ec6f6617a3f4e19",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_lot_transfer",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What the header form sends on save: only what changed.",
                "properties": {
                  "comment": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "title": "HeaderFormChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "The document's header flat, with what the screen greys buttons by — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_count": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "postable": {
              "description": "Whether Post would be accepted now — a Draft with at least one line, the command's own rule, so Post greys exactly when the server would refuse it.",
              "type": "boolean"
            },
            "posted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "posted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LotTransferStatus"
            },
            "transfer_number": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "line_count",
            "mod_when",
            "mod_who",
            "postable",
            "status",
            "transfer_number",
            "version"
          ],
          "title": "LotTransferCard",
          "type": "object"
        }
      },
      "summary": "Save a lot transfer's header form: the comment, on the version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bcee18177e11a164f7c1d99a233c2e4fd1802488c12f1de497deed9777f581ce",
      "x-quark-response-schema-hash": "sha256:6fe557b02f567ef9691b4fbb0017863186316190a5eb4cff0ec6f6617a3f4e19",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_lot_transfer_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What the line form sends on create. The document comes from the parent record (`generic_new`'s parent FK); the stock row is picked.",
            "properties": {
              "balance_id": {
                "format": "int64",
                "type": "integer"
              },
              "lot_transfer_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "default": null,
                "description": "Empty = everything that is free of the row.",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "serials": {
                "default": null,
                "description": "A serial-tracked stock's serials, one a line.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "balance_id",
              "lot_transfer_id"
            ],
            "title": "LineFormNew",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A line as its form shows it: the line flat, the owner and the container by code, how much of its stock is free now, and the serials it names.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "available": {
              "description": "What is free of the line's stock right now — the line may ask for up to it; 0 when the stock row is gone.",
              "format": "double",
              "type": "number"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "editable": {
              "description": "Whether the line's quantity and serials may still change — the line is `Pending`, i.e. its document is a Draft (Post moves every line to `Posted`). The card greys both fields on it (spec §8: after Post everything is read-only).",
              "type": "boolean"
            },
            "from_lot": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "lot_policy_id": {
              "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
              "format": "int64",
              "type": "integer"
            },
            "lot_transfer_id": {
              "format": "int64",
              "type": "integer"
            },
            "lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "serials": {
              "description": "The serials the line names, one a line.",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/LotTransferLineStatus"
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot_created": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "transaction_log_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "available",
            "editable",
            "from_lot",
            "id",
            "line_no",
            "location",
            "lot_policy_id",
            "lot_transfer_id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "qty",
            "sku_code",
            "status",
            "uom",
            "version"
          ],
          "title": "LotTransferLineCard",
          "type": "object"
        }
      },
      "summary": "Add a line from the line form: the document and the stock row picked, a quantity, serials.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:245c20f2578d11b0f79781227ba65e7e5a7f45332ac445be06bf67050ed82189",
      "x-quark-response-schema-hash": "sha256:fb62e0eeeda1c5abc2c60e8a8975bf26c0ef1a0f400de6f953251b4092db8eb5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_lot_transfer_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What the line form sends on save: only what changed. The stock never changes: remove the line and add another.",
                "properties": {
                  "qty": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "serials": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "title": "LineFormChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A line as its form shows it: the line flat, the owner and the container by code, how much of its stock is free now, and the serials it names.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "available": {
              "description": "What is free of the line's stock right now — the line may ask for up to it; 0 when the stock row is gone.",
              "format": "double",
              "type": "number"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "editable": {
              "description": "Whether the line's quantity and serials may still change — the line is `Pending`, i.e. its document is a Draft (Post moves every line to `Posted`). The card greys both fields on it (spec §8: after Post everything is read-only).",
              "type": "boolean"
            },
            "from_lot": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "lot_policy_id": {
              "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
              "format": "int64",
              "type": "integer"
            },
            "lot_transfer_id": {
              "format": "int64",
              "type": "integer"
            },
            "lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "serials": {
              "description": "The serials the line names, one a line.",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/LotTransferLineStatus"
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot_created": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "transaction_log_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "available",
            "editable",
            "from_lot",
            "id",
            "line_no",
            "location",
            "lot_policy_id",
            "lot_transfer_id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "qty",
            "sku_code",
            "status",
            "uom",
            "version"
          ],
          "title": "LotTransferLineCard",
          "type": "object"
        }
      },
      "summary": "Save a line form: quantity and serials, on the line's version read.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a70b59ae954edaaf77e733e881fc29fa7547228fb93240c79543b2711d461620",
      "x-quark-response-schema-hash": "sha256:fb62e0eeeda1c5abc2c60e8a8975bf26c0ef1a0f400de6f953251b4092db8eb5",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "lot_transfer_detail",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "lot_transfer_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferListRow": {
              "description": "A document as its list shows it: the header flat, and who posted it by name (spec §8 «Провёл») — `posted_by` is a user id, which says nothing to the reader.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "posted_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "posted_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "posted_by_name": {
                  "description": "The poster's full name, else their login; `None` for a Draft.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferStatus"
                },
                "transfer_number": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "transfer_number",
                "version"
              ],
              "type": "object"
            },
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/LotTransferListRow"
          },
          "title": "Array_of_LotTransferListRow",
          "type": "array"
        }
      },
      "summary": "List lot transfers with the poster's name, filtered and sorted like any list (by status, number, poster).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:3a5768f92844debbd2c6586184dbc35c3eb9f78a0f3035999af557fc06ab9f52",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_transfer_card_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferStatus": {
              "enum": [
                "Draft",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "The document's header flat, with what the screen greys buttons by — what a card form loads (`generic_rpc_form_load` stores the answer as the record, so the header's columns must sit at the top).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "comment": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_count": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "postable": {
              "description": "Whether Post would be accepted now — a Draft with at least one line, the command's own rule, so Post greys exactly when the server would refuse it.",
              "type": "boolean"
            },
            "posted_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "posted_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LotTransferStatus"
            },
            "transfer_number": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "line_count",
            "mod_when",
            "mod_who",
            "postable",
            "status",
            "transfer_number",
            "version"
          ],
          "title": "LotTransferCard",
          "type": "object"
        }
      },
      "summary": "Get one lot transfer's header, flat, with its line count and whether Post is accepted.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:6fe557b02f567ef9691b4fbb0017863186316190a5eb4cff0ec6f6617a3f4e19",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_transfer_line_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferLineRow": {
              "description": "A line as its grid shows it: the line flat, and the names the operator knows the stock by — the owner's code, the container's code (LPN) and the SKU's description.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "from_lot": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot_policy_id": {
                  "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
                  "format": "int64",
                  "type": "integer"
                },
                "lot_transfer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "to_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_lot_created": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "transaction_log_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "from_lot",
                "id",
                "line_no",
                "location",
                "lot_policy_id",
                "lot_transfer_id",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "sku_code",
                "status",
                "uom",
                "version"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/LotTransferLineRow"
          },
          "title": "Array_of_LotTransferLineRow",
          "type": "array"
        }
      },
      "summary": "List lot transfer lines with the owner, container and SKU names, filtered and sorted like any list (by document, LPN, owner).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:25782294614600a757121f7c21be9c9af489249dce4b90fc22d5ff52ca4e1a9f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_lot_transfer_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            }
          },
          "description": "A line as its form shows it: the line flat, the owner and the container by code, how much of its stock is free now, and the serials it names.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "available": {
              "description": "What is free of the line's stock right now — the line may ask for up to it; 0 when the stock row is gone.",
              "format": "double",
              "type": "number"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "editable": {
              "description": "Whether the line's quantity and serials may still change — the line is `Pending`, i.e. its document is a Draft (Post moves every line to `Posted`). The card greys both fields on it (spec §8: after Post everything is read-only).",
              "type": "boolean"
            },
            "from_lot": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "location": {
              "type": "string"
            },
            "lot_policy_id": {
              "description": "The SKU's lot policy when the line was added; POST refuses the line when the policy is another one now.",
              "format": "int64",
              "type": "integer"
            },
            "lot_transfer_id": {
              "format": "int64",
              "type": "integer"
            },
            "lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "serials": {
              "description": "The serials the line names, one a line.",
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/LotTransferLineStatus"
            },
            "to_lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "to_lot_created": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "transaction_log_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "available",
            "editable",
            "from_lot",
            "id",
            "line_no",
            "location",
            "lot_policy_id",
            "lot_transfer_id",
            "mod_when",
            "mod_who",
            "owner_id",
            "pack_id",
            "qty",
            "sku_code",
            "status",
            "uom",
            "version"
          ],
          "title": "LotTransferLineCard",
          "type": "object"
        }
      },
      "summary": "Get one lot transfer line as its form shows it (owner and container by code, quantity free now, serials).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:fb62e0eeeda1c5abc2c60e8a8975bf26c0ef1a0f400de6f953251b4092db8eb5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_transfer_line_attribute_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotTransferAttributeRow": {
              "description": "An attribute of a line as the grid shows it: the stored row flat, and the grid's primary key — `detail_id:attribute_code`, one cell per line and code. The row carries the line's version (`line_version`), which an edit of the cell is made against, and the line's status (`line_status`): the grid edits a row only while it is `Pending` (spec §8, `editable_when`) — a line is `Pending` exactly while its document is a Draft, Post moves every line to `Posted`.",
              "properties": {
                "attribute_code": {
                  "type": "string"
                },
                "detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "from_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "line_status": {
                  "$ref": "#/definitions/LotTransferLineStatus"
                },
                "line_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "lot_policy_attribute_id": {
                  "description": "`None` for the four dates (they are lot_policy columns, not rows).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "pk": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                },
                "sort_order": {
                  "format": "int32",
                  "type": "integer"
                },
                "to_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "attribute_code",
                "detail_id",
                "id",
                "line_status",
                "line_version",
                "pk",
                "required",
                "sort_order"
              ],
              "type": "object"
            },
            "LotTransferLineStatus": {
              "enum": [
                "Pending",
                "Posted"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/LotTransferAttributeRow"
          },
          "title": "Array_of_LotTransferAttributeRow",
          "type": "array"
        }
      },
      "summary": "List the lot attributes lines give their stock, filtered by line, with the grid key and line version.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_transfer",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:eeaa14440074a28c027360ed9ea4029c0d34c95269b98452b7cb70d2a2f4020b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_create_by_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "[`create_new_lot_by_attrs`] as a command: stateless (the person creates the lot whatever he saw before — it is what is in his hand), keyed for replay.",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_code": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "sku_code"
            ],
            "title": "CreateLotByAttributes",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The lot the attributes name, and whether this call made it.",
          "properties": {
            "created": {
              "description": "`false` when, under a «reuse matching lot» policy, a lot with exactly these attributes already existed — it is returned instead of a second.",
              "type": "boolean"
            },
            "lot": {
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            }
          },
          "required": [
            "created",
            "lot",
            "owner_id",
            "sku_code"
          ],
          "title": "NewLot",
          "type": "object"
        }
      },
      "summary": "A lot of these attributes, made as the SKU's lot policy says: the matching one or a new one (reuse), always a new one (per receipt, per receive event).",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "lot_by_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:969d1e4a08ad88f17426695749616e5db37bb444c98536175855461c80a6ae8c",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:8fd2630c88bbaba85c687ed003f5414e7e4214588e3d5b0fbefa09289c99896d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_attribute_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A SKU, and its owner when the code is several owners'.",
            "properties": {
              "owner_code": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "sku_code"
            ],
            "title": "LotSkuInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotPrompt": {
              "description": "One attribute to prompt for. The RF dynamic widget draws a field per prompt (`attrib_code` ending in `_date` → a date field) and sends the values as one map.",
              "properties": {
                "attrib_code": {
                  "type": "string"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "show": {
                  "type": "boolean"
                }
              },
              "required": [
                "attrib_code",
                "required",
                "show"
              ],
              "type": "object"
            }
          },
          "description": "The SKU's lot-policy prompts, twice: to SEARCH by (nothing required — a person types what he can read) and to CREATE with (required as the policy says).",
          "properties": {
            "ask_receipt": {
              "description": "Whether the search asks the receipt number on the label: only under a «one lot per receipt» / «one lot per receive event» policy, where lots of the same attributes are many by design and the receipt is what tells them apart. Under «reuse matching lot» the attributes do.",
              "type": "boolean"
            },
            "create_prompts": {
              "items": {
                "$ref": "#/definitions/LotPrompt"
              },
              "type": "array"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "search_prompts": {
              "items": {
                "$ref": "#/definitions/LotPrompt"
              },
              "type": "array"
            },
            "sku_code": {
              "type": "string"
            }
          },
          "required": [
            "ask_receipt",
            "create_prompts",
            "owner_id",
            "search_prompts",
            "sku_code"
          ],
          "title": "LotAttributeTemplate",
          "type": "object"
        }
      },
      "summary": "What a SKU's lot policy asks for: prompts to search a lot by and to create one with.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_by_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1f948fb46fdbfd3cb08cc387b0e3c3d23f0b9586e28ce449c29ec1c564d2098b",
      "x-quark-response-schema-hash": "sha256:3353677912c3a188cf8a260994356ada67b4729b7b053835ace430190e681d93",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "lot_search_by_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A SKU and what a person could read off the goods: the lot's attributes, and the receipt number its label carries.",
            "properties": {
              "lot_attributes": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "owner_code": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "receipt_number": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "sku_code"
            ],
            "title": "LotSearchInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LotFound": {
              "description": "One lot of the SKU: its number and everything that identifies it on the goods. No quantity — the count that searches for it is blind.",
              "properties": {
                "attributes": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "label": {
                  "description": "One line for a picker: the number, the receipt and its day, then each attribute the lot has.",
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "other_receipts": {
                  "description": "How many other receipts brought it.",
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt": {
                  "description": "The receipt the lot came in on — the one searched by, else its latest: what tells apart lots of the same attributes under a «lot per receipt» / «lot per receive event» policy (and the only thing that does for a SKU without any).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "received_on": {
                  "description": "The day `receipt` brought it.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "attributes",
                "label",
                "lot",
                "other_receipts",
                "owner_id",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LotFound"
          },
          "title": "Array_of_LotFound",
          "type": "array"
        }
      },
      "summary": "A SKU's lots matching the attributes and the receipt given, each with its receipts (no quantities); creates nothing.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "lot_by_attributes",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:09a3457b3bc8e60d5622db1d4e9ab72aef127d86a2f148ef3069358e033dd6bc",
      "x-quark-response-schema-hash": "sha256:356afa5752c237a34871b4bba64b5f30ddf04190f4ec0b4703de2ea3fe17b948",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "barcode_scan_parse",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The scan as the terminal holds it: AIM symbology prefix and GS separators included.",
            "properties": {
              "raw": {
                "type": "string"
              }
            },
            "required": [
              "raw"
            ],
            "title": "ScanToRead",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ScanValue": {
              "description": "One value of a scan, normalized as the pick confirmations read it: dates `YYYY-MM-DD` (day `00` is the month's last day), text upper-cased, a GTIN or SSCC with its check digit verified.",
              "properties": {
                "element": {
                  "description": "`lpn`, `gtin`, `internal_lot`, `serial`, `location`, or a lot attribute's code.",
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "element",
                "value"
              ],
              "type": "object"
            }
          },
          "description": "What one scan says: the format that claimed it and its values, in the order of `ScanElement` (LPN, GTIN, internal lot, serial, location, then lot attributes by code).",
          "properties": {
            "format": {
              "description": "The claiming format's name; `None` for a scan no format claims.",
              "type": [
                "string",
                "null"
              ]
            },
            "plain": {
              "description": "A scan no format claims: its code, trimmed and without the AIM symbology identifier a scanner may send for every label (`]E0` + EAN-13 is the EAN-13). `None` for a scan a format read.",
              "type": [
                "string",
                "null"
              ]
            },
            "values": {
              "items": {
                "$ref": "#/definitions/ScanValue"
              },
              "type": "array"
            }
          },
          "required": [
            "values"
          ],
          "title": "ScanReading",
          "type": "object"
        }
      },
      "summary": "Read one scan with the auto-detected barcode formats: the format that claimed it and its normalized values (GTIN, LPN, serial, internal lot, location, lot attributes). A scan no format claims has none; one a format claims and cannot read is refused BARCODE_UNREADABLE.",
      "tags": [
        {
          "name": "inventory"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "inventory",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "barcode_scan",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f962a6332e5c329dbec8a7dc590cca9003c63dd75bdae235abbf473615b4e61e",
      "x-quark-response-schema-hash": "sha256:f4b6b64ca4fa635cce9a0d614f3c4f0cdb5cb4d3d9e49b1f0e7771722908497b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "load_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "load_id"
            ],
            "title": "LoadIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadManifestUnit": {
              "properties": {
                "assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "container_ids": true,
                "load_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "description": "`None` for a consolidated pallet of several orders (H2): its orders are its unit's (`outbound_flow_unit_order`).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "root_code": {
                  "type": "string"
                },
                "root_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "unit_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "assignment_version",
                "container_ids",
                "load_id",
                "outbound_flow_unit_id",
                "planned_sequence",
                "root_code",
                "root_container_id",
                "stop_id",
                "stop_sequence",
                "unit_version"
              ],
              "type": "object"
            },
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadUnitFact": {
              "properties": {
                "actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "content_snapshot": true,
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "load_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "loaded_at": {
                  "type": "string"
                },
                "loaded_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "description": "`None` for a pallet of several orders.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result": true,
                "root_code": {
                  "type": "string"
                },
                "root_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "actual_sequence",
                "content_snapshot",
                "id",
                "load_id",
                "loaded_at",
                "loaded_by",
                "outbound_flow_unit_id",
                "result",
                "root_code",
                "root_container_id",
                "stop_id"
              ],
              "type": "object"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundLoad": {
              "properties": {
                "active_stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "door_location_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "frozen_plan_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_staged": {
                  "type": "boolean"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LoadStatus"
                },
                "transport_confirmed": {
                  "type": "boolean"
                },
                "transport_external_ref": {
                  "type": "string"
                },
                "transport_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "dispatch_id",
                "frozen_plan_version",
                "id",
                "last_actual_sequence",
                "load_plan_id",
                "opened_at",
                "opened_by",
                "require_staged",
                "sequence_policy",
                "status",
                "transport_confirmed",
                "transport_external_ref",
                "transport_unit_id",
                "version"
              ],
              "type": "object"
            },
            "TransportUnit": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "kind": {
                  "$ref": "#/definitions/TransportUnitKind"
                },
                "plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "external_ref",
                "id",
                "kind",
                "version"
              ],
              "type": "object"
            },
            "TransportUnitKind": {
              "enum": [
                "Truck",
                "Trailer",
                "Container",
                "SwapBody",
                "CourierCage"
              ],
              "type": "string"
            }
          },
          "properties": {
            "load": {
              "$ref": "#/definitions/OutboundLoad"
            },
            "loaded": {
              "items": {
                "$ref": "#/definitions/LoadUnitFact"
              },
              "type": "array"
            },
            "loaded_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "manifest": {
              "items": {
                "$ref": "#/definitions/LoadManifestUnit"
              },
              "type": "array"
            },
            "remaining_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "required_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "transport": {
              "$ref": "#/definitions/TransportUnit"
            }
          },
          "required": [
            "load",
            "loaded",
            "loaded_count",
            "manifest",
            "remaining_count",
            "required_count",
            "transport"
          ],
          "title": "LoadDetails",
          "type": "object"
        }
      },
      "summary": "Read current Load, transport, static manifest and membership from one snapshot.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2b5cd2e4b42ff3e9804099804c883c323a015ef3e37f5952631e703df604b751",
      "x-quark-response-schema-hash": "sha256:4999128b61d4e02a80bfb9d86e7c510bd0cadbc6f58630e9a83ac9ab396f28af",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_lookup",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "load_code": {
                "type": "string"
              }
            },
            "required": [
              "load_code"
            ],
            "title": "LoadCodeInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadManifestUnit": {
              "properties": {
                "assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "container_ids": true,
                "load_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "description": "`None` for a consolidated pallet of several orders (H2): its orders are its unit's (`outbound_flow_unit_order`).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "root_code": {
                  "type": "string"
                },
                "root_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "unit_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "assignment_version",
                "container_ids",
                "load_id",
                "outbound_flow_unit_id",
                "planned_sequence",
                "root_code",
                "root_container_id",
                "stop_id",
                "stop_sequence",
                "unit_version"
              ],
              "type": "object"
            },
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadUnitFact": {
              "properties": {
                "actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "content_snapshot": true,
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "load_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "loaded_at": {
                  "type": "string"
                },
                "loaded_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "description": "`None` for a pallet of several orders.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result": true,
                "root_code": {
                  "type": "string"
                },
                "root_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "actual_sequence",
                "content_snapshot",
                "id",
                "load_id",
                "loaded_at",
                "loaded_by",
                "outbound_flow_unit_id",
                "result",
                "root_code",
                "root_container_id",
                "stop_id"
              ],
              "type": "object"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundLoad": {
              "properties": {
                "active_stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "door_location_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "frozen_plan_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_staged": {
                  "type": "boolean"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LoadStatus"
                },
                "transport_confirmed": {
                  "type": "boolean"
                },
                "transport_external_ref": {
                  "type": "string"
                },
                "transport_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "dispatch_id",
                "frozen_plan_version",
                "id",
                "last_actual_sequence",
                "load_plan_id",
                "opened_at",
                "opened_by",
                "require_staged",
                "sequence_policy",
                "status",
                "transport_confirmed",
                "transport_external_ref",
                "transport_unit_id",
                "version"
              ],
              "type": "object"
            },
            "TransportUnit": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "kind": {
                  "$ref": "#/definitions/TransportUnitKind"
                },
                "plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "external_ref",
                "id",
                "kind",
                "version"
              ],
              "type": "object"
            },
            "TransportUnitKind": {
              "enum": [
                "Truck",
                "Trailer",
                "Container",
                "SwapBody",
                "CourierCage"
              ],
              "type": "string"
            }
          },
          "properties": {
            "load": {
              "$ref": "#/definitions/OutboundLoad"
            },
            "loaded": {
              "items": {
                "$ref": "#/definitions/LoadUnitFact"
              },
              "type": "array"
            },
            "loaded_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "manifest": {
              "items": {
                "$ref": "#/definitions/LoadManifestUnit"
              },
              "type": "array"
            },
            "remaining_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "required_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "transport": {
              "$ref": "#/definitions/TransportUnit"
            }
          },
          "required": [
            "load",
            "loaded",
            "loaded_count",
            "manifest",
            "remaining_count",
            "required_count",
            "transport"
          ],
          "title": "LoadDetails",
          "type": "object"
        }
      },
      "summary": "Look up an exact Load label without changing progress or stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6b2f169bd77cc6c3278dad79977d139ce6a12faeda332ec781e5bd3a970838d7",
      "x-quark-response-schema-hash": "sha256:4999128b61d4e02a80bfb9d86e7c510bd0cadbc6f58630e9a83ac9ab396f28af",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_unit_review",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "load_id": {
                "format": "int64",
                "type": "integer"
              },
              "scanned_root_code": {
                "type": "string"
              }
            },
            "required": [
              "load_id",
              "scanned_root_code"
            ],
            "title": "LoadUnitScanInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadManifestUnit": {
              "properties": {
                "assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "container_ids": true,
                "load_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "description": "`None` for a consolidated pallet of several orders (H2): its orders are its unit's (`outbound_flow_unit_order`).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "root_code": {
                  "type": "string"
                },
                "root_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "unit_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "assignment_version",
                "container_ids",
                "load_id",
                "outbound_flow_unit_id",
                "planned_sequence",
                "root_code",
                "root_container_id",
                "stop_id",
                "stop_sequence",
                "unit_version"
              ],
              "type": "object"
            },
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundLoad": {
              "properties": {
                "active_stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "door_location_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "frozen_plan_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_staged": {
                  "type": "boolean"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LoadStatus"
                },
                "transport_confirmed": {
                  "type": "boolean"
                },
                "transport_external_ref": {
                  "type": "string"
                },
                "transport_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "dispatch_id",
                "frozen_plan_version",
                "id",
                "last_actual_sequence",
                "load_plan_id",
                "opened_at",
                "opened_by",
                "require_staged",
                "sequence_policy",
                "status",
                "transport_confirmed",
                "transport_external_ref",
                "transport_unit_id",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "current_location": {
              "type": "string"
            },
            "load": {
              "$ref": "#/definitions/OutboundLoad"
            },
            "next_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "serial_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "unit": {
              "$ref": "#/definitions/LoadManifestUnit"
            }
          },
          "required": [
            "current_location",
            "load",
            "next_actual_sequence",
            "qty",
            "serial_count",
            "unit"
          ],
          "title": "LoadUnitReview",
          "type": "object"
        }
      },
      "summary": "Validate a scanned physical root and show its card; no Loading commitment.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a5933a0dc7ee45709136ed1ee294e497dd91136b34438ec69a3d93a731413591",
      "x-quark-response-schema-hash": "sha256:6a53edf5e160be1d5e5d6c9ea2eca3f4ff923a86c658828662a2635563a09e27",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_header_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active_stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "door_location_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "frozen_plan_version": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "load_plan_id": {
              "format": "int64",
              "type": "integer"
            },
            "opened_at": {
              "type": "string"
            },
            "opened_by": {
              "format": "int64",
              "type": "integer"
            },
            "require_staged": {
              "type": "boolean"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LoadStatus"
            },
            "transport_confirmed": {
              "type": "boolean"
            },
            "transport_external_ref": {
              "type": "string"
            },
            "transport_unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "dispatch_id",
            "frozen_plan_version",
            "id",
            "last_actual_sequence",
            "load_plan_id",
            "opened_at",
            "opened_by",
            "require_staged",
            "sequence_policy",
            "status",
            "transport_confirmed",
            "transport_external_ref",
            "transport_unit_id",
            "version"
          ],
          "title": "OutboundLoad",
          "type": "object"
        }
      },
      "summary": "Read a flat Load header and its version without advancing physical loading or shipment.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:fc81b05051051f0b0dc7e8d48e019e03553a24e3be2b7c4a2ab0dacd39db9ec2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_header_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundLoad": {
              "properties": {
                "active_stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "door_location_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "frozen_plan_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_staged": {
                  "type": "boolean"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LoadStatus"
                },
                "transport_confirmed": {
                  "type": "boolean"
                },
                "transport_external_ref": {
                  "type": "string"
                },
                "transport_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "dispatch_id",
                "frozen_plan_version",
                "id",
                "last_actual_sequence",
                "load_plan_id",
                "opened_at",
                "opened_by",
                "require_staged",
                "sequence_policy",
                "status",
                "transport_confirmed",
                "transport_external_ref",
                "transport_unit_id",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OutboundLoad"
          },
          "title": "Array_of_OutboundLoad",
          "type": "array"
        }
      },
      "summary": "Filter and page Load headers; no claims, loading facts or Goods Issue.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7652a12d062177b297abb2175e6841f4b065c647d6e3935cfd8d1ad46c636620",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "transport_unit_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TransportUnitKind": {
              "enum": [
                "Truck",
                "Trailer",
                "Container",
                "SwapBody",
                "CourierCage"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_ref": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "kind": {
              "$ref": "#/definitions/TransportUnitKind"
            },
            "plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "external_ref",
            "id",
            "kind",
            "version"
          ],
          "title": "TransportUnit",
          "type": "object"
        }
      },
      "summary": "Read a transport resource card without changing or claiming it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:81bc4bb89ebc4f4b15f9178f0ee84b14db51833459ca2e595e2b49e045cc86e1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "transport_unit_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TransportUnit": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "kind": {
                  "$ref": "#/definitions/TransportUnitKind"
                },
                "plate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "external_ref",
                "id",
                "kind",
                "version"
              ],
              "type": "object"
            },
            "TransportUnitKind": {
              "enum": [
                "Truck",
                "Trailer",
                "Container",
                "SwapBody",
                "CourierCage"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/TransportUnit"
          },
          "title": "Array_of_TransportUnit",
          "type": "array"
        }
      },
      "summary": "List transport resources with ordinary list filtering and pagination; no loading claims.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b7be9d9fcd4ad521216dddf0cde897ae84547cb78c11ff872000b073fd1022a8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "transport_unit_register",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "TransportUnitKind": {
                "enum": [
                  "Truck",
                  "Trailer",
                  "Container",
                  "SwapBody",
                  "CourierCage"
                ],
                "type": "string"
              }
            },
            "properties": {
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "external_ref": {
                "type": "string"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "kind": {
                "$ref": "#/definitions/TransportUnitKind"
              },
              "plate": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "external_ref",
              "kind"
            ],
            "title": "RegisterTransportUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TransportUnitKind": {
              "enum": [
                "Truck",
                "Trailer",
                "Container",
                "SwapBody",
                "CourierCage"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_ref": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "kind": {
              "$ref": "#/definitions/TransportUnitKind"
            },
            "plate": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "external_ref",
            "id",
            "kind",
            "version"
          ],
          "title": "TransportUnit",
          "type": "object"
        }
      },
      "summary": "Register a transport resource, never a warehouse container.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:77a16b6347ed18133947a25aa13c2c326ce17438d2b45756dbc8738374a3cde4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:81bc4bb89ebc4f4b15f9178f0ee84b14db51833459ca2e595e2b49e045cc86e1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_transport_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "transport_unit_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_plan_version",
              "expected_transport_version",
              "load_plan_id",
              "transport_unit_id"
            ],
            "title": "OpenLoad",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active_stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "door_location_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "frozen_plan_version": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "load_plan_id": {
              "format": "int64",
              "type": "integer"
            },
            "opened_at": {
              "type": "string"
            },
            "opened_by": {
              "format": "int64",
              "type": "integer"
            },
            "require_staged": {
              "type": "boolean"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LoadStatus"
            },
            "transport_confirmed": {
              "type": "boolean"
            },
            "transport_external_ref": {
              "type": "string"
            },
            "transport_unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "dispatch_id",
            "frozen_plan_version",
            "id",
            "last_actual_sequence",
            "load_plan_id",
            "opened_at",
            "opened_by",
            "require_staged",
            "sequence_policy",
            "status",
            "transport_confirmed",
            "transport_external_ref",
            "transport_unit_id",
            "version"
          ],
          "title": "OutboundLoad",
          "type": "object"
        }
      },
      "summary": "Open Load from a reviewed Frozen plan and registered transport.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8851760c893c2f7aceec9b01b3922676b5c758cd3c45454c351ee6040f1d1db4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fc81b05051051f0b0dc7e8d48e019e03553a24e3be2b7c4a2ab0dacd39db9ec2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        },
        {
          "entity": "transport_unit",
          "id_field": "transport_unit_id",
          "version_field": "expected_transport_version"
        }
      ]
    },
    {
      "name": "load_unit_remove",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_load_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_id": {
                "format": "int64",
                "type": "integer"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              },
              "scanned_root_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_load_version",
              "load_id",
              "outbound_flow_unit_id",
              "reason",
              "scanned_root_code"
            ],
            "title": "RemoveLoadUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active_stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "door_location_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "frozen_plan_version": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "load_plan_id": {
              "format": "int64",
              "type": "integer"
            },
            "opened_at": {
              "type": "string"
            },
            "opened_by": {
              "format": "int64",
              "type": "integer"
            },
            "require_staged": {
              "type": "boolean"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LoadStatus"
            },
            "transport_confirmed": {
              "type": "boolean"
            },
            "transport_external_ref": {
              "type": "string"
            },
            "transport_unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "dispatch_id",
            "frozen_plan_version",
            "id",
            "last_actual_sequence",
            "load_plan_id",
            "opened_at",
            "opened_by",
            "require_staged",
            "sequence_policy",
            "status",
            "transport_confirmed",
            "transport_external_ref",
            "transport_unit_id",
            "version"
          ],
          "title": "OutboundLoad",
          "type": "object"
        }
      },
      "summary": "Controlled physical unload acknowledgment with required scan/reason; preserve history and stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:029d52ed9e1aab891f2719fbbca7e0ee3ffde04659610bb4765a99fa5d9f7dad",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fc81b05051051f0b0dc7e8d48e019e03553a24e3be2b7c4a2ab0dacd39db9ec2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_load",
          "id_field": "load_id",
          "version_field": "expected_load_version"
        }
      ]
    },
    {
      "name": "load_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_load_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "expected_load_version",
              "load_id",
              "reason"
            ],
            "title": "CancelLoad",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active_stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "door_location_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "frozen_plan_version": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "load_plan_id": {
              "format": "int64",
              "type": "integer"
            },
            "opened_at": {
              "type": "string"
            },
            "opened_by": {
              "format": "int64",
              "type": "integer"
            },
            "require_staged": {
              "type": "boolean"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LoadStatus"
            },
            "transport_confirmed": {
              "type": "boolean"
            },
            "transport_external_ref": {
              "type": "string"
            },
            "transport_unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "dispatch_id",
            "frozen_plan_version",
            "id",
            "last_actual_sequence",
            "load_plan_id",
            "opened_at",
            "opened_by",
            "require_staged",
            "sequence_policy",
            "status",
            "transport_confirmed",
            "transport_external_ref",
            "transport_unit_id",
            "version"
          ],
          "title": "OutboundLoad",
          "type": "object"
        }
      },
      "summary": "Cancel an empty not-shipped Load after all physical units were explicitly unloaded.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:35b71b4a4affcb34a0fe3652badf2f55d96c86661a3e307d1470bcfc36597c56",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fc81b05051051f0b0dc7e8d48e019e03553a24e3be2b7c4a2ab0dacd39db9ec2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_load",
          "id_field": "load_id",
          "version_field": "expected_load_version"
        }
      ]
    },
    {
      "name": "load_start",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_load_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_id": {
                "format": "int64",
                "type": "integer"
              },
              "scanned_transport_ref": {
                "type": "string"
              }
            },
            "required": [
              "expected_load_version",
              "load_id",
              "scanned_transport_ref"
            ],
            "title": "StartLoad",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active_stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "door_location_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "frozen_plan_version": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "load_plan_id": {
              "format": "int64",
              "type": "integer"
            },
            "opened_at": {
              "type": "string"
            },
            "opened_by": {
              "format": "int64",
              "type": "integer"
            },
            "require_staged": {
              "type": "boolean"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LoadStatus"
            },
            "transport_confirmed": {
              "type": "boolean"
            },
            "transport_external_ref": {
              "type": "string"
            },
            "transport_unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "dispatch_id",
            "frozen_plan_version",
            "id",
            "last_actual_sequence",
            "load_plan_id",
            "opened_at",
            "opened_by",
            "require_staged",
            "sequence_policy",
            "status",
            "transport_confirmed",
            "transport_external_ref",
            "transport_unit_id",
            "version"
          ],
          "title": "OutboundLoad",
          "type": "object"
        }
      },
      "summary": "Confirm the reviewed Load's exact transport before loading units.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:93fee6e77656808afd62285764af86b30470252424fa33cecba952f7edcebd2a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fc81b05051051f0b0dc7e8d48e019e03553a24e3be2b7c4a2ab0dacd39db9ec2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_load",
          "id_field": "load_id",
          "version_field": "expected_load_version"
        }
      ]
    },
    {
      "name": "load_unit_confirm",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_load_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_id": {
                "format": "int64",
                "type": "integer"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "scanned_root_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_load_version",
              "load_id",
              "outbound_flow_unit_id",
              "scanned_root_code"
            ],
            "title": "ConfirmLoadUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadUnitFact": {
              "properties": {
                "actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "content_snapshot": true,
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "load_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "loaded_at": {
                  "type": "string"
                },
                "loaded_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "description": "`None` for a pallet of several orders.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "result": true,
                "root_code": {
                  "type": "string"
                },
                "root_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "actual_sequence",
                "content_snapshot",
                "id",
                "load_id",
                "loaded_at",
                "loaded_by",
                "outbound_flow_unit_id",
                "result",
                "root_code",
                "root_container_id",
                "stop_id"
              ],
              "type": "object"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundLoad": {
              "properties": {
                "active_stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "door_location_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "frozen_plan_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_staged": {
                  "type": "boolean"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LoadStatus"
                },
                "transport_confirmed": {
                  "type": "boolean"
                },
                "transport_external_ref": {
                  "type": "string"
                },
                "transport_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "dispatch_id",
                "frozen_plan_version",
                "id",
                "last_actual_sequence",
                "load_plan_id",
                "opened_at",
                "opened_by",
                "require_staged",
                "sequence_policy",
                "status",
                "transport_confirmed",
                "transport_external_ref",
                "transport_unit_id",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "fact": {
              "$ref": "#/definitions/LoadUnitFact"
            },
            "load": {
              "$ref": "#/definitions/OutboundLoad"
            }
          },
          "required": [
            "fact",
            "load"
          ],
          "title": "ConfirmLoadUnitResult",
          "type": "object"
        }
      },
      "summary": "Confirm the scanned reviewed unit against current sequence/content; Loaded is not Shipped.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b5dd56125a3dae54ba0f98b50037419d7fa75b8b90fda6da8fe59514655123d3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:50c0a8cefa5ff8496e2079c977f2a4d4335ea34403992ec075a1cc8062ddae4a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_load",
          "id_field": "load_id",
          "version_field": "expected_load_version"
        }
      ]
    },
    {
      "name": "load_complete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_load_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_load_version",
              "load_id"
            ],
            "title": "CompleteLoad",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active_stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "door_location_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "frozen_plan_version": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_actual_sequence": {
              "format": "int32",
              "type": "integer"
            },
            "load_plan_id": {
              "format": "int64",
              "type": "integer"
            },
            "opened_at": {
              "type": "string"
            },
            "opened_by": {
              "format": "int64",
              "type": "integer"
            },
            "require_staged": {
              "type": "boolean"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "shipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/LoadStatus"
            },
            "transport_confirmed": {
              "type": "boolean"
            },
            "transport_external_ref": {
              "type": "string"
            },
            "transport_unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "dispatch_id",
            "frozen_plan_version",
            "id",
            "last_actual_sequence",
            "load_plan_id",
            "opened_at",
            "opened_by",
            "require_staged",
            "sequence_policy",
            "status",
            "transport_confirmed",
            "transport_external_ref",
            "transport_unit_id",
            "version"
          ],
          "title": "OutboundLoad",
          "type": "object"
        }
      },
      "summary": "Complete all required units only after rechecking their immutable content.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b0d33fd95663396072f7eff546ddb7d90bc0724017cdeef7ade8705c2c246d1b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:fc81b05051051f0b0dc7e8d48e019e03553a24e3be2b7c4a2ab0dacd39db9ec2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_load",
          "id_field": "load_id",
          "version_field": "expected_load_version"
        }
      ]
    },
    {
      "name": "confirm_shipment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_load_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_load_version",
              "load_id"
            ],
            "title": "ConfirmShipment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadStatus": {
              "enum": [
                "Open",
                "Loading",
                "Loaded",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundLoad": {
              "properties": {
                "active_stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "door_location_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "frozen_plan_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_actual_sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "require_staged": {
                  "type": "boolean"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "shipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/LoadStatus"
                },
                "transport_confirmed": {
                  "type": "boolean"
                },
                "transport_external_ref": {
                  "type": "string"
                },
                "transport_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "dispatch_id",
                "frozen_plan_version",
                "id",
                "last_actual_sequence",
                "load_plan_id",
                "opened_at",
                "opened_by",
                "require_staged",
                "sequence_policy",
                "status",
                "transport_confirmed",
                "transport_external_ref",
                "transport_unit_id",
                "version"
              ],
              "type": "object"
            },
            "ShipShipmentOrderResult": {
              "properties": {
                "already_committed": {
                  "type": "boolean"
                },
                "close_summary": true,
                "goods_issue_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "journal_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "new_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "order_closed": {
                  "default": true,
                  "type": "boolean"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "remaining_quantities": {
                  "default": [],
                  "items": {
                    "items": [
                      {
                        "format": "int64",
                        "type": "integer"
                      },
                      {
                        "format": "double",
                        "type": "number"
                      }
                    ],
                    "maxItems": 2,
                    "minItems": 2,
                    "type": "array"
                  },
                  "type": "array"
                },
                "serial_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "shipped_quantities": {
                  "items": {
                    "items": [
                      {
                        "format": "int64",
                        "type": "integer"
                      },
                      {
                        "format": "double",
                        "type": "number"
                      }
                    ],
                    "maxItems": 2,
                    "minItems": 2,
                    "type": "array"
                  },
                  "type": "array"
                }
              },
              "required": [
                "already_committed",
                "close_summary",
                "goods_issue_id",
                "journal_ids",
                "new_version",
                "order_id",
                "serial_ids",
                "shipped_quantities"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_committed": {
              "type": "boolean"
            },
            "load": {
              "$ref": "#/definitions/OutboundLoad"
            },
            "orders": {
              "items": {
                "$ref": "#/definitions/ShipShipmentOrderResult"
              },
              "type": "array"
            }
          },
          "required": [
            "already_committed",
            "load",
            "orders"
          ],
          "title": "ConfirmShipmentResult",
          "type": "object"
        }
      },
      "summary": "Irreversible complete-Load Goods Issue: atomic stock, serials, Orders, Load and Dispatch.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "loading",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:17bd424db314341cd34d25665a008fa54201de1b12028650441c2161fe368087",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f77ad8df13832d2e417165eca869317f47a0c97cc7d884137ed2f06c27b2f55e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_load",
          "id_field": "load_id",
          "version_field": "expected_load_version"
        }
      ]
    },
    {
      "name": "load_plan_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "load_plan_id"
            ],
            "title": "LoadPlanIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DispatchStop": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "destination_ref": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_arrival_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_type": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "destination_ref",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "sequence",
                "stop_type"
              ],
              "type": "object"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanEntry": {
              "properties": {
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_order_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "frozen_unit_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "load_plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "dispatch_id",
                "load_plan_id",
                "outbound_flow_unit_id",
                "sequence",
                "stop_id",
                "unit_assignment_version"
              ],
              "type": "object"
            },
            "LoadPlanGroup": {
              "properties": {
                "load_order": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "stop": {
                  "$ref": "#/definitions/DispatchStop"
                },
                "units": {
                  "items": {
                    "$ref": "#/definitions/LoadPlanUnit"
                  },
                  "type": "array"
                }
              },
              "required": [
                "stop",
                "units"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadPlanUnit": {
              "properties": {
                "assignment": {
                  "$ref": "#/definitions/OutboundUnitAssignment"
                },
                "container_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "current_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "nested_units": {
                  "type": "boolean"
                },
                "packing_open": {
                  "type": "boolean"
                },
                "unit": {
                  "$ref": "#/definitions/OutboundFlowUnit"
                }
              },
              "required": [
                "assignment",
                "nested_units",
                "packing_open",
                "unit"
              ],
              "type": "object"
            },
            "LoadPlanUnitEntry": {
              "properties": {
                "current": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LoadPlanUnit"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "None for a missing/Consumed/child/foreign-dispatch subject. Its saved identity remains visible, rather than silently shrinking the plan."
                },
                "entry": {
                  "$ref": "#/definitions/LoadPlanEntry"
                },
                "matches_assignment": {
                  "type": "boolean"
                }
              },
              "required": [
                "entry",
                "matches_assignment"
              ],
              "type": "object"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "entries": {
              "items": {
                "$ref": "#/definitions/LoadPlanUnitEntry"
              },
              "type": "array"
            },
            "groups": {
              "items": {
                "$ref": "#/definitions/LoadPlanGroup"
              },
              "type": "array"
            },
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            },
            "unplanned_units": {
              "items": {
                "$ref": "#/definitions/LoadPlanUnit"
              },
              "type": "array"
            }
          },
          "required": [
            "entries",
            "groups",
            "plan",
            "unplanned_units"
          ],
          "title": "LoadPlanDetails",
          "type": "object"
        }
      },
      "summary": "Get stop groups and current physical planning members (not load authorization).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0c63e368c22e420a2081b19567b0895559ca85fbfa8d2b21f3f3a9e2c8c412b3",
      "x-quark-response-schema-hash": "sha256:7e656e2fc534ff3c08c2f2f576a18e880762cab8f4c9ea296f8b5afc63a83a80",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_plan_header_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "dispatch_id": {
              "format": "int64",
              "type": "integer"
            },
            "frozen_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "generated_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "mode": {
              "$ref": "#/definitions/LoadPlanMode"
            },
            "sequence_policy": {
              "$ref": "#/definitions/LoadingSequencePolicy"
            },
            "status": {
              "$ref": "#/definitions/LoadPlanStatus"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "dispatch_id",
            "id",
            "mod_when",
            "mod_who",
            "mode",
            "sequence_policy",
            "status",
            "version"
          ],
          "title": "LoadPlan",
          "type": "object"
        }
      },
      "summary": "Read a flat Load Plan header and its seen version without advancing it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:9e5fdc4ed2e1d30540480272f194772bd025e767cb25889530eebbb2fc4863b2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_plan_header_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/LoadPlan"
          },
          "title": "Array_of_LoadPlan",
          "type": "array"
        }
      },
      "summary": "Filter and page Load Plan headers; no membership or physical execution change.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:1ca3b9ce99ff9ec6e3f940e303d762138304bb2238d4a37f8a9672d4f9937e60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_plan_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LoadingSequencePolicy": {
                "enum": [
                  "ReverseStop",
                  "ForwardStop",
                  "StopGroup",
                  "Explicit",
                  "Unrestricted"
                ],
                "type": "string"
              }
            },
            "properties": {
              "code": {
                "default": null,
                "description": "Reserved by the New form through `get_next_key`. API callers that do not open the form keep working: the command uses the same key service.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "sequence_policy": {
                "$ref": "#/definitions/LoadingSequencePolicy"
              }
            },
            "required": [
              "dispatch_id",
              "sequence_policy"
            ],
            "title": "CreateLoadPlan",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Create a working Load Plan (Explicit policy selects ExplicitUnit mode).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7f6002af56ad9b59e84f9936a4440d4d1a3ec063548b0547e7a98e39d5107d3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "load_plan_generate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_plan_version",
              "load_plan_id"
            ],
            "title": "GenerateLoadPlan",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Generate stop groups on a Planned Dispatch; explicit units remain manually selected.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3c1a0ea484a3cce9434797d2d71513f75e6f09410acfa6392e84cb5f6e67b5cc",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        }
      ]
    },
    {
      "name": "load_plan_add_unit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_assignment_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_unit_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_assignment_version",
              "expected_plan_version",
              "expected_unit_version",
              "load_plan_id",
              "outbound_flow_unit_id"
            ],
            "title": "AddLoadPlanUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Add a current root from the seen unit and transport cards to an ExplicitUnit plan.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:98630ee9cc9138cd6597e5a9dff3319b3089087d9df1c1c847f53053d9e8bea5",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        },
        {
          "entity": "outbound_flow_unit",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_unit_version"
        },
        {
          "entity": "outbound_unit_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_assignment_version"
        }
      ]
    },
    {
      "name": "load_plan_remove_unit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_plan_version",
              "load_plan_id",
              "outbound_flow_unit_id"
            ],
            "title": "RemoveLoadPlanUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Remove an explicit planning member, without touching stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:48afb44de331a7dc381292075b7d877c1e4ae9c30745b0b6255fb54d53b0e460",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        }
      ]
    },
    {
      "name": "load_plan_resequence",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "ordered_unit_ids": {
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "expected_plan_version",
              "load_plan_id",
              "ordered_unit_ids"
            ],
            "title": "ResequenceLoadPlan",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Replace the complete explicit unit order.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:882c4a0f36dae901367ab668004aac562c2d3593fb827f918c979cedd5280a80",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        }
      ]
    },
    {
      "name": "load_plan_set_position",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "position": {
                "description": "Explicit null clears; omission is not an instruction to clear.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "expected_plan_version",
              "load_plan_id",
              "outbound_flow_unit_id",
              "position"
            ],
            "title": "SetLoadPlanPosition",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Set an intended transport position, or explicitly clear it with null.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:145ae6c25ad9df98c4c8c6eab30280a2476d414ace4ab165d882d2e8dcb724aa",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        }
      ]
    },
    {
      "name": "load_plan_freeze",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LoadPlanUnitExpectation": {
                "description": "Reviewed membership and versions; checked as a complete collection.",
                "properties": {
                  "expected_assignment_version": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "expected_unit_version": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "outbound_flow_unit_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "expected_assignment_version",
                  "expected_unit_version",
                  "outbound_flow_unit_id"
                ],
                "type": "object"
              }
            },
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "units": {
                "items": {
                  "$ref": "#/definitions/LoadPlanUnitExpectation"
                },
                "type": "array"
              }
            },
            "required": [
              "expected_plan_version",
              "load_plan_id",
              "units"
            ],
            "title": "FreezeLoadPlan",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Freeze the reviewed complete unit set with per-unit/assignment version echoes; not Load authorization.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:31a54a101991ec03dbc0666716d411885d0b6a3ce6cc4df9cfae1eb5c33f1c0b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        }
      ]
    },
    {
      "name": "load_plan_reopen",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_plan_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "load_plan_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "expected_plan_version",
              "load_plan_id",
              "reason"
            ],
            "title": "ReopenLoadPlan",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LoadPlan": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "frozen_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "generated_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "mode": {
                  "$ref": "#/definitions/LoadPlanMode"
                },
                "sequence_policy": {
                  "$ref": "#/definitions/LoadingSequencePolicy"
                },
                "status": {
                  "$ref": "#/definitions/LoadPlanStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "mode",
                "sequence_policy",
                "status",
                "version"
              ],
              "type": "object"
            },
            "LoadPlanMode": {
              "enum": [
                "StopBased",
                "ExplicitUnit"
              ],
              "type": "string"
            },
            "LoadPlanStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Frozen",
                "Completed"
              ],
              "type": "string"
            },
            "LoadingSequencePolicy": {
              "enum": [
                "ReverseStop",
                "ForwardStop",
                "StopGroup",
                "Explicit",
                "Unrestricted"
              ],
              "type": "string"
            }
          },
          "properties": {
            "plan": {
              "$ref": "#/definitions/LoadPlan"
            }
          },
          "required": [
            "plan"
          ],
          "title": "LoadPlanMutationResult",
          "type": "object"
        }
      },
      "summary": "Supervisor pre-Load replan with mandatory audited reason.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "load_plan",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7ff1bc2d2c84f80127a5cf8f18bd11fdb3a6d24406a0c350ae7ddfb706db153",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e8b7f9384f1f44fbe94a2b9f75f89880011b87e333fee8c3cb855bd0a68f7ab7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "load_plan",
          "id_field": "load_plan_id",
          "version_field": "expected_plan_version"
        }
      ]
    },
    {
      "name": "stage_unit_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "outbound_flow_unit_id"
            ],
            "title": "StageUnitInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Empty",
                    "Disposed",
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.",
                  "enum": [
                    "Planned"
                  ],
                  "type": "string"
                }
              ]
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "StageAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "stage_location_code",
                "stop_id",
                "unit_assignment_id",
                "unit_assignment_version",
                "version"
              ],
              "type": "object"
            },
            "StageExecution": {
              "properties": {
                "container_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "from_location_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "moved": {
                  "type": "boolean"
                },
                "operation_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "staged_at": {
                  "type": "string"
                },
                "staged_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "transfer_reason": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transferred_from_execution_id": {
                  "default": null,
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_ids",
                "dispatch_id",
                "from_location_code",
                "id",
                "moved",
                "operation_id",
                "outbound_flow_unit_id",
                "stage_assignment_id",
                "stage_assignment_version",
                "stage_location_code",
                "staged_at",
                "staged_by",
                "stop_id",
                "subject_container_id",
                "unit_assignment_id",
                "unit_assignment_version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "assignment_matches_transport": {
              "default": false,
              "description": "The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.",
              "type": "boolean"
            },
            "assignment_version": {
              "description": "Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.",
              "format": "int32",
              "type": "integer"
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/ContainerStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "current_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/DispatchStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "execution": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageExecution"
                },
                {
                  "type": "null"
                }
              ]
            },
            "is_current_root": {
              "type": "boolean"
            },
            "nested_units": {
              "type": "boolean"
            },
            "packing_open": {
              "type": "boolean"
            },
            "stage_committed": {
              "default": false,
              "description": "Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.",
              "type": "boolean"
            },
            "stop_sequence": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "transport_assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OutboundUnitAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "$ref": "#/definitions/OutboundFlowUnit"
            }
          },
          "required": [
            "assignment_version",
            "is_current_root",
            "nested_units",
            "packing_open",
            "unit"
          ],
          "title": "StageUnitState",
          "type": "object"
        }
      },
      "summary": "Read unit transport, Stage card, physical source and execution fact in one snapshot.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "staging",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f6db1356ed3776ecf0f6d76459c6bb1210b39e1502daeec83c543e49bbc478d7",
      "x-quark-response-schema-hash": "sha256:70b5170b3c635d6380fad12b0b50bb66ef8833cc7251d5bca5662ff7e8e9f443",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "stage_unit_lookup",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_code": {
                "type": "string"
              }
            },
            "required": [
              "container_code"
            ],
            "title": "StageUnitLabelInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Empty",
                    "Disposed",
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.",
                  "enum": [
                    "Planned"
                  ],
                  "type": "string"
                }
              ]
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "StageAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "stage_location_code",
                "stop_id",
                "unit_assignment_id",
                "unit_assignment_version",
                "version"
              ],
              "type": "object"
            },
            "StageExecution": {
              "properties": {
                "container_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "from_location_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "moved": {
                  "type": "boolean"
                },
                "operation_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "staged_at": {
                  "type": "string"
                },
                "staged_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "transfer_reason": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transferred_from_execution_id": {
                  "default": null,
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_ids",
                "dispatch_id",
                "from_location_code",
                "id",
                "moved",
                "operation_id",
                "outbound_flow_unit_id",
                "stage_assignment_id",
                "stage_assignment_version",
                "stage_location_code",
                "staged_at",
                "staged_by",
                "stop_id",
                "subject_container_id",
                "unit_assignment_id",
                "unit_assignment_version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "assignment_matches_transport": {
              "default": false,
              "description": "The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.",
              "type": "boolean"
            },
            "assignment_version": {
              "description": "Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.",
              "format": "int32",
              "type": "integer"
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/ContainerStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "current_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/DispatchStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "execution": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageExecution"
                },
                {
                  "type": "null"
                }
              ]
            },
            "is_current_root": {
              "type": "boolean"
            },
            "nested_units": {
              "type": "boolean"
            },
            "packing_open": {
              "type": "boolean"
            },
            "stage_committed": {
              "default": false,
              "description": "Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.",
              "type": "boolean"
            },
            "stop_sequence": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "transport_assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OutboundUnitAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "$ref": "#/definitions/OutboundFlowUnit"
            }
          },
          "required": [
            "assignment_version",
            "is_current_root",
            "nested_units",
            "packing_open",
            "unit"
          ],
          "title": "StageUnitState",
          "type": "object"
        }
      },
      "summary": "Find the exact live Stage root by container label, without changing assignment or stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "staging",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:11c5b70707af94521f6c0a9f9abe4f276511b749573314975451cc0cbb38f856",
      "x-quark-response-schema-hash": "sha256:70b5170b3c635d6380fad12b0b50bb66ef8833cc7251d5bca5662ff7e8e9f443",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "stage_unit_assign",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_assignment_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_stage_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "stage_location_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_assignment_version",
              "expected_stage_version",
              "outbound_flow_unit_id",
              "stage_location_code"
            ],
            "title": "AssignStageUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Empty",
                    "Disposed",
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.",
                  "enum": [
                    "Planned"
                  ],
                  "type": "string"
                }
              ]
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "StageAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "stage_location_code",
                "stop_id",
                "unit_assignment_id",
                "unit_assignment_version",
                "version"
              ],
              "type": "object"
            },
            "StageExecution": {
              "properties": {
                "container_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "from_location_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "moved": {
                  "type": "boolean"
                },
                "operation_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "staged_at": {
                  "type": "string"
                },
                "staged_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "transfer_reason": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transferred_from_execution_id": {
                  "default": null,
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_ids",
                "dispatch_id",
                "from_location_code",
                "id",
                "moved",
                "operation_id",
                "outbound_flow_unit_id",
                "stage_assignment_id",
                "stage_assignment_version",
                "stage_location_code",
                "staged_at",
                "staged_by",
                "stop_id",
                "subject_container_id",
                "unit_assignment_id",
                "unit_assignment_version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "assignment_matches_transport": {
              "default": false,
              "description": "The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.",
              "type": "boolean"
            },
            "assignment_version": {
              "description": "Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.",
              "format": "int32",
              "type": "integer"
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/ContainerStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "current_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/DispatchStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "execution": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageExecution"
                },
                {
                  "type": "null"
                }
              ]
            },
            "is_current_root": {
              "type": "boolean"
            },
            "nested_units": {
              "type": "boolean"
            },
            "packing_open": {
              "type": "boolean"
            },
            "stage_committed": {
              "default": false,
              "description": "Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.",
              "type": "boolean"
            },
            "stop_sequence": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "transport_assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OutboundUnitAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "$ref": "#/definitions/OutboundFlowUnit"
            }
          },
          "required": [
            "assignment_version",
            "is_current_root",
            "nested_units",
            "packing_open",
            "unit"
          ],
          "title": "StageUnitState",
          "type": "object"
        }
      },
      "summary": "Assign a ready physical root to an exact Stage without moving stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "staging",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:01481f3f2434189d01a8c207e2aaeb86e4a294145d47669b3916e985cbcd59c6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:70b5170b3c635d6380fad12b0b50bb66ef8833cc7251d5bca5662ff7e8e9f443",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_stage_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_stage_version"
        },
        {
          "entity": "outbound_unit_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_assignment_version"
        }
      ]
    },
    {
      "name": "stage_unit_confirm",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Directed execution based on the Stage card, not an unsolicited inventory observation: another assignment/source changes the operator's decision.",
            "properties": {
              "expected_from_location": {
                "type": "string"
              },
              "expected_stage_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "scanned_stage_location_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_from_location",
              "expected_stage_version",
              "outbound_flow_unit_id",
              "scanned_stage_location_code"
            ],
            "title": "ConfirmStageUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Empty",
                    "Disposed",
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.",
                  "enum": [
                    "Planned"
                  ],
                  "type": "string"
                }
              ]
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "StageAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "stage_location_code",
                "stop_id",
                "unit_assignment_id",
                "unit_assignment_version",
                "version"
              ],
              "type": "object"
            },
            "StageExecution": {
              "properties": {
                "container_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "from_location_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "moved": {
                  "type": "boolean"
                },
                "operation_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "staged_at": {
                  "type": "string"
                },
                "staged_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "transfer_reason": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transferred_from_execution_id": {
                  "default": null,
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_ids",
                "dispatch_id",
                "from_location_code",
                "id",
                "moved",
                "operation_id",
                "outbound_flow_unit_id",
                "stage_assignment_id",
                "stage_assignment_version",
                "stage_location_code",
                "staged_at",
                "staged_by",
                "stop_id",
                "subject_container_id",
                "unit_assignment_id",
                "unit_assignment_version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "assignment_matches_transport": {
              "default": false,
              "description": "The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.",
              "type": "boolean"
            },
            "assignment_version": {
              "description": "Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.",
              "format": "int32",
              "type": "integer"
            },
            "container_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "container_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/ContainerStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "current_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "dispatch_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/DispatchStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "execution": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StageExecution"
                },
                {
                  "type": "null"
                }
              ]
            },
            "is_current_root": {
              "type": "boolean"
            },
            "nested_units": {
              "type": "boolean"
            },
            "packing_open": {
              "type": "boolean"
            },
            "stage_committed": {
              "default": false,
              "description": "Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.",
              "type": "boolean"
            },
            "stop_sequence": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "transport_assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OutboundUnitAssignment"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "$ref": "#/definitions/OutboundFlowUnit"
            }
          },
          "required": [
            "assignment_version",
            "is_current_root",
            "nested_units",
            "packing_open",
            "unit"
          ],
          "title": "StageUnitState",
          "type": "object"
        }
      },
      "summary": "Confirm the assigned Stage and expected source, moving the entire picked root atomically.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "staging",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5966127603e3a2ea5087a4ed055cd671d69d5a772121c473fcfa763b7c004224",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:70b5170b3c635d6380fad12b0b50bb66ef8833cc7251d5bca5662ff7e8e9f443",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_stage_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_stage_version"
        }
      ]
    },
    {
      "name": "stage_unit_transfer",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Both mutable cards and the immutable evidence/target the supervisor saw. No physical destination is accepted: this operation retains the same Stage.",
            "properties": {
              "expected_assignment_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_execution_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_order_intent_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_stage_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "expected_assignment_version",
              "expected_execution_id",
              "expected_order_intent_id",
              "expected_stage_version",
              "outbound_flow_unit_id",
              "reason"
            ],
            "title": "TransferStagedUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Active",
                    "Empty",
                    "Disposed",
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Container has been minted by CreateCaseLevelAsn (ASN load) but the physical goods haven't arrived yet. Flipped to `Active` by ReceiveCaseLevelLine on first deposit. Container ops (Move/Restructure/Pick) should reject this status — the inventory_balances-empty guard is the de-facto enforcement until those commands gain explicit checks. See migration 164.",
                  "enum": [
                    "Planned"
                  ],
                  "type": "string"
                }
              ]
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "StageAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "stage_location_code",
                "stop_id",
                "unit_assignment_id",
                "unit_assignment_version",
                "version"
              ],
              "type": "object"
            },
            "StageExecution": {
              "properties": {
                "container_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "from_location_code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "moved": {
                  "type": "boolean"
                },
                "operation_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "stage_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "stage_location_code": {
                  "type": "string"
                },
                "staged_at": {
                  "type": "string"
                },
                "staged_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "transfer_reason": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transferred_from_execution_id": {
                  "default": null,
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_assignment_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_ids",
                "dispatch_id",
                "from_location_code",
                "id",
                "moved",
                "operation_id",
                "outbound_flow_unit_id",
                "stage_assignment_id",
                "stage_assignment_version",
                "stage_location_code",
                "staged_at",
                "staged_by",
                "stop_id",
                "subject_container_id",
                "unit_assignment_id",
                "unit_assignment_version"
              ],
              "type": "object"
            },
            "StageUnitState": {
              "properties": {
                "assignment": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/StageAssignment"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "assignment_matches_transport": {
                  "default": false,
                  "description": "The card pins the actual transport intent, not merely its Dispatch id. S1b ledger replies predate this projection; absence must not break replay.",
                  "type": "boolean"
                },
                "assignment_version": {
                  "description": "Zero denotes absence; echo this Stage entity, not Dispatch-wide OCC.",
                  "format": "int32",
                  "type": "integer"
                },
                "container_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/ContainerStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "current_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/DispatchStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "execution": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/StageExecution"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_current_root": {
                  "type": "boolean"
                },
                "nested_units": {
                  "type": "boolean"
                },
                "packing_open": {
                  "type": "boolean"
                },
                "stage_committed": {
                  "default": false,
                  "description": "Historical commitment remains authoritative even when an old/faulty writer made the current transport generation disagree with its proof.",
                  "type": "boolean"
                },
                "stop_sequence": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "transport_assignment": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/OutboundUnitAssignment"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unit": {
                  "$ref": "#/definitions/OutboundFlowUnit"
                }
              },
              "required": [
                "assignment_version",
                "is_current_root",
                "nested_units",
                "packing_open",
                "unit"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "$ref": "#/definitions/OutboundUnitAssignment"
            },
            "stage": {
              "$ref": "#/definitions/StageUnitState"
            }
          },
          "required": [
            "assignment",
            "stage"
          ],
          "title": "StageTransferResult",
          "type": "object"
        }
      },
      "summary": "Transfer an intact staged remainder from a completed trip to the current Planned Dispatch, preserving evidence and physical stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "staging",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:623717ad232963d7ef35ad8245da8ea60a754126dccdce9893f6c59db7a618ee",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:1bc23606bfe1e34eda1f9757cbfa7243e9b0ff5f79094b3150f3ac1d25623995",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_stage_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_stage_version"
        },
        {
          "entity": "outbound_unit_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_assignment_version"
        }
      ]
    },
    {
      "name": "create_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Authoring contract: every new policy is a draft. `active` is deliberately absent; publication is a separate validated command.",
            "properties": {
              "allow_overallocation": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "speed_pick_by_uom": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "strict_lot_rotation": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "AllocationPolicyCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_overallocation": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "speed_pick_by_uom": {
              "type": "boolean"
            },
            "strict_lot_rotation": {
              "type": "boolean"
            },
            "version": {
              "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "allow_overallocation",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "speed_pick_by_uom",
            "strict_lot_rotation",
            "version"
          ],
          "title": "AllocationPolicy",
          "type": "object"
        }
      },
      "summary": "Create an allocation policy whose steps are owned by the allocation pipeline.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:43201a4c7de626f4af8c241cccdfce3d3e3a90cedcf46f65334c82e6e69b8e79",
      "x-quark-response-schema-hash": "sha256:c1de80e20083d0dc37250f9d800e002db62a540c6303e851a427a3a58947cebd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_overallocation": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "speed_pick_by_uom": {
              "type": "boolean"
            },
            "strict_lot_rotation": {
              "type": "boolean"
            },
            "version": {
              "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "allow_overallocation",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "speed_pick_by_uom",
            "strict_lot_rotation",
            "version"
          ],
          "title": "AllocationPolicy",
          "type": "object"
        }
      },
      "summary": "Get a allocation_policy by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c1de80e20083d0dc37250f9d800e002db62a540c6303e851a427a3a58947cebd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllocationPolicy": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_overallocation": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "speed_pick_by_uom": {
                  "type": "boolean"
                },
                "strict_lot_rotation": {
                  "type": "boolean"
                },
                "version": {
                  "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "allow_overallocation",
                "code",
                "descr",
                "id",
                "mod_when",
                "mod_who",
                "speed_pick_by_uom",
                "strict_lot_rotation",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AllocationPolicy"
          },
          "title": "Array_of_AllocationPolicy",
          "type": "array"
        }
      },
      "summary": "List allocation_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:889ebfec178e072d478bcea5a4566ab28e35f65ebfd5effec9c62beaba5cf0ac",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "additionalProperties": false,
                "description": "Editable allocation-policy header fields.\n\n`code` is intentionally absent: it identifies the policy and is immutable after create. `name` keeps the three PATCH states because SQL NULL is a real value here; non-nullable fields reject JSON null.",
                "properties": {
                  "allow_overallocation": {
                    "type": "boolean"
                  },
                  "descr": {
                    "type": "string"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "speed_pick_by_uom": {
                    "type": "boolean"
                  },
                  "strict_lot_rotation": {
                    "type": "boolean"
                  }
                },
                "title": "AllocationPolicyHeaderUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_overallocation": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "speed_pick_by_uom": {
              "type": "boolean"
            },
            "strict_lot_rotation": {
              "type": "boolean"
            },
            "version": {
              "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "allow_overallocation",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "speed_pick_by_uom",
            "strict_lot_rotation",
            "version"
          ],
          "title": "AllocationPolicy",
          "type": "object"
        }
      },
      "summary": "Update an allocation policy header without overwriting a newer edit.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:608e7c93d3400935b577369c02bd9d1a31d50a6ee87bfa7d342dc6fda4335414",
      "x-quark-response-schema-hash": "sha256:c1de80e20083d0dc37250f9d800e002db62a540c6303e851a427a3a58947cebd",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "allocation_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "delete_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_overallocation": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "speed_pick_by_uom": {
              "type": "boolean"
            },
            "strict_lot_rotation": {
              "type": "boolean"
            },
            "version": {
              "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyBmc::bump_version_checked`].",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "allow_overallocation",
            "code",
            "descr",
            "id",
            "mod_when",
            "mod_who",
            "speed_pick_by_uom",
            "strict_lot_rotation",
            "version"
          ],
          "title": "AllocationPolicy",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced allocation policy and all of its owned steps.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c1de80e20083d0dc37250f9d800e002db62a540c6303e851a427a3a58947cebd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete unreferenced allocation policies and their owned steps.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_allocation_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count allocation_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_allocation_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "AllocSort": {
              "enum": [
                "LotRotation",
                "Location",
                "LpnQuantity",
                "Lpn",
                "LpnRotationInLoc",
                "LocationAbc"
              ],
              "type": "string"
            },
            "AllocationType": {
              "enum": [
                "Firm",
                "Soft",
                "SoftCartonization"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "LpnQtyRule": {
              "enum": [
                "Any",
                "EqPackPallet",
                "NePackPallet"
              ],
              "type": "string"
            },
            "QtyFit": {
              "enum": [
                "LowToHigh",
                "ExactFit",
                "BiggerFit",
                "BestFit",
                "HighToLow"
              ],
              "type": "string"
            }
          },
          "description": "A rule row of an allocation policy — migration 266's `sequence`/`active` plus the eight-column predicate (`allocation_type` … `qty_fit_rule`) and the four-deep `sort_1..sort_4` ordering. `sequence` is the execution order, never `rule_num`: `rule_num` is varchar(5) and sorts lexicographically ('10' before '2'), the same reasoning as `PutawayPolicyDetail::sequence` vs `step_num`.\n\n`Deserialize` mirrors `PutawayPolicyDetail`'s own derive, and for the same reason (see that struct's doc): the allocation step page in `web-ui-server` has no warehouse database of its own and reads this row back over `get_allocation_policy_detail`/`list_allocation_policy_detail`, needing the eight predicate axes and the four sort ranks as TYPES — not as strings it would otherwise have to re-parse from a generic `serde_json::Value`.",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "allocation_type": {
              "$ref": "#/definitions/AllocationType"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "location_abc": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AbcRotationSpeed"
                },
                {
                  "type": "null"
                }
              ]
            },
            "location_category": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocCategory"
                },
                {
                  "type": "null"
                }
              ]
            },
            "location_type": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LocType"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lpn_quantity_rule": {
              "$ref": "#/definitions/LpnQtyRule"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "one_pick_per_uom_location": {
              "type": "boolean"
            },
            "putawayzone": {
              "type": [
                "string",
                "null"
              ]
            },
            "qty_fit_rule": {
              "anyOf": [
                {
                  "$ref": "#/definitions/QtyFit"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rule_num": {
              "type": "string"
            },
            "sequence": {
              "format": "int32",
              "type": "integer"
            },
            "sort_1": {
              "$ref": "#/definitions/AllocSort"
            },
            "sort_2": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllocSort"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sort_3": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllocSort"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sort_4": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllocSort"
                },
                {
                  "type": "null"
                }
              ]
            },
            "uom_code": {
              "type": "string"
            },
            "version": {
              "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "allocation_policy_id",
            "allocation_type",
            "id",
            "lpn_quantity_rule",
            "mod_when",
            "mod_who",
            "one_pick_per_uom_location",
            "rule_num",
            "sequence",
            "sort_1",
            "uom_code",
            "version"
          ],
          "title": "AllocationPolicyDetail",
          "type": "object"
        }
      },
      "summary": "Get a allocation_policy_detail by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:41fe02fc1b475df797043e74b2f82ee7617431a5d422fcc93bc095836c8ad586",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_allocation_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "AllocSort": {
              "enum": [
                "LotRotation",
                "Location",
                "LpnQuantity",
                "Lpn",
                "LpnRotationInLoc",
                "LocationAbc"
              ],
              "type": "string"
            },
            "AllocationPolicyDetail": {
              "description": "A rule row of an allocation policy — migration 266's `sequence`/`active` plus the eight-column predicate (`allocation_type` … `qty_fit_rule`) and the four-deep `sort_1..sort_4` ordering. `sequence` is the execution order, never `rule_num`: `rule_num` is varchar(5) and sorts lexicographically ('10' before '2'), the same reasoning as `PutawayPolicyDetail::sequence` vs `step_num`.\n\n`Deserialize` mirrors `PutawayPolicyDetail`'s own derive, and for the same reason (see that struct's doc): the allocation step page in `web-ui-server` has no warehouse database of its own and reads this row back over `get_allocation_policy_detail`/`list_allocation_policy_detail`, needing the eight predicate axes and the four sort ranks as TYPES — not as strings it would otherwise have to re-parse from a generic `serde_json::Value`.",
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allocation_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "allocation_type": {
                  "$ref": "#/definitions/AllocationType"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location_abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "location_category": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocCategory"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "location_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lpn_quantity_rule": {
                  "$ref": "#/definitions/LpnQtyRule"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "one_pick_per_uom_location": {
                  "type": "boolean"
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty_fit_rule": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/QtyFit"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rule_num": {
                  "type": "string"
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "sort_1": {
                  "$ref": "#/definitions/AllocSort"
                },
                "sort_2": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllocSort"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sort_3": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllocSort"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sort_4": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllocSort"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "uom_code": {
                  "type": "string"
                },
                "version": {
                  "description": "Optimistic lock (migration 344). Absent from `ForUpdate` — a caller must never write it; it moves only through [`AllocationPolicyDetailBmc::update_checked`], which bumps it in the same statement as the write.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "allocation_policy_id",
                "allocation_type",
                "id",
                "lpn_quantity_rule",
                "mod_when",
                "mod_who",
                "one_pick_per_uom_location",
                "rule_num",
                "sequence",
                "sort_1",
                "uom_code",
                "version"
              ],
              "type": "object"
            },
            "AllocationType": {
              "enum": [
                "Firm",
                "Soft",
                "SoftCartonization"
              ],
              "type": "string"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "LpnQtyRule": {
              "enum": [
                "Any",
                "EqPackPallet",
                "NePackPallet"
              ],
              "type": "string"
            },
            "QtyFit": {
              "enum": [
                "LowToHigh",
                "ExactFit",
                "BiggerFit",
                "BestFit",
                "HighToLow"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/AllocationPolicyDetail"
          },
          "title": "Array_of_AllocationPolicyDetail",
          "type": "array"
        }
      },
      "summary": "List allocation_policy_detail — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b26394936d788cdf7d16e448de13559bb1b7305a59e0c6809ecb00d6af34aa05",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_allocation_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count allocation_policy_detail — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "allocation_pipeline_view",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "drafts",
          "required": false,
          "schema": {
            "default": null,
            "definitions": {
              "StepDraft": {
                "description": "One step's unsaved draft, as the editor holds it: the columns the operator has changed, and nothing else.\n\nThe same shape the batch save sends (`SaveAllocationSteps::StepEdit`'s `step_id` + `fields`), on purpose — the screen holds ONE draft per step and hands the same thing to the read that narrates it and to the write that stores it. Two shapes would be two chances for the preview and the save to disagree about what the operator typed.",
                "properties": {
                  "fields": {
                    "description": "Raw JSON, for the same reason the save's `fields` is: serde folds `{\"putawayzone\": null}` and `{}` into the same `None`, and \"clear this narrowing\" must not read as \"leave it alone\" in a preview any more than it may in a write."
                  },
                  "step_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "fields",
                  "step_id"
                ],
                "type": "object"
              }
            },
            "items": {
              "$ref": "#/definitions/StepDraft"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "summary": null
        },
        {
          "name": "id",
          "required": true,
          "schema": {
            "definitions": {
              "StepDraft": {
                "description": "One step's unsaved draft, as the editor holds it: the columns the operator has changed, and nothing else.\n\nThe same shape the batch save sends (`SaveAllocationSteps::StepEdit`'s `step_id` + `fields`), on purpose — the screen holds ONE draft per step and hands the same thing to the read that narrates it and to the write that stores it. Two shapes would be two chances for the preview and the save to disagree about what the operator typed.",
                "properties": {
                  "fields": {
                    "description": "Raw JSON, for the same reason the save's `fields` is: serde folds `{\"putawayzone\": null}` and `{}` into the same `None`, and \"clear this narrowing\" must not read as \"leave it alone\" in a preview any more than it may in a write."
                  },
                  "step_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "fields",
                  "step_id"
                ],
                "type": "object"
              }
            },
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AbcRotationSpeed": {
              "description": "Loc/Sku Abc - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`) because `CandidateFilter::loc_abc` (phase 2a) holds a `PropRule<AbcRotationSpeed>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "type": "string"
            },
            "AllocSort": {
              "enum": [
                "LotRotation",
                "Location",
                "LpnQuantity",
                "Lpn",
                "LpnRotationInLoc",
                "LocationAbc"
              ],
              "type": "string"
            },
            "AllocationPolicyLifecycle": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "AllocationType": {
              "enum": [
                "Firm",
                "Soft",
                "SoftCartonization"
              ],
              "type": "string"
            },
            "Clause": {
              "description": "One clause of a sentence, with the band that owns it.\n\n`topic` is a plain string rather than the typed [`AllocationStepTopic`]: the consumer is a TypeScript component, and a lowercase band name is what it keys its four bands by. [`topic_name`] is the one place the mapping lives.",
              "properties": {
                "runs": {
                  "items": {
                    "$ref": "#/definitions/Run"
                  },
                  "type": "array"
                },
                "text": {
                  "type": "string"
                },
                "topic": {
                  "type": "string"
                }
              },
              "required": [
                "runs",
                "text",
                "topic"
              ],
              "type": "object"
            },
            "LocCategory": {
              "description": "LocCategory - dependent type, code_list_value\n\n`PartialEq`/`Eq` are unconditional (not `cfg(test)`): `CandidateFilter::loc_category` (phase 2a) holds a `PropRule<LocCategory>`, and `CandidateFilter` derives `PartialEq, Eq` outside test code too.",
              "enum": [
                "None",
                "NoPalletization",
                "Asrs",
                "CantileverRack",
                "CartonFlow",
                "DenseStorage",
                "DoubleDeepRack",
                "DriveInRack",
                "DriveThroughRack",
                "HorizontalCarousel",
                "Other",
                "PalletFlowRack",
                "PalletCarousel",
                "PushBackRack",
                "SelectiveShelving",
                "ShelvingStorage",
                "WorkCenter"
              ],
              "type": "string"
            },
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "LpnQtyRule": {
              "enum": [
                "Any",
                "EqPackPallet",
                "NePackPallet"
              ],
              "type": "string"
            },
            "PipelineStep": {
              "description": "One step of the pipeline: its fields, its words, and every verdict about it.",
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "clauses": {
                  "description": "The running sentence, in the pieces the card's four bands need. A step the engine would skip gets only the sentence saying so — that is `narrate_allocation_step`'s rule, not this file's.",
                  "items": {
                    "$ref": "#/definitions/Clause"
                  },
                  "type": "array"
                },
                "closed_by": {
                  "description": "The `rule_num` of the earlier step that leaves this one nothing to reserve, when there is one. A rule_num, not an id: it is what the operator reads on the card.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "fields": {
                  "$ref": "#/definitions/StepFields"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "never_reserves": {
                  "description": "What this step can never reserve even though the engine loads and runs it — a measured unit against a rule written for counted ones.\n\nA SEPARATE list from `skip_reasons` and never to be merged with it: the card owes the operator two different sentences (\"the engine skips this step\" and \"this step runs, but it can never fill anything\"), and a reader told the first about a step the engine in fact ran would go looking for a refusal that does not exist.",
                  "items": {
                    "$ref": "#/definitions/Clause"
                  },
                  "type": "array"
                },
                "rule_num": {
                  "type": "string"
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "skip_reasons": {
                  "description": "Why the engine would refuse this step when it LOADS the policy. Empty for a step that runs.",
                  "items": {
                    "$ref": "#/definitions/Clause"
                  },
                  "type": "array"
                },
                "switched_off": {
                  "description": "The sentence for a step the engine never loads because somebody switched it off, in the core's own words (`allocation_step_switched_off`) — `None` for a step that is on.\n\nA sentence and not the bare `active` flag beside it: ADR-087 forbids the component to hold texts, so a screen handed only a boolean would have to author \"switched off — the engine does not run this step\" itself, and then there would be two authors of one line. `active` is still on the step for the toggle's own state.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "description": "This step's own optimistic lock — per step, never per policy, because two supervisors editing two different steps must not collide.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "clauses",
                "fields",
                "id",
                "never_reserves",
                "rule_num",
                "sequence",
                "skip_reasons",
                "version"
              ],
              "type": "object"
            },
            "QtyFit": {
              "enum": [
                "LowToHigh",
                "ExactFit",
                "BiggerFit",
                "BestFit",
                "HighToLow"
              ],
              "type": "string"
            },
            "Run": {
              "description": "The clause's words, cut into the values the operator chose and the rest. Concatenated, `text` of every run is the clause's own `text`, byte for byte.",
              "properties": {
                "bold": {
                  "description": "A value the operator picked — the card sets these in bold.",
                  "type": "boolean"
                },
                "missing": {
                  "description": "Words standing where a value the step NEEDS is not set — the card draws these amber, in place.\n\nA FLAG and not a marker to match, because the marker is a translated phrase: the card used to be expected to find the gap by looking for its words in the clause, which needed the words sent to it, and nothing ever sent them. Never `true` together with `bold`.",
                  "type": "boolean"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "bold",
                "missing",
                "text"
              ],
              "type": "object"
            },
            "StepFields": {
              "description": "The thirteen card fields, under their own column names.\n\nSpelled out rather than embedding [`AllocationPolicyDetail`] whole: the card edits exactly these, and a wire shape that also carried `add_who` / `mod_when` / `allocation_policy_id` would invite a draft to send them back.",
              "properties": {
                "allocation_type": {
                  "$ref": "#/definitions/AllocationType"
                },
                "location_abc": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AbcRotationSpeed"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "location_category": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocCategory"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "location_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LocType"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lpn_quantity_rule": {
                  "$ref": "#/definitions/LpnQtyRule"
                },
                "one_pick_per_uom_location": {
                  "type": "boolean"
                },
                "putawayzone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty_fit_rule": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/QtyFit"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sort_1": {
                  "$ref": "#/definitions/AllocSort"
                },
                "sort_2": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllocSort"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sort_3": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllocSort"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sort_4": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/AllocSort"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "uom_code": {
                  "type": "string"
                }
              },
              "required": [
                "allocation_type",
                "lpn_quantity_rule",
                "one_pick_per_uom_location",
                "sort_1",
                "uom_code"
              ],
              "type": "object"
            }
          },
          "description": "One allocation policy's pipeline, with everything the card draws beside each step.",
          "properties": {
            "lifecycle": {
              "allOf": [
                {
                  "$ref": "#/definitions/AllocationPolicyLifecycle"
                }
              ],
              "description": "Drives editor affordances: only `Draft` accepts header/step writes."
            },
            "next_rule_num": {
              "description": "What the system will call the next step the operator adds. Shown on the \"+ Add step\" affordance BEFORE the add, which is why it is here and not only in the add command's answer.",
              "type": "string"
            },
            "policy_code": {
              "type": "string"
            },
            "policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "policy_version": {
              "description": "The policy's own optimistic lock — what a reorder must echo back.",
              "format": "int32",
              "type": "integer"
            },
            "steps": {
              "description": "Every step of the policy, switched-off ones included, in execution order (`sequence`, never `rule_num` — that is `varchar(5)` and sorts '10' before '2').",
              "items": {
                "$ref": "#/definitions/PipelineStep"
              },
              "type": "array"
            }
          },
          "required": [
            "lifecycle",
            "next_rule_num",
            "policy_code",
            "policy_id",
            "policy_version",
            "steps"
          ],
          "title": "PipelineView",
          "type": "object"
        }
      },
      "summary": "Read one allocation policy's step pipeline — its readback, its skip reasons and its closed steps — optionally narrated over the drafts the editor is holding.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:54c196a63856c757bd7fdd70597b568fe26988089c2168b2d3282dbeed051abc",
      "x-quark-response-schema-hash": "sha256:cd8015a7e236bc1b7ff3b64494f563c8547e997d170ef29e2cf18c74bbbb7ed8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "allocation_policy_validate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PolicyValidationIssue": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "step_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "message"
              ],
              "type": "object"
            }
          },
          "properties": {
            "issues": {
              "items": {
                "$ref": "#/definitions/PolicyValidationIssue"
              },
              "type": "array"
            },
            "valid": {
              "type": "boolean"
            }
          },
          "required": [
            "issues",
            "valid"
          ],
          "title": "PolicyValidationReport",
          "type": "object"
        }
      },
      "summary": "Validate an allocation-policy draft and return every publication blocker.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:9e959c12bff6af39bcb4a1869bed5a743361d893afc9c504aafac73b4dd1c45c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "allocation_steps_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "StepEdit": {
                "description": "One step's draft.\n\n`fields` is raw JSON on purpose, and this is the one place in the command that is not typed: serde folds `{\"putawayzone\": null}` and `{}` into the same `None`, so a typed struct alone cannot tell \"clear this narrowing\" from \"do not touch it\" — and the step page's visible symptom was exactly that (pick \"— any —\", watch the old value come straight back). [`explicit_clears`] reads the raw value BEFORE deserialization; the typed [`AllocationPolicyDetailForUpdate`] carries the rest.",
                "properties": {
                  "expected_version": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "fields": true,
                  "step_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "required": [
                  "expected_version",
                  "fields",
                  "step_id"
                ],
                "type": "object"
              }
            },
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "description": "Resolved at the RPC boundary from `params.meta` when the wire did not put it here — see [`IdempotencyKey::unset`] for why the default is a sentinel and never a fresh random key.",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "steps": {
                "items": {
                  "$ref": "#/definitions/StepEdit"
                },
                "type": "array"
              }
            },
            "required": [
              "policy_id",
              "steps"
            ],
            "title": "SaveAllocationSteps",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StepVersion": {
              "description": "Each written step's NEW version, so the editor's drafts stay saveable without a re-read.",
              "properties": {
                "step_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "step_id",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "versions": {
              "items": {
                "$ref": "#/definitions/StepVersion"
              },
              "type": "array"
            }
          },
          "required": [
            "versions"
          ],
          "title": "SaveAllocationStepsResult",
          "type": "object"
        }
      },
      "summary": "Write every edited step of one allocation policy, each against its own version.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8b8a08b6532d78ef815b8c674e8939e81d4b276f33854139eea7118cc415c032",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:11762cfa68c04e3948f2c24c22130f67eb522235377bf7ee84b2cd22c391cefd",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "allocation_policy_detail",
          "id_field": "steps[].step_id",
          "version_field": "steps[].expected_version"
        }
      ]
    },
    {
      "name": "allocation_step_add",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "policy_id"
            ],
            "title": "AddAllocationStep",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "rule_num": {
              "description": "What the system called it — the label the operator now reads on the card, which is why the caller gets it back rather than guessing.",
              "type": "string"
            },
            "step_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "rule_num",
            "step_id"
          ],
          "title": "AddAllocationStepResult",
          "type": "object"
        }
      },
      "summary": "Add an empty step at the end of one allocation policy's pipeline; the system numbers it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bc85a1461d42a1236d662a477173020fbd730fa894a6d464c2d3c193ad2bcc68",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7d93b233fa1c2d7c0933123755dcca191213cfca31498ad1d57733f6ec176176",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "allocation_step_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "step_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "step_id"
            ],
            "title": "DeleteAllocationStep",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "step_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "step_id"
          ],
          "title": "DeleteAllocationStepResult",
          "type": "object"
        }
      },
      "summary": "Delete one allocation step, against the version it was read at.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:238e37e6e673adb13886d408004a144d4a87d93a7ccb98ea354c21509d57f6f3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9471c93d35bc9476bf5dc58c87822419b992facb24ab50a392420ecdecbf7faf",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "allocation_policy_detail",
          "id_field": "step_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "allocation_steps_reorder",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_policy_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "step_ids": {
                "description": "Every step of the policy, in the order the screen now shows them. A permutation of the pipeline — [`AllocationPolicyDetailBmc::pipeline_order`] refuses anything else.",
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "expected_policy_version",
              "policy_id",
              "step_ids"
            ],
            "title": "ReorderAllocationSteps",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_policy_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "new_policy_version"
          ],
          "title": "ReorderAllocationStepsResult",
          "type": "object"
        }
      },
      "summary": "Reorder one allocation policy's steps, against the policy's version.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7ed422bdb69234e8db379f91b771286a53b9100430b6e950145247bee31952f9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e357563d414477faed4841ce81119b3cfed0b459ed16a60c30e7240bf0fc116b",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "allocation_policy",
          "id_field": "policy_id",
          "version_field": "expected_policy_version"
        }
      ]
    },
    {
      "name": "allocation_policy_publish",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "policy_id"
            ],
            "title": "PublishAllocationPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "policy_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "new_version",
            "policy_id"
          ],
          "title": "PublishAllocationPolicyResult",
          "type": "object"
        }
      },
      "summary": "Publish a valid allocation-policy draft and make it executable.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7d7ef5ec6cabd962132ac2d755926d8326bd12274d2349df4c09ec668f5fe08a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:07aa9fca26b8b4113d2a1fe8f5ba339b7c66ba837184e2421ae793c50ed99a81",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "allocation_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "allocation_policy_deactivate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "policy_id"
            ],
            "title": "DeactivateAllocationPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "policy_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "new_version",
            "policy_id"
          ],
          "title": "DeactivateAllocationPolicyResult",
          "type": "object"
        }
      },
      "summary": "Retire a published allocation policy without making it editable again.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:48fd3ddc99b5ff99fcb8715038c0993ed2445b5dc12004f46510f2f472d5e58a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:5e9c321d0832ddaebb11a6987470b5f2bed12597a5f8673f6c2032d212696056",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "allocation_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "allocation_policy_clone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "new_code": {
                "type": "string"
              },
              "source_policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "new_code",
              "source_policy_id"
            ],
            "title": "CloneAllocationPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "policy_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "policy_id"
          ],
          "title": "CloneAllocationPolicyResult",
          "type": "object"
        }
      },
      "summary": "Clone any allocation policy and all its steps into a new draft.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "allocation_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:148786d4ba08990d4befc1ec39c30c034e30878a8860285fa9fee14b198ba4b4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:d9cda593cb47ca6024059aeab4de8b86cad03e452fd2f2f5c7e68b09f7822fef",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_replenishment_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              }
            },
            "required": [
              "code"
            ],
            "title": "ReplenishmentPolicyForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "empty_is_urgent": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "important_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "urgent_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "empty_is_urgent",
            "id",
            "important_reserved_pct",
            "mod_when",
            "mod_who",
            "urgent_reserved_pct",
            "version"
          ],
          "title": "ReplenishmentPolicy",
          "type": "object"
        }
      },
      "summary": "Create a new replenishment_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:907ab6df63eb1c08ca8750ee9388b5288de71e5de4a953a545c3b197ada7b5b4",
      "x-quark-response-schema-hash": "sha256:c8574c46e78c3e333db6a6710c5cd58ca5b97c305d6df4d83ef8e934f799082c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "replenishment_policy_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "description": "What a saved card changed — `generic_save` sends only the fields the person touched. Absent = unchanged; a share sent empty is refused, not kept: the person cleared it, and keeping the old value would decide for them.",
                "properties": {
                  "empty_is_urgent": {
                    "default": null,
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "important_reserved_pct": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "urgent_reserved_pct": {
                    "default": null,
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "title": "UrgencyRuleChange",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "empty_is_urgent": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "important_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "urgent_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "empty_is_urgent",
            "id",
            "important_reserved_pct",
            "mod_when",
            "mod_who",
            "urgent_reserved_pct",
            "version"
          ],
          "title": "ReplenishmentPolicy",
          "type": "object"
        }
      },
      "summary": "Replenishment policy: save its urgency rule, on the version read.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:74bc87cc22868d1d6f7b83dbde5c569af33994394eb9d6beeb8dd8b6d3624594",
      "x-quark-response-schema-hash": "sha256:c8574c46e78c3e333db6a6710c5cd58ca5b97c305d6df4d83ef8e934f799082c",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "replenishment_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "get_replenishment_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "empty_is_urgent": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "important_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "urgent_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "empty_is_urgent",
            "id",
            "important_reserved_pct",
            "mod_when",
            "mod_who",
            "urgent_reserved_pct",
            "version"
          ],
          "title": "ReplenishmentPolicy",
          "type": "object"
        }
      },
      "summary": "Get a replenishment_policy by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c8574c46e78c3e333db6a6710c5cd58ca5b97c305d6df4d83ef8e934f799082c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_replenishment_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReplenishmentPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "empty_is_urgent": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "important_reserved_pct": {
                  "format": "double",
                  "type": "number"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "urgent_reserved_pct": {
                  "format": "double",
                  "type": "number"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "empty_is_urgent",
                "id",
                "important_reserved_pct",
                "mod_when",
                "mod_who",
                "urgent_reserved_pct",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReplenishmentPolicy"
          },
          "title": "Array_of_ReplenishmentPolicy",
          "type": "array"
        }
      },
      "summary": "List replenishment_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48a91ac0d439bb9ccf259bac36748fe22d630abd786988e7143337c3eb437aa6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_replenishment_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "empty_is_urgent": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "important_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "urgent_reserved_pct": {
              "format": "double",
              "type": "number"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "empty_is_urgent",
            "id",
            "important_reserved_pct",
            "mod_when",
            "mod_who",
            "urgent_reserved_pct",
            "version"
          ],
          "title": "ReplenishmentPolicy",
          "type": "object"
        }
      },
      "summary": "Delete a replenishment_policy by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c8574c46e78c3e333db6a6710c5cd58ca5b97c305d6df4d83ef8e934f799082c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_replenishment_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple replenishment_policy by IDs — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_replenishment_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count replenishment_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_replenishment_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "replenishment_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "step_num": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "replenishment_policy_id",
            "step_num"
          ],
          "title": "ReplenishmentPolicyDetail",
          "type": "object"
        }
      },
      "summary": "Get a replenishment_policy_detail by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5193c337b7c4c3fe7120fc114724089809c82a94eaecfbd98b5dad63690e9de8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_replenishment_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReplenishmentPolicyDetail": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "replenishment_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "step_num": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "replenishment_policy_id",
                "step_num"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReplenishmentPolicyDetail"
          },
          "title": "Array_of_ReplenishmentPolicyDetail",
          "type": "array"
        }
      },
      "summary": "List replenishment_policy_detail — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:524cebec28e02c5ac536a461d841a45ac500511256b80e0ae0b8bceeaa72e74a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_replenishment_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count replenishment_policy_detail — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "replenishment_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_cartonization_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "algorithm": {
              "$ref": "#/definitions/CartonizationAlgorithm"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "iterations_per_unit_sq": {
              "format": "int32",
              "type": "integer"
            },
            "max_candidates": {
              "format": "int32",
              "type": "integer"
            },
            "max_iterations_cap": {
              "format": "int32",
              "type": "integer"
            },
            "min_iterations": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "objective": {
              "$ref": "#/definitions/CartonizationObjective"
            },
            "on_no_carton_candidates": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_carton_fits": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_dimensions": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_weight": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_split_prevented": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_weight_exceeded": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "solver": {
              "$ref": "#/definitions/CartonizationSolver"
            },
            "split_rule": {
              "$ref": "#/definitions/PickSplitRule"
            },
            "version": {
              "description": "Generation of the complete header + carton set.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "algorithm",
            "code",
            "descr",
            "id",
            "iterations_per_unit_sq",
            "max_candidates",
            "max_iterations_cap",
            "min_iterations",
            "mod_when",
            "mod_who",
            "objective",
            "on_no_carton_candidates",
            "on_no_carton_fits",
            "on_no_dimensions",
            "on_no_weight",
            "on_split_prevented",
            "on_weight_exceeded",
            "solver",
            "split_rule",
            "version"
          ],
          "title": "CartonizationPolicy",
          "type": "object"
        }
      },
      "summary": "Get a cartonization_policy by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d7ec2f4f550ee3b57254d6ca59adaed177c08de13695140cb6e78f41e911227a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_cartonization_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationPolicy": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "algorithm": {
                  "$ref": "#/definitions/CartonizationAlgorithm"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "iterations_per_unit_sq": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_candidates": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_iterations_cap": {
                  "format": "int32",
                  "type": "integer"
                },
                "min_iterations": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "objective": {
                  "$ref": "#/definitions/CartonizationObjective"
                },
                "on_no_carton_candidates": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_carton_fits": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_dimensions": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_weight": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_split_prevented": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_weight_exceeded": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "solver": {
                  "$ref": "#/definitions/CartonizationSolver"
                },
                "split_rule": {
                  "$ref": "#/definitions/PickSplitRule"
                },
                "version": {
                  "description": "Generation of the complete header + carton set.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "algorithm",
                "code",
                "descr",
                "id",
                "iterations_per_unit_sq",
                "max_candidates",
                "max_iterations_cap",
                "min_iterations",
                "mod_when",
                "mod_who",
                "objective",
                "on_no_carton_candidates",
                "on_no_carton_fits",
                "on_no_dimensions",
                "on_no_weight",
                "on_split_prevented",
                "on_weight_exceeded",
                "solver",
                "split_rule",
                "version"
              ],
              "type": "object"
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/CartonizationPolicy"
          },
          "title": "Array_of_CartonizationPolicy",
          "type": "array"
        }
      },
      "summary": "List cartonization_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:ac1a708c398db2c01ba699a729f6cfb5a8c392cc9fa1b514a75a68f840ceae5e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_cartonization_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "algorithm": {
              "$ref": "#/definitions/CartonizationAlgorithm"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "iterations_per_unit_sq": {
              "format": "int32",
              "type": "integer"
            },
            "max_candidates": {
              "format": "int32",
              "type": "integer"
            },
            "max_iterations_cap": {
              "format": "int32",
              "type": "integer"
            },
            "min_iterations": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "objective": {
              "$ref": "#/definitions/CartonizationObjective"
            },
            "on_no_carton_candidates": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_carton_fits": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_dimensions": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_weight": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_split_prevented": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_weight_exceeded": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "solver": {
              "$ref": "#/definitions/CartonizationSolver"
            },
            "split_rule": {
              "$ref": "#/definitions/PickSplitRule"
            },
            "version": {
              "description": "Generation of the complete header + carton set.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "algorithm",
            "code",
            "descr",
            "id",
            "iterations_per_unit_sq",
            "max_candidates",
            "max_iterations_cap",
            "min_iterations",
            "mod_when",
            "mod_who",
            "objective",
            "on_no_carton_candidates",
            "on_no_carton_fits",
            "on_no_dimensions",
            "on_no_weight",
            "on_split_prevented",
            "on_weight_exceeded",
            "solver",
            "split_rule",
            "version"
          ],
          "title": "CartonizationPolicy",
          "type": "object"
        }
      },
      "summary": "Delete an unreferenced cartonization policy and all of its owned cartons.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:d7ec2f4f550ee3b57254d6ca59adaed177c08de13695140cb6e78f41e911227a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_cartonization_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete unreferenced cartonization policies and all of their owned cartons.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_cartonization_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count cartonization_policy — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_cartonization_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "descr": {
              "type": "string"
            },
            "handling_unit_type_id": {
              "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
              "format": "double",
              "type": "number"
            },
            "max_units": {
              "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "sequence": {
              "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
              "format": "int32",
              "type": "integer"
            },
            "step_num": {
              "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
              "type": "string"
            },
            "tare_weight": {
              "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "cartonization_policy_id",
            "descr",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "max_units",
            "mod_when",
            "mod_who",
            "sequence",
            "step_num",
            "tare_weight"
          ],
          "title": "CartonizationPolicyDetail",
          "type": "object"
        }
      },
      "summary": "Get a cartonization_policy_detail by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f2649134d74bfd4daa8b4c70895cb7b774322d2b827fcfcf934453852c49b69c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_cartonization_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationPolicyDetail": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cartonization_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "descr": {
                  "type": "string"
                },
                "handling_unit_type_id": {
                  "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "max_gross_weight": {
                  "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
                  "format": "double",
                  "type": "number"
                },
                "max_units": {
                  "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "sequence": {
                  "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
                  "format": "int32",
                  "type": "integer"
                },
                "step_num": {
                  "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
                  "type": "string"
                },
                "tare_weight": {
                  "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "cartonization_policy_id",
                "descr",
                "id",
                "inner_height",
                "inner_length",
                "inner_width",
                "max_gross_weight",
                "max_units",
                "mod_when",
                "mod_who",
                "sequence",
                "step_num",
                "tare_weight"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/CartonizationPolicyDetail"
          },
          "title": "Array_of_CartonizationPolicyDetail",
          "type": "array"
        }
      },
      "summary": "List cartonization_policy_detail — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:4e83da23d8b192abd20d9f30f2506619f415af5478badad33511f3376dfa7029",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_cartonization_policy_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count cartonization_policy_detail — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_cartonization_policy_detail_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "descr": {
              "type": "string"
            },
            "handling_unit_type_id": {
              "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
              "format": "double",
              "type": "number"
            },
            "max_units": {
              "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "sequence": {
              "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
              "format": "int32",
              "type": "integer"
            },
            "step_num": {
              "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
              "type": "string"
            },
            "tare_weight": {
              "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
              "format": "double",
              "type": "number"
            },
            "version": {
              "description": "Version of the aggregate root read with this carton.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "cartonization_policy_id",
            "descr",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "max_units",
            "mod_when",
            "mod_who",
            "sequence",
            "step_num",
            "tare_weight",
            "version"
          ],
          "title": "CartonizationPolicyDetailFormView",
          "type": "object"
        }
      },
      "summary": "Get one carton candidate with its policy aggregate version.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:4f230e612f6ba54b4e656168e8c4a12bff92a2a92d26872f887c865796a1584b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cartonization_policy_view",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationPolicy": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "algorithm": {
                  "$ref": "#/definitions/CartonizationAlgorithm"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "iterations_per_unit_sq": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_candidates": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_iterations_cap": {
                  "format": "int32",
                  "type": "integer"
                },
                "min_iterations": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "objective": {
                  "$ref": "#/definitions/CartonizationObjective"
                },
                "on_no_carton_candidates": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_carton_fits": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_dimensions": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_weight": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_split_prevented": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_weight_exceeded": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "solver": {
                  "$ref": "#/definitions/CartonizationSolver"
                },
                "split_rule": {
                  "$ref": "#/definitions/PickSplitRule"
                },
                "version": {
                  "description": "Generation of the complete header + carton set.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "algorithm",
                "code",
                "descr",
                "id",
                "iterations_per_unit_sq",
                "max_candidates",
                "max_iterations_cap",
                "min_iterations",
                "mod_when",
                "mod_who",
                "objective",
                "on_no_carton_candidates",
                "on_no_carton_fits",
                "on_no_dimensions",
                "on_no_weight",
                "on_split_prevented",
                "on_weight_exceeded",
                "solver",
                "split_rule",
                "version"
              ],
              "type": "object"
            },
            "CartonizationPolicyDetail": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cartonization_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "descr": {
                  "type": "string"
                },
                "handling_unit_type_id": {
                  "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "max_gross_weight": {
                  "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
                  "format": "double",
                  "type": "number"
                },
                "max_units": {
                  "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "sequence": {
                  "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
                  "format": "int32",
                  "type": "integer"
                },
                "step_num": {
                  "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
                  "type": "string"
                },
                "tare_weight": {
                  "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "cartonization_policy_id",
                "descr",
                "id",
                "inner_height",
                "inner_length",
                "inner_width",
                "max_gross_weight",
                "max_units",
                "mod_when",
                "mod_who",
                "sequence",
                "step_num",
                "tare_weight"
              ],
              "type": "object"
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "cartons": {
              "description": "Solver order. The array order, not a caller-supplied number, is the editable ordering contract.",
              "items": {
                "$ref": "#/definitions/CartonizationPolicyDetail"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/CartonizationPolicy"
            }
          },
          "required": [
            "cartons",
            "policy"
          ],
          "title": "CartonizationPolicyAggregateView",
          "type": "object"
        }
      },
      "summary": "Read the complete cartonization policy in solver order.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:ac022deba525510158067d3abc6c95d0e88414ec4ede0a1078d4d352bd1a57f3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cartonization_policy_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Nothing: a new-cartonization policy template depends on no argument.",
            "title": "CartonizationPolicyTemplateInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "additionalProperties": false,
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationCartonDraft": {
              "additionalProperties": false,
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "handling_unit_type_id": {
                  "default": null,
                  "description": "The tare type this candidate plans; `None` = any box that fits. `default`: an editor that never sends it keeps saving.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "default": null,
                  "description": "Existing row identity. `None` means add one carton.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "max_gross_weight": {
                  "format": "double",
                  "type": "number"
                },
                "max_units": {
                  "format": "int32",
                  "type": "integer"
                },
                "tare_weight": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "active",
                "code",
                "descr",
                "inner_height",
                "inner_length",
                "inner_width",
                "max_gross_weight",
                "max_units",
                "tare_weight"
              ],
              "type": "object"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationPolicyRootDraft": {
              "additionalProperties": false,
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "algorithm": {
                  "$ref": "#/definitions/CartonizationAlgorithm"
                },
                "descr": {
                  "type": "string"
                },
                "iterations_per_unit_sq": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_candidates": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_iterations_cap": {
                  "format": "int32",
                  "type": "integer"
                },
                "min_iterations": {
                  "format": "int32",
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "objective": {
                  "$ref": "#/definitions/CartonizationObjective"
                },
                "on_no_carton_candidates": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_carton_fits": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_dimensions": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_weight": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_split_prevented": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_weight_exceeded": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "solver": {
                  "$ref": "#/definitions/CartonizationSolver"
                },
                "split_rule": {
                  "$ref": "#/definitions/PickSplitRule"
                }
              },
              "required": [
                "active",
                "algorithm",
                "descr",
                "iterations_per_unit_sq",
                "max_candidates",
                "max_iterations_cap",
                "min_iterations",
                "objective",
                "on_no_carton_candidates",
                "on_no_carton_fits",
                "on_no_dimensions",
                "on_no_weight",
                "on_split_prevented",
                "on_weight_exceeded",
                "solver",
                "split_rule"
              ],
              "type": "object"
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "cartons": {
              "description": "The vector order becomes `sequence = 10, 20, ...` on save.",
              "items": {
                "$ref": "#/definitions/CartonizationCartonDraft"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/CartonizationPolicyRootDraft"
            }
          },
          "required": [
            "cartons",
            "policy"
          ],
          "title": "CartonizationPolicyAggregateDraft",
          "type": "object"
        }
      },
      "summary": "The draft a new cartonization policy starts from.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1a898df05a28fbad4c11ae78a2b4e1da44b4f035d13740f8d9926ff5708c2e58",
      "x-quark-response-schema-hash": "sha256:2c4c52ae80bc70ee7f4ef750449f3dae0d66c44631abcf098fedea2336f5429b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cartonization_policy_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "definitions": {
              "CartonizationAlgorithm": {
                "enum": [
                  "ExtremePoints"
                ],
                "type": "string"
              },
              "CartonizationCartonDraft": {
                "additionalProperties": false,
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "code": {
                    "type": "string"
                  },
                  "descr": {
                    "type": "string"
                  },
                  "handling_unit_type_id": {
                    "default": null,
                    "description": "The tare type this candidate plans; `None` = any box that fits. `default`: an editor that never sends it keeps saving.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "id": {
                    "default": null,
                    "description": "Existing row identity. `None` means add one carton.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "inner_height": {
                    "format": "double",
                    "type": "number"
                  },
                  "inner_length": {
                    "format": "double",
                    "type": "number"
                  },
                  "inner_width": {
                    "format": "double",
                    "type": "number"
                  },
                  "max_gross_weight": {
                    "format": "double",
                    "type": "number"
                  },
                  "max_units": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "tare_weight": {
                    "format": "double",
                    "type": "number"
                  }
                },
                "required": [
                  "active",
                  "code",
                  "descr",
                  "inner_height",
                  "inner_length",
                  "inner_width",
                  "max_gross_weight",
                  "max_units",
                  "tare_weight"
                ],
                "type": "object"
              },
              "CartonizationExceptionAction": {
                "oneOf": [
                  {
                    "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                    "enum": [
                      "ShipAsIs"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Остановиться: без человека дальше нельзя.",
                    "enum": [
                      "Stop"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationObjective": {
                "oneOf": [
                  {
                    "enum": [
                      "MinUnusedVolume",
                      "MinPickSplits",
                      "BalanceWeight"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Единственная цель, которую движок считает.",
                    "enum": [
                      "MinCartons"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationPolicyAggregateDraft": {
                "additionalProperties": false,
                "properties": {
                  "cartons": {
                    "description": "The vector order becomes `sequence = 10, 20, ...` on save.",
                    "items": {
                      "$ref": "#/definitions/CartonizationCartonDraft"
                    },
                    "type": "array"
                  },
                  "policy": {
                    "$ref": "#/definitions/CartonizationPolicyRootDraft"
                  }
                },
                "required": [
                  "cartons",
                  "policy"
                ],
                "type": "object"
              },
              "CartonizationPolicyRootDraft": {
                "additionalProperties": false,
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "algorithm": {
                    "$ref": "#/definitions/CartonizationAlgorithm"
                  },
                  "descr": {
                    "type": "string"
                  },
                  "iterations_per_unit_sq": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "max_candidates": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "max_iterations_cap": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "min_iterations": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "objective": {
                    "$ref": "#/definitions/CartonizationObjective"
                  },
                  "on_no_carton_candidates": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_no_carton_fits": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_no_dimensions": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_no_weight": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_split_prevented": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_weight_exceeded": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "solver": {
                    "$ref": "#/definitions/CartonizationSolver"
                  },
                  "split_rule": {
                    "$ref": "#/definitions/PickSplitRule"
                  }
                },
                "required": [
                  "active",
                  "algorithm",
                  "descr",
                  "iterations_per_unit_sq",
                  "max_candidates",
                  "max_iterations_cap",
                  "min_iterations",
                  "objective",
                  "on_no_carton_candidates",
                  "on_no_carton_fits",
                  "on_no_dimensions",
                  "on_no_weight",
                  "on_split_prevented",
                  "on_weight_exceeded",
                  "solver",
                  "split_rule"
                ],
                "type": "object"
              },
              "CartonizationSolver": {
                "enum": [
                  "BinPacking3d"
                ],
                "type": "string"
              },
              "PickSplitRule": {
                "oneOf": [
                  {
                    "description": "Один пик можно разложить по нескольким коробкам.",
                    "enum": [
                      "Allow"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Пик не дробится: не влез целиком — не влез.",
                    "enum": [
                      "Prevent"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "code": {
                "type": "string"
              },
              "data": {
                "$ref": "#/definitions/CartonizationPolicyAggregateDraft"
              }
            },
            "required": [
              "code",
              "data"
            ],
            "title": "CartonizationPolicyAggregateForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationPolicy": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "algorithm": {
                  "$ref": "#/definitions/CartonizationAlgorithm"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "iterations_per_unit_sq": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_candidates": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_iterations_cap": {
                  "format": "int32",
                  "type": "integer"
                },
                "min_iterations": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "objective": {
                  "$ref": "#/definitions/CartonizationObjective"
                },
                "on_no_carton_candidates": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_carton_fits": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_dimensions": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_weight": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_split_prevented": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_weight_exceeded": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "solver": {
                  "$ref": "#/definitions/CartonizationSolver"
                },
                "split_rule": {
                  "$ref": "#/definitions/PickSplitRule"
                },
                "version": {
                  "description": "Generation of the complete header + carton set.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "algorithm",
                "code",
                "descr",
                "id",
                "iterations_per_unit_sq",
                "max_candidates",
                "max_iterations_cap",
                "min_iterations",
                "mod_when",
                "mod_who",
                "objective",
                "on_no_carton_candidates",
                "on_no_carton_fits",
                "on_no_dimensions",
                "on_no_weight",
                "on_split_prevented",
                "on_weight_exceeded",
                "solver",
                "split_rule",
                "version"
              ],
              "type": "object"
            },
            "CartonizationPolicyDetail": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cartonization_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "descr": {
                  "type": "string"
                },
                "handling_unit_type_id": {
                  "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "max_gross_weight": {
                  "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
                  "format": "double",
                  "type": "number"
                },
                "max_units": {
                  "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "sequence": {
                  "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
                  "format": "int32",
                  "type": "integer"
                },
                "step_num": {
                  "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
                  "type": "string"
                },
                "tare_weight": {
                  "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "cartonization_policy_id",
                "descr",
                "id",
                "inner_height",
                "inner_length",
                "inner_width",
                "max_gross_weight",
                "max_units",
                "mod_when",
                "mod_who",
                "sequence",
                "step_num",
                "tare_weight"
              ],
              "type": "object"
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "cartons": {
              "description": "Solver order. The array order, not a caller-supplied number, is the editable ordering contract.",
              "items": {
                "$ref": "#/definitions/CartonizationPolicyDetail"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/CartonizationPolicy"
            }
          },
          "required": [
            "cartons",
            "policy"
          ],
          "title": "CartonizationPolicyAggregateView",
          "type": "object"
        }
      },
      "summary": "Create a cartonization policy and its ordered cartons atomically.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4d1e8d4d410299beb04d954d1acc4f5190e0e019efa687c67b73a396e95bfcc7",
      "x-quark-response-schema-hash": "sha256:ac022deba525510158067d3abc6c95d0e88414ec4ede0a1078d4d352bd1a57f3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cartonization_policy_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "CartonizationAlgorithm": {
                "enum": [
                  "ExtremePoints"
                ],
                "type": "string"
              },
              "CartonizationCartonDraft": {
                "additionalProperties": false,
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "code": {
                    "type": "string"
                  },
                  "descr": {
                    "type": "string"
                  },
                  "handling_unit_type_id": {
                    "default": null,
                    "description": "The tare type this candidate plans; `None` = any box that fits. `default`: an editor that never sends it keeps saving.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "id": {
                    "default": null,
                    "description": "Existing row identity. `None` means add one carton.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "inner_height": {
                    "format": "double",
                    "type": "number"
                  },
                  "inner_length": {
                    "format": "double",
                    "type": "number"
                  },
                  "inner_width": {
                    "format": "double",
                    "type": "number"
                  },
                  "max_gross_weight": {
                    "format": "double",
                    "type": "number"
                  },
                  "max_units": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "tare_weight": {
                    "format": "double",
                    "type": "number"
                  }
                },
                "required": [
                  "active",
                  "code",
                  "descr",
                  "inner_height",
                  "inner_length",
                  "inner_width",
                  "max_gross_weight",
                  "max_units",
                  "tare_weight"
                ],
                "type": "object"
              },
              "CartonizationExceptionAction": {
                "oneOf": [
                  {
                    "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                    "enum": [
                      "ShipAsIs"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Остановиться: без человека дальше нельзя.",
                    "enum": [
                      "Stop"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationObjective": {
                "oneOf": [
                  {
                    "enum": [
                      "MinUnusedVolume",
                      "MinPickSplits",
                      "BalanceWeight"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Единственная цель, которую движок считает.",
                    "enum": [
                      "MinCartons"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationPolicyRootDraft": {
                "additionalProperties": false,
                "properties": {
                  "active": {
                    "type": "boolean"
                  },
                  "algorithm": {
                    "$ref": "#/definitions/CartonizationAlgorithm"
                  },
                  "descr": {
                    "type": "string"
                  },
                  "iterations_per_unit_sq": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "max_candidates": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "max_iterations_cap": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "min_iterations": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "objective": {
                    "$ref": "#/definitions/CartonizationObjective"
                  },
                  "on_no_carton_candidates": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_no_carton_fits": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_no_dimensions": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_no_weight": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_split_prevented": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "on_weight_exceeded": {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  "solver": {
                    "$ref": "#/definitions/CartonizationSolver"
                  },
                  "split_rule": {
                    "$ref": "#/definitions/PickSplitRule"
                  }
                },
                "required": [
                  "active",
                  "algorithm",
                  "descr",
                  "iterations_per_unit_sq",
                  "max_candidates",
                  "max_iterations_cap",
                  "min_iterations",
                  "objective",
                  "on_no_carton_candidates",
                  "on_no_carton_fits",
                  "on_no_dimensions",
                  "on_no_weight",
                  "on_split_prevented",
                  "on_weight_exceeded",
                  "solver",
                  "split_rule"
                ],
                "type": "object"
              },
              "CartonizationSolver": {
                "enum": [
                  "BinPacking3d"
                ],
                "type": "string"
              },
              "PickSplitRule": {
                "oneOf": [
                  {
                    "description": "Один пик можно разложить по нескольким коробкам.",
                    "enum": [
                      "Allow"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Пик не дробится: не влез целиком — не влез.",
                    "enum": [
                      "Prevent"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "additionalProperties": false,
                "definitions": {
                  "CartonizationAlgorithm": {
                    "enum": [
                      "ExtremePoints"
                    ],
                    "type": "string"
                  },
                  "CartonizationCartonDraft": {
                    "additionalProperties": false,
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "code": {
                        "type": "string"
                      },
                      "descr": {
                        "type": "string"
                      },
                      "handling_unit_type_id": {
                        "default": null,
                        "description": "The tare type this candidate plans; `None` = any box that fits. `default`: an editor that never sends it keeps saving.",
                        "format": "int64",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "id": {
                        "default": null,
                        "description": "Existing row identity. `None` means add one carton.",
                        "format": "int64",
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "inner_height": {
                        "format": "double",
                        "type": "number"
                      },
                      "inner_length": {
                        "format": "double",
                        "type": "number"
                      },
                      "inner_width": {
                        "format": "double",
                        "type": "number"
                      },
                      "max_gross_weight": {
                        "format": "double",
                        "type": "number"
                      },
                      "max_units": {
                        "format": "int32",
                        "type": "integer"
                      },
                      "tare_weight": {
                        "format": "double",
                        "type": "number"
                      }
                    },
                    "required": [
                      "active",
                      "code",
                      "descr",
                      "inner_height",
                      "inner_length",
                      "inner_width",
                      "max_gross_weight",
                      "max_units",
                      "tare_weight"
                    ],
                    "type": "object"
                  },
                  "CartonizationExceptionAction": {
                    "oneOf": [
                      {
                        "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                        "enum": [
                          "ShipAsIs"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Остановиться: без человека дальше нельзя.",
                        "enum": [
                          "Stop"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "CartonizationObjective": {
                    "oneOf": [
                      {
                        "enum": [
                          "MinUnusedVolume",
                          "MinPickSplits",
                          "BalanceWeight"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Единственная цель, которую движок считает.",
                        "enum": [
                          "MinCartons"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "CartonizationPolicyRootDraft": {
                    "additionalProperties": false,
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "algorithm": {
                        "$ref": "#/definitions/CartonizationAlgorithm"
                      },
                      "descr": {
                        "type": "string"
                      },
                      "iterations_per_unit_sq": {
                        "format": "int32",
                        "type": "integer"
                      },
                      "max_candidates": {
                        "format": "int32",
                        "type": "integer"
                      },
                      "max_iterations_cap": {
                        "format": "int32",
                        "type": "integer"
                      },
                      "min_iterations": {
                        "format": "int32",
                        "type": "integer"
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "objective": {
                        "$ref": "#/definitions/CartonizationObjective"
                      },
                      "on_no_carton_candidates": {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      "on_no_carton_fits": {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      "on_no_dimensions": {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      "on_no_weight": {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      "on_split_prevented": {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      "on_weight_exceeded": {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      "solver": {
                        "$ref": "#/definitions/CartonizationSolver"
                      },
                      "split_rule": {
                        "$ref": "#/definitions/PickSplitRule"
                      }
                    },
                    "required": [
                      "active",
                      "algorithm",
                      "descr",
                      "iterations_per_unit_sq",
                      "max_candidates",
                      "max_iterations_cap",
                      "min_iterations",
                      "objective",
                      "on_no_carton_candidates",
                      "on_no_carton_fits",
                      "on_no_dimensions",
                      "on_no_weight",
                      "on_split_prevented",
                      "on_weight_exceeded",
                      "solver",
                      "split_rule"
                    ],
                    "type": "object"
                  },
                  "CartonizationSolver": {
                    "enum": [
                      "BinPacking3d"
                    ],
                    "type": "string"
                  },
                  "PickSplitRule": {
                    "oneOf": [
                      {
                        "description": "Один пик можно разложить по нескольким коробкам.",
                        "enum": [
                          "Allow"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Пик не дробится: не влез целиком — не влез.",
                        "enum": [
                          "Prevent"
                        ],
                        "type": "string"
                      }
                    ]
                  }
                },
                "properties": {
                  "cartons": {
                    "description": "The vector order becomes `sequence = 10, 20, ...` on save.",
                    "items": {
                      "$ref": "#/definitions/CartonizationCartonDraft"
                    },
                    "type": "array"
                  },
                  "policy": {
                    "$ref": "#/definitions/CartonizationPolicyRootDraft"
                  }
                },
                "required": [
                  "cartons",
                  "policy"
                ],
                "title": "CartonizationPolicyAggregateDraft",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationPolicy": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "algorithm": {
                  "$ref": "#/definitions/CartonizationAlgorithm"
                },
                "code": {
                  "type": "string"
                },
                "descr": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "iterations_per_unit_sq": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_candidates": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_iterations_cap": {
                  "format": "int32",
                  "type": "integer"
                },
                "min_iterations": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "objective": {
                  "$ref": "#/definitions/CartonizationObjective"
                },
                "on_no_carton_candidates": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_carton_fits": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_dimensions": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_no_weight": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_split_prevented": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "on_weight_exceeded": {
                  "$ref": "#/definitions/CartonizationExceptionAction"
                },
                "solver": {
                  "$ref": "#/definitions/CartonizationSolver"
                },
                "split_rule": {
                  "$ref": "#/definitions/PickSplitRule"
                },
                "version": {
                  "description": "Generation of the complete header + carton set.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "algorithm",
                "code",
                "descr",
                "id",
                "iterations_per_unit_sq",
                "max_candidates",
                "max_iterations_cap",
                "min_iterations",
                "mod_when",
                "mod_who",
                "objective",
                "on_no_carton_candidates",
                "on_no_carton_fits",
                "on_no_dimensions",
                "on_no_weight",
                "on_split_prevented",
                "on_weight_exceeded",
                "solver",
                "split_rule",
                "version"
              ],
              "type": "object"
            },
            "CartonizationPolicyDetail": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cartonization_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "descr": {
                  "type": "string"
                },
                "handling_unit_type_id": {
                  "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "max_gross_weight": {
                  "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
                  "format": "double",
                  "type": "number"
                },
                "max_units": {
                  "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "sequence": {
                  "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
                  "format": "int32",
                  "type": "integer"
                },
                "step_num": {
                  "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
                  "type": "string"
                },
                "tare_weight": {
                  "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "cartonization_policy_id",
                "descr",
                "id",
                "inner_height",
                "inner_length",
                "inner_width",
                "max_gross_weight",
                "max_units",
                "mod_when",
                "mod_who",
                "sequence",
                "step_num",
                "tare_weight"
              ],
              "type": "object"
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "cartons": {
              "description": "Solver order. The array order, not a caller-supplied number, is the editable ordering contract.",
              "items": {
                "$ref": "#/definitions/CartonizationPolicyDetail"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/CartonizationPolicy"
            }
          },
          "required": [
            "cartons",
            "policy"
          ],
          "title": "CartonizationPolicyAggregateView",
          "type": "object"
        }
      },
      "summary": "Replace a cartonization policy and its ordered cartons atomically.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f6c7da68ed3897aaf5ec6d9ce124bb3ff312e14584b29c2e9c3143782d93c6cf",
      "x-quark-response-schema-hash": "sha256:ac022deba525510158067d3abc6c95d0e88414ec4ede0a1078d4d352bd1a57f3",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "cartonization_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_cartonization_policy_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "CartonizationAlgorithm": {
                "enum": [
                  "ExtremePoints"
                ],
                "type": "string"
              },
              "CartonizationExceptionAction": {
                "oneOf": [
                  {
                    "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                    "enum": [
                      "ShipAsIs"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Остановиться: без человека дальше нельзя.",
                    "enum": [
                      "Stop"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationObjective": {
                "oneOf": [
                  {
                    "enum": [
                      "MinUnusedVolume",
                      "MinPickSplits",
                      "BalanceWeight"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Единственная цель, которую движок считает.",
                    "enum": [
                      "MinCartons"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationSolver": {
                "enum": [
                  "BinPacking3d"
                ],
                "type": "string"
              },
              "PickSplitRule": {
                "oneOf": [
                  {
                    "description": "Один пик можно разложить по нескольким коробкам.",
                    "enum": [
                      "Allow"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Пик не дробится: не влез целиком — не влез.",
                    "enum": [
                      "Prevent"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "algorithm": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationAlgorithm"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "code": {
                "type": "string"
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "iterations_per_unit_sq": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "max_candidates": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "max_iterations_cap": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "min_iterations": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "objective": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationObjective"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_no_carton_candidates": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_no_carton_fits": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_no_dimensions": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_no_weight": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_split_prevented": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "on_weight_exceeded": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationExceptionAction"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "solver": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/CartonizationSolver"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "split_rule": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PickSplitRule"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "CartonizationPolicyForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "algorithm": {
              "$ref": "#/definitions/CartonizationAlgorithm"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "iterations_per_unit_sq": {
              "format": "int32",
              "type": "integer"
            },
            "max_candidates": {
              "format": "int32",
              "type": "integer"
            },
            "max_iterations_cap": {
              "format": "int32",
              "type": "integer"
            },
            "min_iterations": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "objective": {
              "$ref": "#/definitions/CartonizationObjective"
            },
            "on_no_carton_candidates": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_carton_fits": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_dimensions": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_weight": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_split_prevented": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_weight_exceeded": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "solver": {
              "$ref": "#/definitions/CartonizationSolver"
            },
            "split_rule": {
              "$ref": "#/definitions/PickSplitRule"
            },
            "version": {
              "description": "Generation of the complete header + carton set.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "algorithm",
            "code",
            "descr",
            "id",
            "iterations_per_unit_sq",
            "max_candidates",
            "max_iterations_cap",
            "min_iterations",
            "mod_when",
            "mod_who",
            "objective",
            "on_no_carton_candidates",
            "on_no_carton_fits",
            "on_no_dimensions",
            "on_no_weight",
            "on_split_prevented",
            "on_weight_exceeded",
            "solver",
            "split_rule",
            "version"
          ],
          "title": "CartonizationPolicy",
          "type": "object"
        }
      },
      "summary": "Create a cartonization policy from the metadata form.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a51f9e5159cf1969555d6c1b2ee0b1ef0d92acfc495525224ee3f5235633522f",
      "x-quark-response-schema-hash": "sha256:d7ec2f4f550ee3b57254d6ca59adaed177c08de13695140cb6e78f41e911227a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_cartonization_policy_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "definitions": {
              "CartonizationAlgorithm": {
                "enum": [
                  "ExtremePoints"
                ],
                "type": "string"
              },
              "CartonizationExceptionAction": {
                "oneOf": [
                  {
                    "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                    "enum": [
                      "ShipAsIs"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Остановиться: без человека дальше нельзя.",
                    "enum": [
                      "Stop"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationObjective": {
                "oneOf": [
                  {
                    "enum": [
                      "MinUnusedVolume",
                      "MinPickSplits",
                      "BalanceWeight"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Единственная цель, которую движок считает.",
                    "enum": [
                      "MinCartons"
                    ],
                    "type": "string"
                  }
                ]
              },
              "CartonizationSolver": {
                "enum": [
                  "BinPacking3d"
                ],
                "type": "string"
              },
              "PickSplitRule": {
                "oneOf": [
                  {
                    "description": "Один пик можно разложить по нескольким коробкам.",
                    "enum": [
                      "Allow"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Пик не дробится: не влез целиком — не влез.",
                    "enum": [
                      "Prevent"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "definitions": {
                  "CartonizationAlgorithm": {
                    "enum": [
                      "ExtremePoints"
                    ],
                    "type": "string"
                  },
                  "CartonizationExceptionAction": {
                    "oneOf": [
                      {
                        "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                        "enum": [
                          "ShipAsIs"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Остановиться: без человека дальше нельзя.",
                        "enum": [
                          "Stop"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "CartonizationObjective": {
                    "oneOf": [
                      {
                        "enum": [
                          "MinUnusedVolume",
                          "MinPickSplits",
                          "BalanceWeight"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Единственная цель, которую движок считает.",
                        "enum": [
                          "MinCartons"
                        ],
                        "type": "string"
                      }
                    ]
                  },
                  "CartonizationSolver": {
                    "enum": [
                      "BinPacking3d"
                    ],
                    "type": "string"
                  },
                  "PickSplitRule": {
                    "oneOf": [
                      {
                        "description": "Один пик можно разложить по нескольким коробкам.",
                        "enum": [
                          "Allow"
                        ],
                        "type": "string"
                      },
                      {
                        "description": "Пик не дробится: не влез целиком — не влез.",
                        "enum": [
                          "Prevent"
                        ],
                        "type": "string"
                      }
                    ]
                  }
                },
                "properties": {
                  "active": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "algorithm": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationAlgorithm"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "iterations_per_unit_sq": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_candidates": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_iterations_cap": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "min_iterations": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "objective": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationObjective"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_no_carton_candidates": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_no_carton_fits": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_no_dimensions": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_no_weight": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_split_prevented": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "on_weight_exceeded": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationExceptionAction"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "solver": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/CartonizationSolver"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "split_rule": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickSplitRule"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "title": "CartonizationPolicyForUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "CartonizationAlgorithm": {
              "enum": [
                "ExtremePoints"
              ],
              "type": "string"
            },
            "CartonizationExceptionAction": {
              "oneOf": [
                {
                  "description": "Legacy database value, retained for reading old policies only. New saves reject it: factory ShipAsIs is a pack-level property, not an exception fallback.",
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "Остановиться: без человека дальше нельзя.",
                  "enum": [
                    "Stop"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationObjective": {
              "oneOf": [
                {
                  "enum": [
                    "MinUnusedVolume",
                    "MinPickSplits",
                    "BalanceWeight"
                  ],
                  "type": "string"
                },
                {
                  "description": "Единственная цель, которую движок считает.",
                  "enum": [
                    "MinCartons"
                  ],
                  "type": "string"
                }
              ]
            },
            "CartonizationSolver": {
              "enum": [
                "BinPacking3d"
              ],
              "type": "string"
            },
            "PickSplitRule": {
              "oneOf": [
                {
                  "description": "Один пик можно разложить по нескольким коробкам.",
                  "enum": [
                    "Allow"
                  ],
                  "type": "string"
                },
                {
                  "description": "Пик не дробится: не влез целиком — не влез.",
                  "enum": [
                    "Prevent"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "algorithm": {
              "$ref": "#/definitions/CartonizationAlgorithm"
            },
            "code": {
              "type": "string"
            },
            "descr": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "iterations_per_unit_sq": {
              "format": "int32",
              "type": "integer"
            },
            "max_candidates": {
              "format": "int32",
              "type": "integer"
            },
            "max_iterations_cap": {
              "format": "int32",
              "type": "integer"
            },
            "min_iterations": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": [
                "string",
                "null"
              ]
            },
            "objective": {
              "$ref": "#/definitions/CartonizationObjective"
            },
            "on_no_carton_candidates": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_carton_fits": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_dimensions": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_no_weight": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_split_prevented": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "on_weight_exceeded": {
              "$ref": "#/definitions/CartonizationExceptionAction"
            },
            "solver": {
              "$ref": "#/definitions/CartonizationSolver"
            },
            "split_rule": {
              "$ref": "#/definitions/PickSplitRule"
            },
            "version": {
              "description": "Generation of the complete header + carton set.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "algorithm",
            "code",
            "descr",
            "id",
            "iterations_per_unit_sq",
            "max_candidates",
            "max_iterations_cap",
            "min_iterations",
            "mod_when",
            "mod_who",
            "objective",
            "on_no_carton_candidates",
            "on_no_carton_fits",
            "on_no_dimensions",
            "on_no_weight",
            "on_split_prevented",
            "on_weight_exceeded",
            "solver",
            "split_rule",
            "version"
          ],
          "title": "CartonizationPolicy",
          "type": "object"
        }
      },
      "summary": "Update cartonization policy header fields from the metadata form.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f21e40e6ca5d339e44108f4163e2f3c6c21c222d89a69dd1c2bec3b2b33aa76c",
      "x-quark-response-schema-hash": "sha256:d7ec2f4f550ee3b57254d6ca59adaed177c08de13695140cb6e78f41e911227a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "cartonization_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_cartonization_policy_detail_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "cartonization_policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "descr": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "handling_unit_type_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "inner_height": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "inner_length": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "inner_width": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_gross_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "max_units": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sequence": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "step_num": {
                "type": "string"
              },
              "tare_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "cartonization_policy_id",
              "step_num"
            ],
            "title": "CartonizationPolicyDetailForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "descr": {
              "type": "string"
            },
            "handling_unit_type_id": {
              "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
              "format": "double",
              "type": "number"
            },
            "max_units": {
              "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "sequence": {
              "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
              "format": "int32",
              "type": "integer"
            },
            "step_num": {
              "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
              "type": "string"
            },
            "tare_weight": {
              "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
              "format": "double",
              "type": "number"
            },
            "version": {
              "description": "Version of the aggregate root read with this carton.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "cartonization_policy_id",
            "descr",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "max_units",
            "mod_when",
            "mod_who",
            "sequence",
            "step_num",
            "tare_weight",
            "version"
          ],
          "title": "CartonizationPolicyDetailFormView",
          "type": "object"
        }
      },
      "summary": "Add one carton candidate through the metadata detail form.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:01af436399a8788a00b8dd76891e58aabc340f5d257a8d5c259e96e84d91def8",
      "x-quark-response-schema-hash": "sha256:4f230e612f6ba54b4e656168e8c4a12bff92a2a92d26872f887c865796a1584b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_cartonization_policy_detail_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "type": "object"
          },
          "summary": "Control-plane envelope supplied by the platform."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "properties": {
              "data": {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "properties": {
                  "active": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "descr": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "handling_unit_type_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "inner_height": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "inner_length": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "inner_width": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "max_gross_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "max_units": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "sequence": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "step_num": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "tare_weight": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "title": "CartonizationPolicyDetailForUpdate",
                "type": "object"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "expected_version",
              "data"
            ],
            "type": "object"
          },
          "summary": "Versioned update payload."
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "descr": {
              "type": "string"
            },
            "handling_unit_type_id": {
              "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
              "format": "double",
              "type": "number"
            },
            "max_units": {
              "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "sequence": {
              "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
              "format": "int32",
              "type": "integer"
            },
            "step_num": {
              "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
              "type": "string"
            },
            "tare_weight": {
              "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
              "format": "double",
              "type": "number"
            },
            "version": {
              "description": "Version of the aggregate root read with this carton.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "cartonization_policy_id",
            "descr",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "max_units",
            "mod_when",
            "mod_who",
            "sequence",
            "step_num",
            "tare_weight",
            "version"
          ],
          "title": "CartonizationPolicyDetailFormView",
          "type": "object"
        }
      },
      "summary": "Update one carton candidate through the metadata detail form.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7db5937f56873988615f9a31218679b6555d5b83bfa4acfc28054378535c0765",
      "x-quark-response-schema-hash": "sha256:4f230e612f6ba54b4e656168e8c4a12bff92a2a92d26872f887c865796a1584b",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "cartonization_policy",
          "id_field": "id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "delete_cartonization_policy_detail_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cartonization_policy_id": {
              "format": "int64",
              "type": "integer"
            },
            "descr": {
              "type": "string"
            },
            "handling_unit_type_id": {
              "description": "Тип тары, который этот кандидат планирует (`enterprise.handling_unit_type.id`, срез 7 отбора). `None` — любая подходящая по размеру коробка. Без FK: ссылки в enterprise держит сервис (wms-app 041).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "inner_height": {
              "format": "double",
              "type": "number"
            },
            "inner_length": {
              "description": "ВНУТРЕННИЕ габариты: солвер укладывает внутрь. Ноль — «неизвестно», и такая строка не может быть активной.",
              "format": "double",
              "type": "number"
            },
            "inner_width": {
              "format": "double",
              "type": "number"
            },
            "max_gross_weight": {
              "description": "Предел перевозчика на коробку ЦЕЛИКОМ, вместе с её тарой. Ноль — предела нет.",
              "format": "double",
              "type": "number"
            },
            "max_units": {
              "description": "Предел по числу вложенных единиц. Ноль — предела нет.",
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "sequence": {
              "description": "Порядок рассмотрения солвером. Не уникален; ничью доопределяет `id`.",
              "format": "int32",
              "type": "integer"
            },
            "step_num": {
              "description": "Код коробки-кандидата: `BOX-S`, `BOX-M`. Уникален в пределах политики.",
              "type": "string"
            },
            "tare_weight": {
              "description": "Вес пустой коробки. Ноль — «тара не учтена», допустимо только когда предела брутто нет вовсе.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "cartonization_policy_id",
            "descr",
            "id",
            "inner_height",
            "inner_length",
            "inner_width",
            "max_gross_weight",
            "max_units",
            "mod_when",
            "mod_who",
            "sequence",
            "step_num",
            "tare_weight"
          ],
          "title": "CartonizationPolicyDetail",
          "type": "object"
        }
      },
      "summary": "Delete one carton candidate through the metadata detail form.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f2649134d74bfd4daa8b4c70895cb7b774322d2b827fcfcf934453852c49b69c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_cartonization_policy_detail_form",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete selected carton candidates through the metadata list.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "cartonization_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "wave_id"
            ],
            "title": "WaveIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveOrder": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attempt_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_error_detail": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "outcome_order_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/OrderStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "outcome_order_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "processing_started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "release_expected_order_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_idempotency_key": {
                  "format": "uuid",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveOrderStatus"
                },
                "wave_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_count",
                "id",
                "mod_when",
                "mod_who",
                "order_id",
                "release_generation",
                "status",
                "wave_id"
              ],
              "type": "object"
            },
            "WaveOrderStatus": {
              "enum": [
                "Draft",
                "Pending",
                "Processing",
                "Released",
                "Blocked",
                "Failed",
                "Skipped"
              ],
              "type": "string"
            },
            "WaveProgress": {
              "properties": {
                "blocked": {
                  "format": "int64",
                  "type": "integer"
                },
                "draft": {
                  "format": "int64",
                  "type": "integer"
                },
                "failed": {
                  "format": "int64",
                  "type": "integer"
                },
                "pending": {
                  "format": "int64",
                  "type": "integer"
                },
                "processing": {
                  "format": "int64",
                  "type": "integer"
                },
                "released": {
                  "format": "int64",
                  "type": "integer"
                },
                "skipped": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "blocked",
                "draft",
                "failed",
                "pending",
                "processing",
                "released",
                "skipped"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "members": {
              "items": {
                "$ref": "#/definitions/WaveOrder"
              },
              "type": "array"
            },
            "progress": {
              "$ref": "#/definitions/WaveProgress"
            },
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "members",
            "progress",
            "wave"
          ],
          "title": "WaveDetails",
          "type": "object"
        }
      },
      "summary": "Get a Wave with members and progress.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f1508d715b015d2935fdda737ab8d37ba063c2b1b0639a634b619c046223521d",
      "x-quark-response-schema-hash": "sha256:f7ee8ca4c3d088ec164a7dd6836144e1191e3590569cac6df316e06fe87c2fc1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "default": 50,
                "format": "int64",
                "type": "integer"
              },
              "offset": {
                "default": 0,
                "format": "int64",
                "type": "integer"
              }
            },
            "title": "WaveListInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Wave"
          },
          "title": "Array_of_Wave",
          "type": "array"
        }
      },
      "summary": "List Waves.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a0d1f89811f33fb56bf109abb8916768bef5967aa9154b4cbd11a9d1eac2f488",
      "x-quark-response-schema-hash": "sha256:dd082cc4a8d095b0febf3e2d00b1ccc9569edd3a39dd58dcaddf331040198a28",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_header_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cancelled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "planned_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "policy_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "policy_run_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "release_generation": {
              "format": "int32",
              "type": "integer"
            },
            "release_requested_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "released_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "station_location": {
              "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/WaveStatus"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "mod_when",
            "mod_who",
            "release_generation",
            "status",
            "version"
          ],
          "title": "Wave",
          "type": "object"
        }
      },
      "summary": "Read a flat Wave header without advancing it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:92ae47b3f4aad7dfb3b26d2b782b3a7609b92eb7135acf13f12782d7ee8d6993",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_header_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Wave"
          },
          "title": "Array_of_Wave",
          "type": "array"
        }
      },
      "summary": "Filter and page Wave headers without release or membership changes.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:dd082cc4a8d095b0febf3e2d00b1ccc9569edd3a39dd58dcaddf331040198a28",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_preview",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "wave_id"
            ],
            "title": "WaveIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ValidationIssue": {
              "properties": {
                "field": {
                  "description": "The field an operator can act on — `ship_to_id`, `sku_code`, `lines`.",
                  "type": "string"
                },
                "line_no": {
                  "description": "Set when the issue is about one line.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "type": "object"
            },
            "ValidationReport": {
              "properties": {
                "errors": {
                  "items": {
                    "$ref": "#/definitions/ValidationIssue"
                  },
                  "type": "array"
                },
                "ok": {
                  "type": "boolean"
                },
                "warnings": {
                  "description": "Not blocking. A ship date in the past is worth saying out loud and not worth refusing — back-dated orders are a real thing.",
                  "items": {
                    "$ref": "#/definitions/ValidationIssue"
                  },
                  "type": "array"
                }
              },
              "required": [
                "errors",
                "ok",
                "warnings"
              ],
              "type": "object"
            },
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveOrder": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attempt_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_error_detail": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "outcome_order_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/OrderStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "outcome_order_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "processing_started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "release_expected_order_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_idempotency_key": {
                  "format": "uuid",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveOrderStatus"
                },
                "wave_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempt_count",
                "id",
                "mod_when",
                "mod_who",
                "order_id",
                "release_generation",
                "status",
                "wave_id"
              ],
              "type": "object"
            },
            "WaveOrderPreview": {
              "properties": {
                "member": {
                  "$ref": "#/definitions/WaveOrder"
                },
                "validation": {
                  "$ref": "#/definitions/ValidationReport"
                }
              },
              "required": [
                "member",
                "validation"
              ],
              "type": "object"
            },
            "WaveOrderStatus": {
              "enum": [
                "Draft",
                "Pending",
                "Processing",
                "Released",
                "Blocked",
                "Failed",
                "Skipped"
              ],
              "type": "string"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "blocked": {
              "format": "int64",
              "type": "integer"
            },
            "orders": {
              "items": {
                "$ref": "#/definitions/WaveOrderPreview"
              },
              "type": "array"
            },
            "ready": {
              "format": "int64",
              "type": "integer"
            },
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "blocked",
            "orders",
            "ready",
            "wave"
          ],
          "title": "WavePreview",
          "type": "object"
        }
      },
      "summary": "Preview release eligibility for every Wave order. Writes nothing.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f1508d715b015d2935fdda737ab8d37ba063c2b1b0639a634b619c046223521d",
      "x-quark-response-schema-hash": "sha256:9a736367f12e2f443927a9992d781079d13f5d151374f4a5417b0a7172fd5658",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_policy_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "policy_id"
            ],
            "title": "WavePolicyIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_release": {
              "type": "boolean"
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "eligible_statuses": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "group_by_carrier": {
              "type": "boolean"
            },
            "group_by_owner": {
              "type": "boolean"
            },
            "group_by_requested_ship_date": {
              "type": "boolean"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "include_undated": {
              "type": "boolean"
            },
            "is_active": {
              "type": "boolean"
            },
            "last_scheduled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "max_lines": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "max_orders": {
              "format": "int32",
              "type": "integer"
            },
            "max_waves_per_run": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "next_run_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority_from": {
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority_to": {
              "format": "int16",
              "type": [
                "integer",
                "null"
              ]
            },
            "requested_ship_days_ahead": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "schedule_interval_minutes": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "schedule_starts_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "station_location": {
              "description": "The distribution station every wave this policy builds names (R-4); `None` = no station.",
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "auto_release",
            "code",
            "eligible_statuses",
            "group_by_carrier",
            "group_by_owner",
            "group_by_requested_ship_date",
            "id",
            "include_undated",
            "is_active",
            "max_orders",
            "max_waves_per_run",
            "mod_when",
            "mod_who",
            "version"
          ],
          "title": "WavePolicy",
          "type": "object"
        }
      },
      "summary": "Get a Wave policy.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:384fc82497a3a46948e5ff359b95e9c15a07a95bd12ab5923e674b452f635afb",
      "x-quark-response-schema-hash": "sha256:0ed0b95f2d45ca432a26c2b52fe6e79dbf80a35bc70d8382a7d32121c4eee816",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_policy_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "default": 50,
                "format": "int64",
                "type": "integer"
              },
              "offset": {
                "default": 0,
                "format": "int64",
                "type": "integer"
              }
            },
            "title": "WaveListInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WavePolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_release": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eligible_statuses": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "group_by_carrier": {
                  "type": "boolean"
                },
                "group_by_owner": {
                  "type": "boolean"
                },
                "group_by_requested_ship_date": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "include_undated": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_scheduled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "max_lines": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_orders": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_waves_per_run": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_run_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_from": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_to": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requested_ship_days_ahead": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_interval_minutes": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_starts_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station every wave this policy builds names (R-4); `None` = no station.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_release",
                "code",
                "eligible_statuses",
                "group_by_carrier",
                "group_by_owner",
                "group_by_requested_ship_date",
                "id",
                "include_undated",
                "is_active",
                "max_orders",
                "max_waves_per_run",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/WavePolicy"
          },
          "title": "Array_of_WavePolicy",
          "type": "array"
        }
      },
      "summary": "List Wave policies.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a0d1f89811f33fb56bf109abb8916768bef5967aa9154b4cbd11a9d1eac2f488",
      "x-quark-response-schema-hash": "sha256:fb11a221774035f6a89e68fa84cac0e5daebbb0acd0d8fbf6e712ee49742f838",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_policy_preview",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "policy_id"
            ],
            "title": "WavePolicyIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "WavePolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_release": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eligible_statuses": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "group_by_carrier": {
                  "type": "boolean"
                },
                "group_by_owner": {
                  "type": "boolean"
                },
                "group_by_requested_ship_date": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "include_undated": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_scheduled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "max_lines": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_orders": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_waves_per_run": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_run_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_from": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_to": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requested_ship_days_ahead": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_interval_minutes": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_starts_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station every wave this policy builds names (R-4); `None` = no station.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_release",
                "code",
                "eligible_statuses",
                "group_by_carrier",
                "group_by_owner",
                "group_by_requested_ship_date",
                "id",
                "include_undated",
                "is_active",
                "max_orders",
                "max_waves_per_run",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            },
            "WavePolicyBatch": {
              "properties": {
                "group": {
                  "$ref": "#/definitions/WavePolicyGroup"
                },
                "line_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "orders": {
                  "items": {
                    "$ref": "#/definitions/WavePolicyCandidate"
                  },
                  "type": "array"
                }
              },
              "required": [
                "group",
                "line_count",
                "order_count",
                "orders"
              ],
              "type": "object"
            },
            "WavePolicyCandidate": {
              "description": "One currently eligible Order and the capacity fact W2a can prove before allocation: its active document-line count.",
              "properties": {
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "line_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "order_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "requested_ship_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/OrderStatus"
                }
              },
              "required": [
                "line_count",
                "order_id",
                "order_number",
                "order_version",
                "owner_id",
                "priority",
                "status"
              ],
              "type": "object"
            },
            "WavePolicyExclusion": {
              "properties": {
                "order": {
                  "$ref": "#/definitions/WavePolicyCandidate"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "order",
                "reason"
              ],
              "type": "object"
            },
            "WavePolicyGroup": {
              "properties": {
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requested_ship_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": "object"
            }
          },
          "properties": {
            "batches": {
              "items": {
                "$ref": "#/definitions/WavePolicyBatch"
              },
              "type": "array"
            },
            "candidate_count": {
              "format": "int32",
              "type": "integer"
            },
            "exclusions": {
              "items": {
                "$ref": "#/definitions/WavePolicyExclusion"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/WavePolicy"
            },
            "selected_order_count": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "batches",
            "candidate_count",
            "exclusions",
            "policy",
            "selected_order_count"
          ],
          "title": "WavePolicyPreview",
          "type": "object"
        }
      },
      "summary": "Preview the Draft Waves a policy would build. Writes nothing.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:384fc82497a3a46948e5ff359b95e9c15a07a95bd12ab5923e674b452f635afb",
      "x-quark-response-schema-hash": "sha256:7931135312685502564a1be700d537ad9fbdba54d5b2d195e14df4e421ae9615",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "code"
            ],
            "title": "CreateWave",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "wave"
          ],
          "title": "WaveMutationResult",
          "type": "object"
        }
      },
      "summary": "Create a manual Wave.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:92bfde708a34b9f3954c210efc72e1c4a3d82d6931a08f3607dc45f740815579",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c163f3c0bb2922ca2ab290c3b90aec02a982489d456a79a818440b91ea9048b9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_add_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_wave_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "priority": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sequence": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_wave_version",
              "order_id",
              "wave_id"
            ],
            "title": "AddOrderToWave",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "wave"
          ],
          "title": "WaveMutationResult",
          "type": "object"
        }
      },
      "summary": "Add an Order to a Draft Wave.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e54b63cb92efb05614bae60f357ae393673d442c76b9bfa2a7e97a6b8a8ac89b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c163f3c0bb2922ca2ab290c3b90aec02a982489d456a79a818440b91ea9048b9",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave",
          "id_field": "wave_id",
          "version_field": "expected_wave_version"
        }
      ]
    },
    {
      "name": "wave_remove_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_wave_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_wave_version",
              "order_id",
              "wave_id"
            ],
            "title": "RemoveOrderFromWave",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "wave"
          ],
          "title": "WaveMutationResult",
          "type": "object"
        }
      },
      "summary": "Remove an Order from a Draft Wave.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4c4b55f3535fbbf2a3addb23f7ac64fe59997c6ec8d44219eb5e1da5b47da144",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c163f3c0bb2922ca2ab290c3b90aec02a982489d456a79a818440b91ea9048b9",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave",
          "id_field": "wave_id",
          "version_field": "expected_wave_version"
        }
      ]
    },
    {
      "name": "wave_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_wave_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_wave_version",
              "wave_id"
            ],
            "title": "CancelWave",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "wave"
          ],
          "title": "WaveMutationResult",
          "type": "object"
        }
      },
      "summary": "Cancel a Wave before release starts.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:56693a30b5113e96cc21268010aec262f3c540caf247946d106f42779b6c3d6d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c163f3c0bb2922ca2ab290c3b90aec02a982489d456a79a818440b91ea9048b9",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave",
          "id_field": "wave_id",
          "version_field": "expected_wave_version"
        }
      ]
    },
    {
      "name": "wave_release",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_wave_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_wave_version",
              "wave_id"
            ],
            "title": "ReleaseWave",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveProgress": {
              "properties": {
                "blocked": {
                  "format": "int64",
                  "type": "integer"
                },
                "draft": {
                  "format": "int64",
                  "type": "integer"
                },
                "failed": {
                  "format": "int64",
                  "type": "integer"
                },
                "pending": {
                  "format": "int64",
                  "type": "integer"
                },
                "processing": {
                  "format": "int64",
                  "type": "integer"
                },
                "released": {
                  "format": "int64",
                  "type": "integer"
                },
                "skipped": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "blocked",
                "draft",
                "failed",
                "pending",
                "processing",
                "released",
                "skipped"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "progress": {
              "$ref": "#/definitions/WaveProgress"
            },
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "progress",
            "wave"
          ],
          "title": "WaveReleaseResult",
          "type": "object"
        }
      },
      "summary": "Freeze and enqueue a Wave for release.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:554af26f11ce339b6ee762b256338ff2ea64e0da401ed807195b030eade222ec",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f5abc43389a0b6370d3bdb60067d0a6a63c5564fef5ce95026d1a5bfde031428",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave",
          "id_field": "wave_id",
          "version_field": "expected_wave_version"
        }
      ]
    },
    {
      "name": "wave_retry_blocked",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_wave_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_wave_version",
              "wave_id"
            ],
            "title": "RetryWaveRelease",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveProgress": {
              "properties": {
                "blocked": {
                  "format": "int64",
                  "type": "integer"
                },
                "draft": {
                  "format": "int64",
                  "type": "integer"
                },
                "failed": {
                  "format": "int64",
                  "type": "integer"
                },
                "pending": {
                  "format": "int64",
                  "type": "integer"
                },
                "processing": {
                  "format": "int64",
                  "type": "integer"
                },
                "released": {
                  "format": "int64",
                  "type": "integer"
                },
                "skipped": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "blocked",
                "draft",
                "failed",
                "pending",
                "processing",
                "released",
                "skipped"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "progress": {
              "$ref": "#/definitions/WaveProgress"
            },
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "progress",
            "wave"
          ],
          "title": "WaveReleaseResult",
          "type": "object"
        }
      },
      "summary": "Retry only blocked or failed Wave orders.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4785acf92ab19195ab0d94d9734ba68ff811f5c0dc8843047a395110958c3755",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f5abc43389a0b6370d3bdb60067d0a6a63c5564fef5ce95026d1a5bfde031428",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave",
          "id_field": "wave_id",
          "version_field": "expected_wave_version"
        }
      ]
    },
    {
      "name": "wave_set_station",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Name the distribution station a Draft wave is released onto, or clear it (station distribution R-4). `stateful_command` on the wave's version: the supervisor chooses the station for the orders they see in the wave.",
            "properties": {
              "expected_wave_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "station_location": {
                "description": "A `Sort` location with positions; `None` clears the station.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_wave_version",
              "wave_id"
            ],
            "title": "SetWaveStation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "wave": {
              "$ref": "#/definitions/Wave"
            }
          },
          "required": [
            "wave"
          ],
          "title": "WaveMutationResult",
          "type": "object"
        }
      },
      "summary": "Name or clear the distribution station of a Draft Wave.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:409933a56b207bc1da220616158a0ef75b28823bcc25e2418f2f48e4e54ed97a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c163f3c0bb2922ca2ab290c3b90aec02a982489d456a79a818440b91ea9048b9",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave",
          "id_field": "wave_id",
          "version_field": "expected_wave_version"
        }
      ]
    },
    {
      "name": "wave_policy_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "WavePolicyForWrite": {
                "description": "The complete user-owned part of a policy. Create and save share one shape; scheduler/run facts are server-owned and therefore absent.",
                "properties": {
                  "auto_release": {
                    "default": false,
                    "type": "boolean"
                  },
                  "carrier_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "eligible_statuses": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "group_by_carrier": {
                    "type": "boolean"
                  },
                  "group_by_owner": {
                    "type": "boolean"
                  },
                  "group_by_requested_ship_date": {
                    "type": "boolean"
                  },
                  "include_undated": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "max_lines": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_orders": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "max_waves_per_run": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "owner_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "priority_from": {
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "priority_to": {
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "requested_ship_days_ahead": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "schedule_interval_minutes": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "schedule_starts_at": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "station_location": {
                    "default": null,
                    "description": "The distribution station the policy's waves are released onto (R-4). Absent or blank = none.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "code",
                  "eligible_statuses",
                  "group_by_carrier",
                  "group_by_owner",
                  "group_by_requested_ship_date",
                  "include_undated",
                  "is_active",
                  "max_orders",
                  "max_waves_per_run"
                ],
                "type": "object"
              }
            },
            "properties": {
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy": {
                "$ref": "#/definitions/WavePolicyForWrite"
              }
            },
            "required": [
              "policy"
            ],
            "title": "CreateWavePolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WavePolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_release": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eligible_statuses": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "group_by_carrier": {
                  "type": "boolean"
                },
                "group_by_owner": {
                  "type": "boolean"
                },
                "group_by_requested_ship_date": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "include_undated": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_scheduled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "max_lines": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_orders": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_waves_per_run": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_run_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_from": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_to": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requested_ship_days_ahead": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_interval_minutes": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_starts_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station every wave this policy builds names (R-4); `None` = no station.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_release",
                "code",
                "eligible_statuses",
                "group_by_carrier",
                "group_by_owner",
                "group_by_requested_ship_date",
                "id",
                "include_undated",
                "is_active",
                "max_orders",
                "max_waves_per_run",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "policy": {
              "$ref": "#/definitions/WavePolicy"
            }
          },
          "required": [
            "policy"
          ],
          "title": "WavePolicyMutationResult",
          "type": "object"
        }
      },
      "summary": "Create a Wave policy.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2403df898f7a454dadd49df655bf3bf02358a7220a3bc4d1ad8c41f91d3b9536",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:11d3c4325b1997190ccf7735ae373f3a97e5a2b04583e311ed1ee19540ce95cf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "wave_policy_save",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "WavePolicyForWrite": {
                "description": "The complete user-owned part of a policy. Create and save share one shape; scheduler/run facts are server-owned and therefore absent.",
                "properties": {
                  "auto_release": {
                    "default": false,
                    "type": "boolean"
                  },
                  "carrier_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "eligible_statuses": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "group_by_carrier": {
                    "type": "boolean"
                  },
                  "group_by_owner": {
                    "type": "boolean"
                  },
                  "group_by_requested_ship_date": {
                    "type": "boolean"
                  },
                  "include_undated": {
                    "type": "boolean"
                  },
                  "is_active": {
                    "type": "boolean"
                  },
                  "max_lines": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "max_orders": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "max_waves_per_run": {
                    "format": "int32",
                    "type": "integer"
                  },
                  "owner_id": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "priority_from": {
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "priority_to": {
                    "format": "int16",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "requested_ship_days_ahead": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "schedule_interval_minutes": {
                    "format": "int32",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "schedule_starts_at": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "station_location": {
                    "default": null,
                    "description": "The distribution station the policy's waves are released onto (R-4). Absent or blank = none.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "code",
                  "eligible_statuses",
                  "group_by_carrier",
                  "group_by_owner",
                  "group_by_requested_ship_date",
                  "include_undated",
                  "is_active",
                  "max_orders",
                  "max_waves_per_run"
                ],
                "type": "object"
              }
            },
            "properties": {
              "expected_policy_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy": {
                "$ref": "#/definitions/WavePolicyForWrite"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_policy_version",
              "policy",
              "policy_id"
            ],
            "title": "SaveWavePolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WavePolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_release": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eligible_statuses": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "group_by_carrier": {
                  "type": "boolean"
                },
                "group_by_owner": {
                  "type": "boolean"
                },
                "group_by_requested_ship_date": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "include_undated": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_scheduled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "max_lines": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_orders": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_waves_per_run": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_run_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_from": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_to": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requested_ship_days_ahead": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_interval_minutes": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_starts_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station every wave this policy builds names (R-4); `None` = no station.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_release",
                "code",
                "eligible_statuses",
                "group_by_carrier",
                "group_by_owner",
                "group_by_requested_ship_date",
                "id",
                "include_undated",
                "is_active",
                "max_orders",
                "max_waves_per_run",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "policy": {
              "$ref": "#/definitions/WavePolicy"
            }
          },
          "required": [
            "policy"
          ],
          "title": "WavePolicyMutationResult",
          "type": "object"
        }
      },
      "summary": "Save a versioned Wave policy.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:75abf1a0c38776be42e95ba61aec23f5d2f8614e21bf6afb3f48625b70cb60c5",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:11d3c4325b1997190ccf7735ae373f3a97e5a2b04583e311ed1ee19540ce95cf",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave_policy",
          "id_field": "policy_id",
          "version_field": "expected_policy_version"
        }
      ]
    },
    {
      "name": "wave_policy_build",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_policy_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_policy_version",
              "policy_id"
            ],
            "title": "BuildWavePolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "Wave": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_run_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "release_generation": {
                  "format": "int32",
                  "type": "integer"
                },
                "release_requested_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station (a `Sort` location) the wave is released onto; `None` = no station (wms-app 095, R-4).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/WaveStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "release_generation",
                "status",
                "version"
              ],
              "type": "object"
            },
            "WavePolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_release": {
                  "type": "boolean"
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eligible_statuses": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "group_by_carrier": {
                  "type": "boolean"
                },
                "group_by_owner": {
                  "type": "boolean"
                },
                "group_by_requested_ship_date": {
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "include_undated": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "last_scheduled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "max_lines": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "max_orders": {
                  "format": "int32",
                  "type": "integer"
                },
                "max_waves_per_run": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_run_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_from": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority_to": {
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "requested_ship_days_ahead": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_interval_minutes": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "schedule_starts_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The distribution station every wave this policy builds names (R-4); `None` = no station.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "auto_release",
                "code",
                "eligible_statuses",
                "group_by_carrier",
                "group_by_owner",
                "group_by_requested_ship_date",
                "id",
                "include_undated",
                "is_active",
                "max_orders",
                "max_waves_per_run",
                "mod_when",
                "mod_who",
                "version"
              ],
              "type": "object"
            },
            "WavePolicyCandidate": {
              "description": "One currently eligible Order and the capacity fact W2a can prove before allocation: its active document-line count.",
              "properties": {
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "line_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "order_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "requested_ship_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/OrderStatus"
                }
              },
              "required": [
                "line_count",
                "order_id",
                "order_number",
                "order_version",
                "owner_id",
                "priority",
                "status"
              ],
              "type": "object"
            },
            "WavePolicyExclusion": {
              "properties": {
                "order": {
                  "$ref": "#/definitions/WavePolicyCandidate"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "order",
                "reason"
              ],
              "type": "object"
            },
            "WavePolicyRun": {
              "properties": {
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "candidate_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error": {
                  "description": "Why a `Failed` run failed; `None` exactly when it succeeded.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "excluded_order_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "outcome": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/WavePolicyRunOutcome"
                    }
                  ],
                  "description": "`Failed` when a scheduled build was rolled back (wms-app 094, P-12): the slot is recorded and skipped rather than retried forever."
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "scheduled_for": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "selected_order_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "started_at": {
                  "type": "string"
                },
                "wave_count": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_who",
                "candidate_count",
                "excluded_order_count",
                "id",
                "outcome",
                "policy_id",
                "selected_order_count",
                "started_at",
                "wave_count"
              ],
              "type": "object"
            },
            "WavePolicyRunOutcome": {
              "enum": [
                "Succeeded",
                "Failed"
              ],
              "type": "string"
            },
            "WaveStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Released",
                "InProgress",
                "Completed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "exclusions": {
              "items": {
                "$ref": "#/definitions/WavePolicyExclusion"
              },
              "type": "array"
            },
            "policy": {
              "$ref": "#/definitions/WavePolicy"
            },
            "run": {
              "$ref": "#/definitions/WavePolicyRun"
            },
            "waves": {
              "items": {
                "$ref": "#/definitions/Wave"
              },
              "type": "array"
            }
          },
          "required": [
            "exclusions",
            "policy",
            "run",
            "waves"
          ],
          "title": "WavePolicyBuildResult",
          "type": "object"
        }
      },
      "summary": "Build bounded Draft Waves from a versioned Wave policy.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "wave",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:21e053db3287a9ddb4bfae15454b7415d83796d19a78e5396868569039fbd05c",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7bd08a8976fedb30332f9ad50f197955d8750b158683fffb21b2aaac80134639",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "wave_policy",
          "id_field": "policy_id",
          "version_field": "expected_policy_version"
        }
      ]
    },
    {
      "name": "dispatch_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "dispatch_id"
            ],
            "title": "DispatchIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchOrder": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lane_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "removed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "removed_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "order_id",
                "stop_id"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "DispatchStop": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "destination_ref": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_arrival_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_type": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "destination_ref",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "sequence",
                "stop_type"
              ],
              "type": "object"
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignmentView": {
              "properties": {
                "assignment": {
                  "$ref": "#/definitions/OutboundUnitAssignment"
                },
                "flow_status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "is_current_root": {
                  "type": "boolean"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "assignment",
                "flow_status",
                "is_current_root",
                "subject_container_id"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            },
            "orders": {
              "items": {
                "$ref": "#/definitions/DispatchOrder"
              },
              "type": "array"
            },
            "stops": {
              "items": {
                "$ref": "#/definitions/DispatchStop"
              },
              "type": "array"
            },
            "units": {
              "description": "Includes historical subjects; only `is_current_root` candidates can proceed to future Stage/Load validation.",
              "items": {
                "$ref": "#/definitions/OutboundUnitAssignmentView"
              },
              "type": "array"
            }
          },
          "required": [
            "dispatch",
            "orders",
            "stops",
            "units"
          ],
          "title": "DispatchDetails",
          "type": "object"
        }
      },
      "summary": "Get Dispatch stops, Order intent and physical unit assignments.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4fef2c5ac97db71c6d378d8bd2d806a2bbceaf6088693b974255639567990dd6",
      "x-quark-response-schema-hash": "sha256:18c96d4d7b2c52d47f33e25e8de981a867b903dd37e5aa40363d9eb88afc9e0b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "default": 50,
                "format": "int64",
                "type": "integer"
              },
              "offset": {
                "default": 0,
                "format": "int64",
                "type": "integer"
              }
            },
            "title": "DispatchListInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Dispatch"
          },
          "title": "Array_of_Dispatch",
          "type": "array"
        }
      },
      "summary": "List Dispatches.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1c3b00f8d7f3051da1dcb64f4da4eeb15a36072abf46cff35b61d33589a4a0f1",
      "x-quark-response-schema-hash": "sha256:287782fe8512533e80e0b4834c678defac5ff69e32d4aa524213dec6a254c76f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_header_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "cancelled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "door_location_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "external_ref": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "planned_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "planned_departure_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "route_editable": {
              "description": "Advisory display gate; commands repeat it under the complete lock set.",
              "type": "boolean"
            },
            "status": {
              "$ref": "#/definitions/DispatchStatus"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "mod_when",
            "mod_who",
            "route_editable",
            "status",
            "version"
          ],
          "title": "DispatchPlanningHeader",
          "type": "object"
        }
      },
      "summary": "Read a flat Dispatch header and its current version, without claiming work.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:1b5129c5deb7e5b2cc7f966c89cff3d763afec48d4d1daaaff1239f5166b5264",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_header_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/Dispatch"
          },
          "title": "Array_of_Dispatch",
          "type": "array"
        }
      },
      "summary": "Filter and page Dispatch headers for planning.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:287782fe8512533e80e0b4834c678defac5ff69e32d4aa524213dec6a254c76f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_stop_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DispatchStop": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "destination_ref": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_arrival_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_type": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "destination_ref",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "sequence",
                "stop_type"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/DispatchStop"
          },
          "title": "Array_of_DispatchStop",
          "type": "array"
        }
      },
      "summary": "Filter and page ordered Dispatch stops, without changing their sequence.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:0a3d31656b0bc4136cd3013002a2891d3a7a25600ed10bfbe2e0ea9a1e3cad5b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_order_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DispatchOrder": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lane_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "removed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "removed_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "order_id",
                "stop_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/DispatchOrder"
          },
          "title": "Array_of_DispatchOrder",
          "type": "array"
        }
      },
      "summary": "Filter and page current Order transport intent; removed history is excluded.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:be1a4cd2d51b79c94fda00b4d7b320f48ec56efd6f24fd962b94f5dd02d81302",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "door_location_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "external_ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "planned_departure_at": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "CreateDispatch",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            }
          },
          "required": [
            "dispatch"
          ],
          "title": "DispatchMutationResult",
          "type": "object"
        }
      },
      "summary": "Create a manual Dispatch.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9cca8771eb4a6f9bc300101e42a624a7ad4639959a456105727fdf70044c0529",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:8436666d3124f67a8ffa93846f1fa65f9865822949239f744d77716c3b6256fd",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "dispatch_add_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_dispatch_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "lane_ref": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "preferred_stage_location_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "stop_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "dispatch_id",
              "expected_dispatch_version",
              "order_id",
              "stop_id"
            ],
            "title": "AssignOrderToDispatch",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            }
          },
          "required": [
            "dispatch"
          ],
          "title": "DispatchMutationResult",
          "type": "object"
        }
      },
      "summary": "Add active Order planning intent to a Draft Dispatch.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b82d4f25383b037b9efed512cffac80e6dd244d02578f09f4534ab954b9fbb02",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:8436666d3124f67a8ffa93846f1fa65f9865822949239f744d77716c3b6256fd",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dispatch",
          "id_field": "dispatch_id",
          "version_field": "expected_dispatch_version"
        }
      ]
    },
    {
      "name": "dispatch_remove_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_dispatch_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "dispatch_id",
              "expected_dispatch_version",
              "order_id"
            ],
            "title": "RemoveOrderFromDispatch",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            }
          },
          "required": [
            "dispatch"
          ],
          "title": "DispatchMutationResult",
          "type": "object"
        }
      },
      "summary": "Remove active Order planning intent from a Draft Dispatch.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d49c7d1205673587b7cb4942f89237018ea3a8c3bd35ce44b168a76e537021c6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:8436666d3124f67a8ffa93846f1fa65f9865822949239f744d77716c3b6256fd",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dispatch",
          "id_field": "dispatch_id",
          "version_field": "expected_dispatch_version"
        }
      ]
    },
    {
      "name": "dispatch_stop_add",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "destination_ref": {
                "type": "string"
              },
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_dispatch_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "planned_arrival_at": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "planned_departure_at": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "sequence": {
                "format": "int32",
                "type": "integer"
              }
            },
            "required": [
              "destination_ref",
              "dispatch_id",
              "expected_dispatch_version",
              "sequence"
            ],
            "title": "AddDispatchStop",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "DispatchStop": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "destination_ref": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_arrival_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_type": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "destination_ref",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "sequence",
                "stop_type"
              ],
              "type": "object"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            },
            "stop": {
              "$ref": "#/definitions/DispatchStop"
            }
          },
          "required": [
            "dispatch",
            "stop"
          ],
          "title": "DispatchStopResult",
          "type": "object"
        }
      },
      "summary": "Add an ordered delivery stop to a Draft Dispatch.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b4cac1a8291451db1c818bacf1ed7b4058a907b6bc6fd10de1ea8515ac62170f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cc41cfd29e2ec2cc19e166313cba55868f691a5c4b4dd734de26023f50c3ec15",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dispatch",
          "id_field": "dispatch_id",
          "version_field": "expected_dispatch_version"
        }
      ]
    },
    {
      "name": "dispatch_stop_update",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "destination_ref": {
                "type": "string"
              },
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_dispatch_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "planned_arrival_at": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "planned_departure_at": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "stop_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "destination_ref",
              "dispatch_id",
              "expected_dispatch_version",
              "stop_id"
            ],
            "title": "UpdateDispatchStop",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "DispatchStop": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "destination_ref": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_arrival_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_type": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "destination_ref",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "sequence",
                "stop_type"
              ],
              "type": "object"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            },
            "stop": {
              "$ref": "#/definitions/DispatchStop"
            }
          },
          "required": [
            "dispatch",
            "stop"
          ],
          "title": "DispatchStopResult",
          "type": "object"
        }
      },
      "summary": "Edit a delivery stop on a Draft Dispatch.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:710b88560dfbb46ab528604c700beee2f5cd9e77138e072fe5491d59c62c5fb0",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cc41cfd29e2ec2cc19e166313cba55868f691a5c4b4dd734de26023f50c3ec15",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dispatch",
          "id_field": "dispatch_id",
          "version_field": "expected_dispatch_version"
        }
      ]
    },
    {
      "name": "dispatch_stop_resequence",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_dispatch_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "ordered_stop_ids": {
                "description": "The complete stop id permutation. Stored sequences become 10, 20, …",
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "dispatch_id",
              "expected_dispatch_version",
              "ordered_stop_ids"
            ],
            "title": "ResequenceDispatchStops",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "DispatchStop": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "destination_ref": {
                  "type": "string"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_arrival_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "stop_type": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "destination_ref",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "sequence",
                "stop_type"
              ],
              "type": "object"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            },
            "stops": {
              "items": {
                "$ref": "#/definitions/DispatchStop"
              },
              "type": "array"
            }
          },
          "required": [
            "dispatch",
            "stops"
          ],
          "title": "ResequenceDispatchStopsResult",
          "type": "object"
        }
      },
      "summary": "Replace the complete stop order of a Draft Dispatch and audit it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:536e547ff02a34057218ed5c5d6c269cee9e3cd34086405fd74536881c798fea",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cc8c7179881ed283747e75de17eaa42479f38859e10983a237ed910ece09aff4",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dispatch",
          "id_field": "dispatch_id",
          "version_field": "expected_dispatch_version"
        }
      ]
    },
    {
      "name": "dispatch_plan",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "dispatch_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_dispatch_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "dispatch_id",
              "expected_dispatch_version"
            ],
            "title": "PlanDispatch",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Dispatch": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "door_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "external_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "planned_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_departure_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/DispatchStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "mod_when",
                "mod_who",
                "status",
                "version"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "dispatch": {
              "$ref": "#/definitions/Dispatch"
            }
          },
          "required": [
            "dispatch"
          ],
          "title": "DispatchMutationResult",
          "type": "object"
        }
      },
      "summary": "Freeze a manually prepared Dispatch as Planned.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "dispatch",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:abf5d211627fdf227e9496a6294b566f66c612d43a15237563c53ac4d4ec351b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:8436666d3124f67a8ffa93846f1fa65f9865822949239f744d77716c3b6256fd",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "dispatch",
          "id_field": "dispatch_id",
          "version_field": "expected_dispatch_version"
        }
      ]
    },
    {
      "name": "outbound_unit_assignment_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "outbound_flow_unit_id"
            ],
            "title": "UnitIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DispatchOrder": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lane_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "removed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "removed_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "order_id",
                "stop_id"
              ],
              "type": "object"
            },
            "DispatchStatus": {
              "enum": [
                "Draft",
                "Planned",
                "Shipped",
                "Cancelled"
              ],
              "type": "string"
            },
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "OutboundUnitAssignmentChange": {
              "properties": {
                "after_assignment": true,
                "assignment_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "before_assignment": true,
                "changed_at": {
                  "type": "string"
                },
                "changed_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "after_assignment",
                "assignment_version",
                "changed_at",
                "changed_by",
                "id",
                "outbound_flow_unit_id",
                "reason"
              ],
              "type": "object"
            },
            "StagedRemainderReview": {
              "properties": {
                "execution_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "previous_dispatch_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/DispatchStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stage_location": {
                  "type": "string"
                },
                "stage_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "execution_id",
                "stage_location",
                "stage_version"
              ],
              "type": "object"
            },
            "UnitAssignmentPresentation": {
              "properties": {
                "container_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "current_dispatch_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "current_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "current_stop_sequence": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "target_dispatch_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "target_dispatch_status": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/DispatchStatus"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "target_stop_sequence": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "type": "object"
            },
            "UnitAssignmentState": {
              "properties": {
                "assignment": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/OutboundUnitAssignment"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "assignment_version": {
                  "description": "Zero denotes absence, and is the only valid Assign version.",
                  "format": "int32",
                  "type": "integer"
                },
                "is_current_root": {
                  "type": "boolean"
                },
                "nested_units": {
                  "description": "Composite replan belongs to the future Consolidation door.",
                  "type": "boolean"
                },
                "order_intent": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/DispatchOrder"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Immutable membership id: echo it to refuse a stale transport plan."
                },
                "packing_open": {
                  "type": "boolean"
                },
                "stage_committed": {
                  "description": "Authoritative physical Stage commitment, independent of Router markers.",
                  "type": "boolean"
                },
                "unit": {
                  "$ref": "#/definitions/OutboundFlowUnit"
                }
              },
              "required": [
                "assignment_version",
                "is_current_root",
                "nested_units",
                "packing_open",
                "stage_committed",
                "unit"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "history": {
              "description": "Explicit changes only; initial automatic provenance is in assignment.",
              "items": {
                "$ref": "#/definitions/OutboundUnitAssignmentChange"
              },
              "type": "array"
            },
            "presentation": {
              "allOf": [
                {
                  "$ref": "#/definitions/UnitAssignmentPresentation"
                }
              ],
              "default": {
                "container_code": null,
                "current_dispatch_code": null,
                "current_location": null,
                "current_stop_sequence": null,
                "order_number": null,
                "target_dispatch_code": null,
                "target_dispatch_status": null,
                "target_stop_sequence": null
              },
              "description": "Readable facts from the SAME snapshot as assignment/intent, never a second container/Dispatch read that could describe a different plan."
            },
            "staged_remainder": {
              "anyOf": [
                {
                  "$ref": "#/definitions/StagedRemainderReview"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "state": {
              "$ref": "#/definitions/UnitAssignmentState"
            }
          },
          "required": [
            "history",
            "state"
          ],
          "title": "UnitAssignmentDetails",
          "type": "object"
        }
      },
      "summary": "Get unit transport intent, current Order plan and explicit change history.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "outbound_unit_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3601c55e4518d1a208842c8634682ae0dc0a7364d4d5b7df556af45165766b70",
      "x-quark-response-schema-hash": "sha256:b7640a8f03c645451070fb2ba2fecad2785ac4d9be53f48d7d1ddd5a4e822e66",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "outbound_unit_assign",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_assignment_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_order_intent_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "expected_assignment_version",
              "expected_order_intent_id",
              "outbound_flow_unit_id",
              "reason"
            ],
            "title": "AssignOutboundUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "$ref": "#/definitions/OutboundUnitAssignment"
            }
          },
          "required": [
            "assignment"
          ],
          "title": "UnitAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Assign an unassigned physical root from the confirmed current Order plan (version 0).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "outbound_unit_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d542aff17b7d23c4f99ea95fb27cf982b57a7bf0f1161c6e3aaa6580ba9688b5",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9465d01a48c987c61db343e077a5a671b6283d67263937e32c782f937f814a05",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_unit_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_assignment_version"
        }
      ]
    },
    {
      "name": "outbound_unit_reassign",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_assignment_version": {
                "format": "int32",
                "type": "integer"
              },
              "expected_order_intent_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "outbound_flow_unit_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "expected_assignment_version",
              "expected_order_intent_id",
              "outbound_flow_unit_id",
              "reason"
            ],
            "title": "ReassignOutboundUnit",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OutboundUnitAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "outbound_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "preferred_stage_location_id": {
                  "description": "A planning hint, not the unit's physical location.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_order_intent_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/UnitAssignmentStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "dispatch_id",
                "id",
                "mod_when",
                "mod_who",
                "outbound_flow_unit_id",
                "source_order_intent_id",
                "status",
                "stop_id",
                "version"
              ],
              "type": "object"
            },
            "UnitAssignmentStatus": {
              "enum": [
                "Assigned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "assignment": {
              "$ref": "#/definitions/OutboundUnitAssignment"
            }
          },
          "required": [
            "assignment"
          ],
          "title": "UnitAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Explicitly align an assigned physical root with its confirmed current Order plan; no stock movement.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "outbound_unit_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b5362235bee70c2d26e55da13d7d90942ec79133d23d5d7d767d492661e96a1f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9465d01a48c987c61db343e077a5a671b6283d67263937e32c782f937f814a05",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "outbound_unit_assignment",
          "id_field": "outbound_flow_unit_id",
          "version_field": "expected_assignment_version"
        }
      ]
    },
    {
      "name": "get_shipment_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderSource": {
              "enum": [
                "Ui",
                "Api"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "cancel_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "cancelled_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "carrier_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "close_summary": true,
            "closed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "notes": {
              "type": [
                "string",
                "null"
              ]
            },
            "order_date": {
              "type": "string"
            },
            "order_number": {
              "type": "string"
            },
            "order_type_id": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "released_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "requested_ship_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "ship_to_id": {
              "format": "int64",
              "type": "integer"
            },
            "ship_to_snapshot": {
              "description": "The ship-to address as frozen at release. Subscribers and documents must read THIS, not a live `owner_address` lookup, or editing a customer rewrites what an already-released order promised."
            },
            "source": {
              "$ref": "#/definitions/OrderSource"
            },
            "status": {
              "$ref": "#/definitions/OrderStatus"
            },
            "version": {
              "description": "Per-row OCC version, independent of `shipment_order_line.version`. Two operators editing two different lines must not collide on the header (ADR-072 §5).",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "id",
            "order_date",
            "order_number",
            "order_type_id",
            "owner_id",
            "priority",
            "ship_to_id",
            "source",
            "status",
            "version"
          ],
          "title": "ShipmentOrder",
          "type": "object"
        }
      },
      "summary": "Get a shipment order",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:f327797339259e2dad94ea94e1fa6b104480b59026ed6ad696d0a995f602e6ba",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_shipment_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderSource": {
              "enum": [
                "Ui",
                "Api"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ShipmentOrder": {
              "properties": {
                "cancel_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_summary": true,
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_date": {
                  "type": "string"
                },
                "order_number": {
                  "type": "string"
                },
                "order_type_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "requested_ship_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_to_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "ship_to_snapshot": {
                  "description": "The ship-to address as frozen at release. Subscribers and documents must read THIS, not a live `owner_address` lookup, or editing a customer rewrites what an already-released order promised."
                },
                "source": {
                  "$ref": "#/definitions/OrderSource"
                },
                "status": {
                  "$ref": "#/definitions/OrderStatus"
                },
                "version": {
                  "description": "Per-row OCC version, independent of `shipment_order_line.version`. Two operators editing two different lines must not collide on the header (ADR-072 §5).",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "order_date",
                "order_number",
                "order_type_id",
                "owner_id",
                "priority",
                "ship_to_id",
                "source",
                "status",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ShipmentOrder"
          },
          "title": "Array_of_ShipmentOrder",
          "type": "array"
        }
      },
      "summary": "List shipment orders (filtered)",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:8e0bbdae2841977db2d2a25ac7b43044b4710b5b8a8af7bd509558d1a3303b82",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_shipment_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count shipment orders",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_shipment_order_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "allocation_policy_id": {
              "description": "Frozen allocation-policy identity. Nullable during expand/backfill; new-runtime writes become mandatory only in the contract migration.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "allocation_policy_version": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "cancel_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "external_line_no": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_id": {
              "format": "int64",
              "type": "integer"
            },
            "pack_requested": {
              "description": "`true`: the customer ordered `pack_id`, and the line is reserved only from stock of that pack. `false`: `pack_id` is the SKU's pack, put there because the order named none, and stock of any pack of the SKU is a candidate.",
              "type": "boolean"
            },
            "pick_instruction": {
              "description": "One-off pick instruction for this line, from the ERP (wms-app 044): shown on its picks and acknowledged before a pick commits (RF `PICKINS`).",
              "type": [
                "string",
                "null"
              ]
            },
            "qty_allocated": {
              "description": "Always 0 in Phase 1 — written by allocation in Phase 2.",
              "format": "double",
              "type": "number"
            },
            "qty_cancelled": {
              "format": "double",
              "type": "number"
            },
            "qty_ordered": {
              "description": "All five counters are in BASE units.",
              "format": "double",
              "type": "number"
            },
            "qty_picked": {
              "description": "Always 0 in Phase 1 — written by picking in Phase 3.",
              "format": "double",
              "type": "number"
            },
            "qty_shipped": {
              "description": "Always 0 in Phase 1 — written by shipping in Phase 3.",
              "format": "double",
              "type": "number"
            },
            "sku_code": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "uom": {
              "type": "string"
            },
            "uom_factor": {
              "description": "`pack_item.base_qty` snapshot taken when the line was created. Stored — unlike on `receipt_detail` — so a later `pack_item` edit cannot rewrite what a historical line meant.",
              "format": "double",
              "type": "number"
            },
            "version": {
              "description": "Per-line OCC, independent of the header's version.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "id",
            "line_no",
            "order_id",
            "owner_id",
            "pack_id",
            "pack_requested",
            "qty_allocated",
            "qty_cancelled",
            "qty_ordered",
            "qty_picked",
            "qty_shipped",
            "sku_code",
            "status",
            "uom",
            "uom_factor",
            "version"
          ],
          "title": "ShipmentOrderLine",
          "type": "object"
        }
      },
      "summary": "Get a shipment order line",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:b16b242b448ae1d8a5f89d58a450a908939033816fc81e10b11e3f4f86c537b4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_shipment_order_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ShipmentOrderLine": {
              "properties": {
                "allocation_policy_id": {
                  "description": "Frozen allocation-policy identity. Nullable during expand/backfill; new-runtime writes become mandatory only in the contract migration.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "allocation_policy_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "cancel_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_line_no": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_requested": {
                  "description": "`true`: the customer ordered `pack_id`, and the line is reserved only from stock of that pack. `false`: `pack_id` is the SKU's pack, put there because the order named none, and stock of any pack of the SKU is a candidate.",
                  "type": "boolean"
                },
                "pick_instruction": {
                  "description": "One-off pick instruction for this line, from the ERP (wms-app 044): shown on its picks and acknowledged before a pick commits (RF `PICKINS`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty_allocated": {
                  "description": "Always 0 in Phase 1 — written by allocation in Phase 2.",
                  "format": "double",
                  "type": "number"
                },
                "qty_cancelled": {
                  "format": "double",
                  "type": "number"
                },
                "qty_ordered": {
                  "description": "All five counters are in BASE units.",
                  "format": "double",
                  "type": "number"
                },
                "qty_picked": {
                  "description": "Always 0 in Phase 1 — written by picking in Phase 3.",
                  "format": "double",
                  "type": "number"
                },
                "qty_shipped": {
                  "description": "Always 0 in Phase 1 — written by shipping in Phase 3.",
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/OrderLineStatus"
                },
                "uom": {
                  "type": "string"
                },
                "uom_factor": {
                  "description": "`pack_item.base_qty` snapshot taken when the line was created. Stored — unlike on `receipt_detail` — so a later `pack_item` edit cannot rewrite what a historical line meant.",
                  "format": "double",
                  "type": "number"
                },
                "version": {
                  "description": "Per-line OCC, independent of the header's version.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "line_no",
                "order_id",
                "owner_id",
                "pack_id",
                "pack_requested",
                "qty_allocated",
                "qty_cancelled",
                "qty_ordered",
                "qty_picked",
                "qty_shipped",
                "sku_code",
                "status",
                "uom",
                "uom_factor",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ShipmentOrderLine"
          },
          "title": "Array_of_ShipmentOrderLine",
          "type": "array"
        }
      },
      "summary": "List shipment order lines (filtered)",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:e0a4e1767f60a3d5600675306e604f1f018c1078522f71dcd5f1c425208081ec",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_shipment_order_line",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count shipment order lines",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_order_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "active": {
              "type": "boolean"
            },
            "allows_partial_ship": {
              "description": "Read by Phase 3 shipping. Here because a boolean on a type table has a KNOWN shape and only a missing consumer (ADR-072 §1).",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "requires_release": {
              "type": "boolean"
            }
          },
          "required": [
            "active",
            "allows_partial_ship",
            "code",
            "id",
            "name",
            "requires_release"
          ],
          "title": "OrderType",
          "type": "object"
        }
      },
      "summary": "Get an order type",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:0782cd595745f997047cfbd6a4d2df1061d8a7b1bbab33189cdfe5d6fb2324fc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_order_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderType": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "allows_partial_ship": {
                  "description": "Read by Phase 3 shipping. Here because a boolean on a type table has a KNOWN shape and only a missing consumer (ADR-072 §1).",
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "requires_release": {
                  "type": "boolean"
                }
              },
              "required": [
                "active",
                "allows_partial_ship",
                "code",
                "id",
                "name",
                "requires_release"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OrderType"
          },
          "title": "Array_of_OrderType",
          "type": "array"
        }
      },
      "summary": "List order types (filtered)",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b5c6579c6a89dd58cf4fca7bd4b1ac2d7a25fae554989994204683aa0b0ef89f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_order_type",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count order types",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "find_shipment_order_by_number",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "number": {
                "description": "`shipment_order.order_number` — UNIQUE per warehouse schema.",
                "type": "string"
              }
            },
            "required": [
              "number"
            ],
            "title": "FindOrderByNumberInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/ShipmentOrder"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "OrderSource": {
              "enum": [
                "Ui",
                "Api"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "ShipmentOrder": {
              "properties": {
                "cancel_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "close_summary": true,
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "notes": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_date": {
                  "type": "string"
                },
                "order_number": {
                  "type": "string"
                },
                "order_type_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "released_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "requested_ship_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ship_to_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "ship_to_snapshot": {
                  "description": "The ship-to address as frozen at release. Subscribers and documents must read THIS, not a live `owner_address` lookup, or editing a customer rewrites what an already-released order promised."
                },
                "source": {
                  "$ref": "#/definitions/OrderSource"
                },
                "status": {
                  "$ref": "#/definitions/OrderStatus"
                },
                "version": {
                  "description": "Per-row OCC version, independent of `shipment_order_line.version`. Two operators editing two different lines must not collide on the header (ADR-072 §5).",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "order_date",
                "order_number",
                "order_type_id",
                "owner_id",
                "priority",
                "ship_to_id",
                "source",
                "status",
                "version"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_ShipmentOrder"
        }
      },
      "summary": "Find a shipment order by order_number",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9727d1005b4ea4670bb669365c93a75a037e9267751f2bb11661a3c4c9260f4e",
      "x-quark-response-schema-hash": "sha256:851314f88a317b3a069746936e7b1378c7725fb97927180768eb343fa80e209a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_shipment_order_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "order_id"
            ],
            "title": "OrderIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Get a shipment order with its lines",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e8d440303ab67d5e870f904d9865b6a0eb7ae40b217f343d903ded5aaf35b996",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_shipment_order_line_lot_requirements",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "line_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "line_id"
            ],
            "title": "OrderLineIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/ShipmentOrderLineLotRequirement"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "ShipmentOrderExpectedLotAttribute": {
              "properties": {
                "attribute_code": {
                  "type": "string"
                },
                "attribute_value": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_policy_attribute_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_line_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "attribute_code",
                "attribute_value",
                "id",
                "order_line_id"
              ],
              "type": "object"
            },
            "ShipmentOrderLineLotRequirement": {
              "properties": {
                "attributes": {
                  "items": {
                    "$ref": "#/definitions/ShipmentOrderExpectedLotAttribute"
                  },
                  "type": "array"
                },
                "order_line_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "requirement_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "attributes",
                "order_line_id",
                "requirement_version"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_ShipmentOrderLineLotRequirement"
        }
      },
      "summary": "Get one shipment Order line's expected lot requirements",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6f699efaac57f23057c22be5bdc4da688fb9ad81072cd09454c71a2ad378b41c",
      "x-quark-response-schema-hash": "sha256:80f61be2c6480efa1f98cc9b8b53311f0b8b40bac47f39c6e006743b44bafd38",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_fulfilment_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ShipmentFulfilmentLine": {
              "description": "All quantities are base units, regardless of the Order line's input UOM.",
              "properties": {
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty_cancelled": {
                  "format": "double",
                  "type": "number"
                },
                "qty_ordered": {
                  "format": "double",
                  "type": "number"
                },
                "qty_picked": {
                  "format": "double",
                  "type": "number"
                },
                "qty_remaining": {
                  "description": "Effective demand not yet shipped, including unreserved demand.",
                  "format": "double",
                  "type": "number"
                },
                "qty_shipped": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "line_no",
                "order_id",
                "owner_id",
                "qty_cancelled",
                "qty_ordered",
                "qty_picked",
                "qty_remaining",
                "qty_shipped",
                "sku_code",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ShipmentFulfilmentLine"
          },
          "title": "Array_of_ShipmentFulfilmentLine",
          "type": "array"
        }
      },
      "summary": "Current Order fulfilment by line, including unreserved demand; all quantities in base units.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b6fd9b8765461c690c9d865df87b2cf5d196512804d2421db58fdf10f3f9e01a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_shipment_history",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ShipmentHistoryLine": {
              "description": "One immutable receipt delta per commercial Order line, not per Pick. Line number/SKU are the referenced line's identity, not a lot snapshot.",
              "properties": {
                "goods_issue_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "description": "Collision-free composite identity (receipt id : Order line id).",
                  "type": "string"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "load_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_line_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "shipped_at": {
                  "type": "string"
                },
                "shipped_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "goods_issue_id",
                "id",
                "line_no",
                "order_id",
                "order_line_id",
                "qty",
                "shipped_at",
                "shipped_by",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ShipmentHistoryLine"
          },
          "title": "Array_of_ShipmentHistoryLine",
          "type": "array"
        }
      },
      "summary": "Immutable Goods Issue deltas by Order line; read only, no shipment retry or stock movement.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b0492675a9127db07301f1401be4c61f28589e528157d3ba30e3775ff0f2f97a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_validate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "order_id"
            ],
            "title": "OrderIdInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ValidationIssue": {
              "properties": {
                "field": {
                  "description": "The field an operator can act on — `ship_to_id`, `sku_code`, `lines`.",
                  "type": "string"
                },
                "line_no": {
                  "description": "Set when the issue is about one line.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "type": "object"
            }
          },
          "properties": {
            "errors": {
              "items": {
                "$ref": "#/definitions/ValidationIssue"
              },
              "type": "array"
            },
            "ok": {
              "type": "boolean"
            },
            "warnings": {
              "description": "Not blocking. A ship date in the past is worth saying out loud and not worth refusing — back-dated orders are a real thing.",
              "items": {
                "$ref": "#/definitions/ValidationIssue"
              },
              "type": "array"
            }
          },
          "required": [
            "errors",
            "ok",
            "warnings"
          ],
          "title": "ValidationReport",
          "type": "object"
        }
      },
      "summary": "Dry-run the release checks. Writes nothing.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e8d440303ab67d5e870f904d9865b6a0eb7ae40b217f343d903ded5aaf35b996",
      "x-quark-response-schema-hash": "sha256:c28a5df5b7e9abfa044b1f37f28af6438b71f977db002327168ca3167ca27ff0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "NewOrderLine": {
                "properties": {
                  "external_line_no": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "pack_id": {
                    "description": "The pack the customer ordered: the line is then reserved only from stock of it. Absent: the line takes the SKU's pack and is reserved from stock of any pack of the SKU. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.",
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "pick_instruction": {
                    "description": "One-off pick instruction for this line (wms-app 044), shown and acknowledged on its picks. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "qty": {
                    "description": "Quantity in BASE units.",
                    "format": "double",
                    "type": "number"
                  },
                  "sku_code": {
                    "type": "string"
                  },
                  "uom": {
                    "description": "Entry UOM. `uom_factor` is resolved from `pack_item` and snapshotted.",
                    "type": "string"
                  }
                },
                "required": [
                  "qty",
                  "sku_code",
                  "uom"
                ],
                "type": "object"
              },
              "OrderSource": {
                "enum": [
                  "Ui",
                  "Api"
                ],
                "type": "string"
              }
            },
            "properties": {
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lines": {
                "description": "May be empty: a draft is allowed to exist before its first line does. `release` is where \"at least one line\" is enforced.",
                "items": {
                  "$ref": "#/definitions/NewOrderLine"
                },
                "type": "array"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order_number": {
                "default": null,
                "description": "A number already drawn from the `shipment_order` counter.\n\nThe screen reserves one when it opens the form so the operator can see it while typing; leave it out and the command draws its own. Not a way to choose a number — `UNIQUE (order_number)` refuses an invented one.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "order_type_code": {
                "type": "string"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "priority": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "requested_ship_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "ship_to_id": {
                "format": "int64",
                "type": "integer"
              },
              "source": {
                "$ref": "#/definitions/OrderSource"
              }
            },
            "required": [
              "idempotency_key",
              "lines",
              "order_type_code",
              "owner_id",
              "ship_to_id",
              "source"
            ],
            "title": "CreateShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "line_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "line_ids",
            "order_id",
            "order_number",
            "version"
          ],
          "title": "CreateShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Create a draft shipment order with its lines.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e91fde656dcde1e59983f26dcad26167ff68ebac34c92769ffeefde756842ae9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:46deb30731ce41b24ff15d9fd3d0f30c7ecd36a0ce96a396bb0fe4f871242309",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_update",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carrier_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "order_type_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "priority": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "requested_ship_date": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "ship_to_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "UpdateShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "new_version",
            "order_id"
          ],
          "title": "UpdateShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Edit a shipment order's header fields.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d4ea9a83eb3aed97c8b259036dda8df4f3fbc3c336b7cb5234465652e2cf8525",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a0417f87a397b4d5335ad4bec947c30737a2b15789c2ca0ec6c576f08e5b75e9",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "shipment_order_release",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "ReleaseShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllocateShipmentOrderResult": {
              "properties": {
                "allocated": {
                  "format": "double",
                  "type": "number"
                },
                "blocked_by_dropped_step": {
                  "description": "Sum, across every line, of [`crate::allocation::LineAllocationPlan::blocked_by_dropped_step`] — base units `short` includes that were never searched for at all, because the only step of some line's policy naming that UOM rung failed to parse (round-2 review finding: without this, a broken policy step and a genuinely empty warehouse produced the identical `short` number). Zero on the common path.",
                  "format": "double",
                  "type": "number"
                },
                "cartonization": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/WrittenPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null,
                  "description": "Что посчитала картонизация: номер плана и сколько в нём коробок, размещений и неразмещённого. `None`, когда считать было нечего или когда заказ уже запущен.\n\n`default`, чтобы сохранённый идемпотентный повтор, записанный до появления поля, продолжал разбираться."
                },
                "cartonization_error": {
                  "default": null,
                  "description": "`Some`, когда картонизация не удалась. Резервирование при этом УСПЕШНО: план — подсказка складу, а не условие отгрузки. Но молчать нельзя — иначе экран покажет успех, а склад обнаружит отсутствие коробок в момент отбора.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "contention_deferred": {
                  "default": 0.0,
                  "description": "Quantity deferred because another transaction held the inventory lock. Default preserves idempotent results stored by older builds.",
                  "format": "double",
                  "type": "number"
                },
                "dispatched_tasks": {
                  "default": [],
                  "description": "Tasks THIS pass handed out — one per live pick of the order that had none yet (see the dispatch comment in [`allocate_order_lines`]). Empty before launch: a pre-launch Allocate reserves, it does not dispatch.\n\nThe screen's toast reads it. A second Release on a `PartiallyReleased` order reserves nothing new — `allocated 0, short 0` — and its whole point is the tasks, which the toast could not name while the generator's answer was thrown away here (owner, 2026-09-12). `default`, so an idempotent replay stored before the field existed still deserializes.",
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "new_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "picks": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "short": {
                  "description": "Quantity that could not be reserved because the eligible stock did not exist (as opposed to being temporarily locked).",
                  "format": "double",
                  "type": "number"
                },
                "status": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/OrderStatus"
                    }
                  ],
                  "description": "The header status AS DERIVED after the pass — `Allocated` / `PartiallyAllocated` before launch, `Released` / `PartiallyReleased` on a launched order (release's own nested pass runs after `released_at` is already written, so it reads the same ladder). The screen patches its copy of the order from this (spec §6.3)."
                }
              },
              "required": [
                "allocated",
                "blocked_by_dropped_step",
                "new_version",
                "order_id",
                "order_number",
                "picks",
                "short",
                "status"
              ],
              "type": "object"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "WrittenPlan": {
              "description": "Что записалось.",
              "properties": {
                "cartons": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "master_data_divergences": {
                  "default": [],
                  "description": "What stands was taken as written; where today's master data says otherwise, it is named here for master-data review (an executed unit whose size, weight or rotation rule changed). Empty for a plan that builds on nothing. `default`: a result stored before this field still reads (idempotent replays).",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "placements": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unplaced": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                }
              },
              "required": [
                "cartons",
                "placements",
                "plan_id",
                "unplaced"
              ],
              "type": "object"
            }
          },
          "properties": {
            "auto_allocation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AllocateShipmentOrderResult"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What release's own allocation half did — `allocated`/`short` report the pass that ran in this same transaction. Release ALWAYS attempts it now (spec §8.2), so this is `None` only when the attempt itself FAILED — see `auto_allocation_error`. Kept as an `Option` under its original name so existing callers keep deserializing unchanged."
            },
            "auto_allocation_error": {
              "description": "`Some` when the allocation half failed (review round 1) — a misconfigured policy is the expected case, but any error `allocate_order_lines` returns lands here. `release` still succeeds when this is set: see the module doc (\"A failed allocation pass does not fail the release\"). Exactly one of this and `auto_allocation` is always `Some`.",
              "type": [
                "string",
                "null"
              ]
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": "string"
            },
            "ship_to_snapshot": true,
            "status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderStatus"
                }
              ],
              "description": "The header status AS DERIVED at the end of this command's own transaction — `Released` when the allocation half covered every live line, `PartiallyReleased` when it did not (spec §2.2). The screen patches its copy of the order from this instead of assuming the launch always lands on the full form (§6.3's stale-status bug)."
            }
          },
          "required": [
            "new_version",
            "order_id",
            "order_number",
            "ship_to_snapshot",
            "status"
          ],
          "title": "ReleaseShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Release a draft order (full validation, freezes the ship-to address).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6c29990bee1855ea4dfa3a5f9812aedb1de82f9f60416201fe49af3d430e5774",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9f2631e63fa42220632b73aaa89b421818dd6b99e29a1c5e3522c3e9c90f1b45",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "shipment_order_cancel",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "cancel_reason": {
                "description": "Required. The reason is the record of WHY a customer promise was dropped, and an empty one makes the audit trail useless.",
                "type": "string"
              },
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "cancel_reason",
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "CancelShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "new_version",
            "order_id"
          ],
          "title": "CancelShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Cancel an order (refused once anything is picked).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:005f78e95a4de04f9c57b11fbcc34c605cb18497c94a6499dc877a178f477249",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a05ad35165ba69b353fd134bccdfe238ffbaf66b14c61fa6e152d510fa325ef7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "shipment_order_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "CloseShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "close_summary": {
              "description": "Returned so the caller does not need a follow-up read to show what the order finished as."
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "close_summary",
            "new_version",
            "order_id"
          ],
          "title": "CloseShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Close a released order once every line is terminal.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b731436a1a5861a6c7dddb0311d78e9398f4253d5d97b2d0d70c7e0334073013",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7ed713b00b016ee97b46202c18140cd8b50c02bea30f4315ea624b524afcfe69",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "shipment_order_ship",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "ShipShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "already_committed": {
              "type": "boolean"
            },
            "close_summary": true,
            "goods_issue_id": {
              "format": "int64",
              "type": "integer"
            },
            "journal_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_closed": {
              "default": true,
              "type": "boolean"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "remaining_quantities": {
              "default": [],
              "items": {
                "items": [
                  {
                    "format": "int64",
                    "type": "integer"
                  },
                  {
                    "format": "double",
                    "type": "number"
                  }
                ],
                "maxItems": 2,
                "minItems": 2,
                "type": "array"
              },
              "type": "array"
            },
            "serial_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "shipped_quantities": {
              "items": {
                "items": [
                  {
                    "format": "int64",
                    "type": "integer"
                  },
                  {
                    "format": "double",
                    "type": "number"
                  }
                ],
                "maxItems": 2,
                "minItems": 2,
                "type": "array"
              },
              "type": "array"
            }
          },
          "required": [
            "already_committed",
            "close_summary",
            "goods_issue_id",
            "journal_ids",
            "new_version",
            "order_id",
            "serial_ids",
            "shipped_quantities"
          ],
          "title": "ShipShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Ship a fully picked order: atomic Goods Issue, serials, counters, close and outbox.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8468f580f30195eea4fc59f42031eafebb0e4a763f54d1a95a954706e25219c2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:622962b96962b90889696df29d030122c2db376f267bc05ded0245ebc4b1d0a7",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "shipment_order_allocate_preview",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AllocationTraceDetail": {
                "description": "Cost level for planner explainability. Normal allocation always uses `Summary`; only an explicitly requested diagnostic preview uses `Full`.",
                "enum": [
                  "summary",
                  "full"
                ],
                "type": "string"
              }
            },
            "description": "Dry-run allocation: runs the exact plan `shipment_order_allocate` would, writes nothing. Shaped like `shipment_order_validate` above, not like the commands below — it reads, computes, and never reaches `execute_with_meta`.",
            "properties": {
              "detail": {
                "allOf": [
                  {
                    "$ref": "#/definitions/AllocationTraceDetail"
                  }
                ],
                "default": "summary",
                "description": "Defaults to the cheap path for all existing clients."
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "order_id"
            ],
            "title": "AllocationPreviewInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllocatedPosition": {
              "description": "One position [`plan_line_allocation`] found for a line — the wire-facing projection of [`crate::allocation::PlannedDraw`]. Its own type, not a re-export: `balance_id`'s internal-engine framing is implementation detail a caller of a *preview* should not have to know exists as a separate concept from `take`; here it is just \"how much, from where.\"\n\n`uom` (проход 2, задача 5) IS surfaced, though — it is the STEP's unit [`plan_line_allocation`] planned this draw under, the exact value [`reserve_draw`] writes onto `pick_detail.uom` when the real command reserves it. A multi-step policy plans the same line's need across several uoms (spec §4.2's PL/CS/IP/EA cascade); a caller of the preview needs to see which unit each position will pick in, not just the line's own (order-level) `uom` on [`LineAllocationPreview`] — that field answers \"what did the customer order in,\" this one answers \"what will THIS pick be counted in.\"",
              "properties": {
                "allocation_policy_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "allocation_policy_detail_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "allocation_policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "allocation_policy_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "balance_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "allocation_policy_detail_id",
                "allocation_policy_detail_version",
                "allocation_policy_id",
                "allocation_policy_version",
                "balance_id",
                "location",
                "lot",
                "qty",
                "uom"
              ],
              "type": "object"
            },
            "AllocationTraceDetail": {
              "description": "Cost level for planner explainability. Normal allocation always uses `Summary`; only an explicitly requested diagnostic preview uses `Full`.",
              "enum": [
                "summary",
                "full"
              ],
              "type": "string"
            },
            "LineAllocationPreview": {
              "description": "One line's slice of an [`AllocationPreview`].",
              "properties": {
                "allocated": {
                  "description": "Sum of `positions[].qty` — what the plan found, not a guarantee (see [`AllocationPreview`]'s own doc comment).",
                  "format": "double",
                  "type": "number"
                },
                "allocation_policy_id": {
                  "description": "Frozen policy snapshot used by the shared planner. Absent only for a line with no remaining demand and no historical snapshot.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "allocation_policy_version": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "blocked_by_dropped_step": {
                  "description": "This line's own [`crate::allocation::LineAllocationPlan:: blocked_by_dropped_step`] — a subset of `short` a caller can use to tell \"the policy needs fixing\" apart from \"there is no stock.\" Zero on the common path.",
                  "format": "double",
                  "type": "number"
                },
                "line_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "need": {
                  "description": "`qty_to_allocate()` at read time, floored at zero.",
                  "format": "double",
                  "type": "number"
                },
                "positions": {
                  "items": {
                    "$ref": "#/definitions/AllocatedPosition"
                  },
                  "type": "array"
                },
                "short": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "steps": {
                  "description": "Typed step-by-step explanation. Full detail adds aggregate rejection counts to each evaluated step; it never returns inventory rows.",
                  "items": {
                    "$ref": "#/definitions/StepDecision"
                  },
                  "type": "array"
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "allocated",
                "blocked_by_dropped_step",
                "line_no",
                "need",
                "positions",
                "short",
                "sku_code",
                "steps",
                "uom"
              ],
              "type": "object"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "StepDecision": {
              "description": "One step's decision in the shared planner result. It contains quantities and stable codes only; no SQL fragments or candidate inventory rows.",
              "properties": {
                "candidate_count": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "input_need": {
                  "format": "double",
                  "type": "number"
                },
                "rejections": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/StepRejectionCounts"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "remainder": {
                  "format": "double",
                  "type": "number"
                },
                "rule_num": {
                  "type": "string"
                },
                "selected_qty": {
                  "format": "double",
                  "type": "number"
                },
                "sequence": {
                  "format": "int32",
                  "type": "integer"
                },
                "step_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "step_version": {
                  "format": "int32",
                  "type": "integer"
                },
                "uom": {
                  "type": "string"
                },
                "verdict": {
                  "$ref": "#/definitions/StepVerdict"
                }
              },
              "required": [
                "candidate_count",
                "input_need",
                "remainder",
                "rule_num",
                "selected_qty",
                "sequence",
                "step_id",
                "step_version",
                "uom",
                "verdict"
              ],
              "type": "object"
            },
            "StepRejectionCounts": {
              "description": "Typed Full-preview rejection counters. The database counters form a waterfall; the selector counters are the real pure predicates applied after candidate loading.",
              "properties": {
                "customer_requirement_failed": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "fit_failed": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "held": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "location_not_allocatable": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "lpn_rule_failed": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "pack_mismatch": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "shelf_life_failed": {
                  "description": "Lots rejected on their dates: expired, below the reserve boundary (today + max(`min_shelf_life_on_pick`, `shelf_life`)), or missing an expiration the SKU requires.",
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "step_location_filter_failed": {
                  "format": "uint64",
                  "minimum": 0.0,
                  "type": "integer"
                }
              },
              "required": [
                "customer_requirement_failed",
                "fit_failed",
                "held",
                "location_not_allocatable",
                "lpn_rule_failed",
                "pack_mismatch",
                "shelf_life_failed",
                "step_location_filter_failed"
              ],
              "type": "object"
            },
            "StepVerdict": {
              "description": "Stable wire verdict for one policy step. Configuration defects never become a verdict: policy loading still returns an error.",
              "enum": [
                "selected",
                "no_candidates",
                "no_quantity_for_uom",
                "filtered_by_fit"
              ],
              "type": "string"
            }
          },
          "description": "What [`preview_allocate_order`] returns. Deliberately its OWN type, not [`AllocateShipmentOrderResult`] with `new_version`/`picks` left empty — a preview never reserves anything, so it has no version to echo and no `pick_detail` ids to report; a shared type would carry two fields whose only value here is \"always empty,\" which is not a description of what this command returns, it is a description of what it does NOT do.",
          "properties": {
            "advisory": {
              "description": "Preview is observational and can be stale immediately after the read.",
              "type": "boolean"
            },
            "allocated": {
              "format": "double",
              "type": "number"
            },
            "blocked_by_dropped_step": {
              "description": "Sum of `lines[].blocked_by_dropped_step` — see that field's own doc.",
              "format": "double",
              "type": "number"
            },
            "detail": {
              "$ref": "#/definitions/AllocationTraceDetail"
            },
            "lines": {
              "items": {
                "$ref": "#/definitions/LineAllocationPreview"
              },
              "type": "array"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": "string"
            },
            "order_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderStatus"
                }
              ],
              "description": "Carried through so a caller previewing an unlaunched order (see below) can tell the rungs apart without a second round trip."
            },
            "short": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "advisory",
            "allocated",
            "blocked_by_dropped_step",
            "detail",
            "lines",
            "order_id",
            "order_number",
            "order_status",
            "short"
          ],
          "title": "AllocationPreview",
          "type": "object"
        }
      },
      "summary": "Preview what allocation would do for this order. Writes nothing.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c76d029a0cd8fdece14ee558927c5a1a0d09bc2adecac08c9fee1bd809c3c5ca",
      "x-quark-response-schema-hash": "sha256:c55a725930d743ad847c557f785f691acdc42485c1914abe82cc00e6a88a1d46",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_allocate",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "AllocateShipmentOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "WrittenPlan": {
              "description": "Что записалось.",
              "properties": {
                "cartons": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "master_data_divergences": {
                  "default": [],
                  "description": "What stands was taken as written; where today's master data says otherwise, it is named here for master-data review (an executed unit whose size, weight or rotation rule changed). Empty for a plan that builds on nothing. `default`: a result stored before this field still reads (idempotent replays).",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "placements": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                },
                "plan_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unplaced": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                }
              },
              "required": [
                "cartons",
                "placements",
                "plan_id",
                "unplaced"
              ],
              "type": "object"
            }
          },
          "properties": {
            "allocated": {
              "format": "double",
              "type": "number"
            },
            "blocked_by_dropped_step": {
              "description": "Sum, across every line, of [`crate::allocation::LineAllocationPlan::blocked_by_dropped_step`] — base units `short` includes that were never searched for at all, because the only step of some line's policy naming that UOM rung failed to parse (round-2 review finding: without this, a broken policy step and a genuinely empty warehouse produced the identical `short` number). Zero on the common path.",
              "format": "double",
              "type": "number"
            },
            "cartonization": {
              "anyOf": [
                {
                  "$ref": "#/definitions/WrittenPlan"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Что посчитала картонизация: номер плана и сколько в нём коробок, размещений и неразмещённого. `None`, когда считать было нечего или когда заказ уже запущен.\n\n`default`, чтобы сохранённый идемпотентный повтор, записанный до появления поля, продолжал разбираться."
            },
            "cartonization_error": {
              "default": null,
              "description": "`Some`, когда картонизация не удалась. Резервирование при этом УСПЕШНО: план — подсказка складу, а не условие отгрузки. Но молчать нельзя — иначе экран покажет успех, а склад обнаружит отсутствие коробок в момент отбора.",
              "type": [
                "string",
                "null"
              ]
            },
            "contention_deferred": {
              "default": 0.0,
              "description": "Quantity deferred because another transaction held the inventory lock. Default preserves idempotent results stored by older builds.",
              "format": "double",
              "type": "number"
            },
            "dispatched_tasks": {
              "default": [],
              "description": "Tasks THIS pass handed out — one per live pick of the order that had none yet (see the dispatch comment in [`allocate_order_lines`]). Empty before launch: a pre-launch Allocate reserves, it does not dispatch.\n\nThe screen's toast reads it. A second Release on a `PartiallyReleased` order reserves nothing new — `allocated 0, short 0` — and its whole point is the tasks, which the toast could not name while the generator's answer was thrown away here (owner, 2026-09-12). `default`, so an idempotent replay stored before the field existed still deserializes.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": "string"
            },
            "picks": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "short": {
              "description": "Quantity that could not be reserved because the eligible stock did not exist (as opposed to being temporarily locked).",
              "format": "double",
              "type": "number"
            },
            "status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderStatus"
                }
              ],
              "description": "The header status AS DERIVED after the pass — `Allocated` / `PartiallyAllocated` before launch, `Released` / `PartiallyReleased` on a launched order (release's own nested pass runs after `released_at` is already written, so it reads the same ladder). The screen patches its copy of the order from this (spec §6.3)."
            }
          },
          "required": [
            "allocated",
            "blocked_by_dropped_step",
            "new_version",
            "order_id",
            "order_number",
            "picks",
            "short",
            "status"
          ],
          "title": "AllocateShipmentOrderResult",
          "type": "object"
        }
      },
      "summary": "Allocate a released order's open lines against available stock.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c23c98810fb92dcfe00d935392f71c40e8f19d88b5b72e56603dbbcbd0d7a445",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e25b3b68221b6a7998575a2d222a1e346e35f04f2660faefb3d6f924e5897f23",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "shipment_order_cancel_allocation",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id"
            ],
            "title": "CancelOrderAllocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "launch_cleared": {
              "description": "True when the release pass cleared EVERY reservation and the launch marker (`released_at`) was reset — the order is back in its unlaunched life and a later Release launches it again.",
              "type": "boolean"
            },
            "lines_affected": {
              "format": "int32",
              "type": "integer"
            },
            "new_version": {
              "description": "The header version AFTER this command: bumped when the command wrote the header (a full clear resets `released_at` — a user write, so OCC moves), otherwise an echo of what was already there. Either way the screen patches its copy from this and the next command's check stays honest.",
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": "string"
            },
            "released": {
              "format": "double",
              "type": "number"
            },
            "skipped_in_work": {
              "description": "Picks left untouched because they are in work (MVP stub: a task holds them). The toast tells the operator how much of the order is still out on the floor.",
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderStatus"
                }
              ],
              "description": "The header status AS DERIVED after the release pass — `New` when the launch marker was cleared (full un-reservation, owner decision 2026-08-24), `PartiallyReleased` when in-work picks kept the order launched (spec §2.2/§2.3). The screen patches its copy of the order from this (spec §6.3)."
            }
          },
          "required": [
            "launch_cleared",
            "lines_affected",
            "new_version",
            "order_id",
            "order_number",
            "released",
            "skipped_in_work",
            "status"
          ],
          "title": "CancelOrderAllocationResult",
          "type": "object"
        }
      },
      "summary": "Release every reservation on the order; the picks are deleted.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:aef2c5be2642ad1cde58788ae900291ca41e592b059d9c32aba9ef4a42e50169",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9307e3dc27f36608629f882b916cdb9b92d1f9cf384e94bcce30f765a30f1e7a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "pick_detail_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "pick_detail_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "order_id",
              "pick_detail_id"
            ],
            "title": "DeletePickDetail",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderLineStatus"
                }
              ],
              "description": "The affected LINE's stored status after the same derivation — the shape [`CancelLineQtyResult::line_status`] already reports for the other line-touching command family.\n\n[`CancelLineQtyResult::line_status`]: crate::service::order_line::CancelLineQtyResult"
            },
            "new_version": {
              "description": "Echo of the header version that was already there — this command never writes the header row (releases touch LINES and `pick_detail`), same contract as `CancelOrderAllocationResult::new_version`.",
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderStatus"
                }
              ],
              "description": "The header status AS DERIVED after the release, in this command's own transaction — same contract as [`CancelOrderAllocationResult::status`] (`cancel_allocation.rs`): the screen patches its copy of the order from this (spec §6.3) instead of keeping whatever it showed before. A delete can move the header (a fully-`Released` order loses a pick → `PartiallyReleased`), and a result that stayed silent about it left the header box stale until a full reopen — the owner's live find, 2026-08-24.\n\n[`CancelOrderAllocationResult::status`]: super::CancelOrderAllocationResult"
            },
            "released_qty": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "line_id",
            "line_status",
            "new_version",
            "order_id",
            "order_status",
            "released_qty"
          ],
          "title": "DeletePickDetailResult",
          "type": "object"
        }
      },
      "summary": "Delete one reservation (pick) from an order, releasing its qty.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:570d9d9ebfa0f3ff5512568d956c7e18f09607f68da5be8d9bb3472cd4f002ce",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:1f4ac72e540d40e1a047ece05d011953a05f7a952e82108ced9171d865af558b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shipment_order_line_upsert",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_line_version": {
                "description": "Required when `line_id` is present. Absent on an insert, because a row that does not exist has no version to conflict with.",
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "external_line_no": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "description": "Absent inserts a new line; present edits that one.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "pack_id": {
                "description": "The pack the customer ordered: the line is then reserved only from stock of it. Absent: the line takes the SKU's pack and is reserved from stock of any pack of the SKU. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pick_instruction": {
                "description": "One-off pick instruction for this line (wms-app 044). On an edit, an absent value leaves the stored one; an empty string clears it. Absent from the wire when empty, so the idempotency hash of a request without it is what it always was.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "qty": {
                "description": "Quantity in BASE units.",
                "format": "double",
                "type": "number"
              },
              "sku_code": {
                "type": "string"
              },
              "uom": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "order_id",
              "qty",
              "sku_code",
              "uom"
            ],
            "title": "UpsertOrderLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_no": {
              "format": "int32",
              "type": "integer"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "line_id",
            "line_no",
            "new_version"
          ],
          "title": "UpsertOrderLineResult",
          "type": "object"
        }
      },
      "summary": "Add or edit a draft order's line.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac56bba7bc4f407f73041229e2b2f728f7adae1dc31d834e1dba534ef452600b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7de3d519ca62d0ef83aeb769eaf98c30a1646f0e92e285418783d2a215a0e610",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order_line",
          "id_field": "line_id",
          "version_field": "expected_line_version"
        }
      ]
    },
    {
      "name": "shipment_order_line_remove",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_line_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_line_version",
              "idempotency_key",
              "line_id",
              "order_id"
            ],
            "title": "RemoveOrderLine",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "removed": {
              "type": "boolean"
            }
          },
          "required": [
            "line_id",
            "removed"
          ],
          "title": "RemoveOrderLineResult",
          "type": "object"
        }
      },
      "summary": "Delete a line from a draft order.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:85fcd971ec73842cffcd221e07c346076dc88dc2eff473b37af1758c678f7f44",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:2e70afd89b92348a83413a2a7be6c779d6681ee8fcb8043ce229ac89b585b794",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order_line",
          "id_field": "line_id",
          "version_field": "expected_line_version"
        }
      ]
    },
    {
      "name": "shipment_order_line_set_lot_requirements",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "ExpectedShipmentLotAttributeInput": {
                "properties": {
                  "attribute_code": {
                    "type": "string"
                  },
                  "attribute_value": {
                    "type": "string"
                  }
                },
                "required": [
                  "attribute_code",
                  "attribute_value"
                ],
                "type": "object"
              }
            },
            "properties": {
              "attributes": {
                "default": [],
                "description": "Complete replacement set. An empty set means no per-attribute limit.",
                "items": {
                  "$ref": "#/definitions/ExpectedShipmentLotAttributeInput"
                },
                "type": "array"
              },
              "expected_line_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "required_lot": {
                "description": "Exact customer-requested lot. Empty or absent removes this constraint.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "expected_line_version",
              "idempotency_key",
              "line_id",
              "order_id"
            ],
            "title": "SetOrderLineLotRequirements",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ShipmentOrderExpectedLotAttribute": {
              "properties": {
                "attribute_code": {
                  "type": "string"
                },
                "attribute_value": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot_policy_attribute_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_line_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "attribute_code",
                "attribute_value",
                "id",
                "order_line_id"
              ],
              "type": "object"
            },
            "ShipmentOrderLineLotRequirement": {
              "properties": {
                "attributes": {
                  "items": {
                    "$ref": "#/definitions/ShipmentOrderExpectedLotAttribute"
                  },
                  "type": "array"
                },
                "order_line_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required_lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "requirement_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "attributes",
                "order_line_id",
                "requirement_version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "requirements": {
              "anyOf": [
                {
                  "$ref": "#/definitions/ShipmentOrderLineLotRequirement"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "line_id",
            "new_version"
          ],
          "title": "SetOrderLineLotRequirementsResult",
          "type": "object"
        }
      },
      "summary": "Replace a draft Order line's expected lot and lot-attribute values.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7411e08514a0e19b9b9e8180e1a4fa6b3b85b308999552bf7b8ea2a1b51972c3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:086e7da5439a80576a683a053b81a597bfb72928e461e49046e78fe3473ecfc3",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order_line",
          "id_field": "line_id",
          "version_field": "expected_line_version"
        }
      ]
    },
    {
      "name": "shipment_order_line_cancel_qty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_line_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "description": "Base units to cancel. Additive — two calls of 3 cancel 6.",
                "format": "double",
                "type": "number"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "expected_line_version",
              "idempotency_key",
              "line_id",
              "order_id",
              "qty",
              "reason"
            ],
            "title": "CancelLineQty",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "qty_cancelled": {
              "format": "double",
              "type": "number"
            },
            "qty_open": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "line_id",
            "line_status",
            "new_version",
            "qty_cancelled",
            "qty_open"
          ],
          "title": "CancelLineQtyResult",
          "type": "object"
        }
      },
      "summary": "Cancel part or all of a line's quantity, with a reason.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ab0dfad847a08b63f2edc4255a48b1903f926326c62f5c72481565063e7cd054",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c64ef0ce50231012d9ff5ab534a7b653e6b929e567bc37eef5804bfeae2daa5d",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order_line",
          "id_field": "line_id",
          "version_field": "expected_line_version"
        }
      ]
    },
    {
      "name": "shipment_order_line_adjust_qty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_line_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "line_id": {
                "format": "int64",
                "type": "integer"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty_ordered": {
                "description": "The new `qty_ordered`, in BASE units — absolute, not a delta.",
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "expected_line_version",
              "idempotency_key",
              "line_id",
              "order_id",
              "qty_ordered"
            ],
            "title": "AdjustOrderLineQty",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "line_id": {
              "format": "int64",
              "type": "integer"
            },
            "line_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderLineStatus"
                }
              ],
              "description": "The line's status AS STORED after the in-transaction recompute — the adjustment is usually made exactly to move this (Allocated → PartiallyAllocated on a raise), so the caller gets it without a follow-up read."
            },
            "new_version": {
              "format": "int32",
              "type": "integer"
            },
            "qty_ordered": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "line_id",
            "line_status",
            "new_version",
            "qty_ordered"
          ],
          "title": "AdjustOrderLineQtyResult",
          "type": "object"
        }
      },
      "summary": "Set a line's ordered quantity (supervisor lane; works on reserved lines).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "shipment_order_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:24320a8f7eb167f95a534aa93a88c3de85fa39125162284c39ab3aaab19aa93d",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c2923236a23605a7fe8b67a244e434c8f069ebe03a9026ea9c17d3605e26703c",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order_line",
          "id_field": "line_id",
          "version_field": "expected_line_version"
        }
      ]
    },
    {
      "name": "container_restructure",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "new_parent_id": {
                "description": "`None` detaches the container (makes it root).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "container_id",
              "idempotency_key"
            ],
            "title": "RestructureContainer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "container_id": {
              "format": "int64",
              "type": "integer"
            },
            "new_parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "previous_parent_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "container_id"
          ],
          "title": "RestructureContainerResult",
          "type": "object"
        }
      },
      "summary": "Re-parent a container or detach it (validates hierarchy).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "container_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ec5bd35f7cc0a6a01a1b6182221025afd1330e6d1c9890acff090906d5906ee6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:ec9a7259c4d7b826311873b0eec499440b182eeaa4523f46c69f3aa76be0778a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "container_dispose",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_id": {
                "format": "int64",
                "type": "integer"
              },
              "force": {
                "description": "When `true`, recursively dispose all descendants.",
                "type": "boolean"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "container_id",
              "force",
              "idempotency_key"
            ],
            "title": "DisposeContainer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "children_disposed": {
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "container_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "children_disposed",
            "container_id"
          ],
          "title": "DisposeContainerResult",
          "type": "object"
        }
      },
      "summary": "Dispose a container (force=true cascades through children).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "container_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0d4d0400318b48785e9c86dcc211c81f2fe9fcdcd433efe69a21ec5b285071bf",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:05d11aa8d0c0a192ff8087be77ff07f25f9bf2480008a1aa80ac9cac2d7080e1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "container_repack",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "RepackItem": {
                "properties": {
                  "lot": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "qty": {
                    "format": "double",
                    "type": "number"
                  },
                  "sku_code": {
                    "type": "string"
                  }
                },
                "required": [
                  "qty",
                  "sku_code"
                ],
                "type": "object"
              },
              "TargetContainerSpec": {
                "oneOf": [
                  {
                    "description": "No container — loose units.",
                    "enum": [
                      "None"
                    ],
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Resolve an existing container by code.",
                    "properties": {
                      "Existing": {
                        "properties": {
                          "code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "Existing"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a fresh top-level pallet. `code=None` triggers auto-generation per `OwnerConfig.auto_generate_lpn_format`.",
                    "properties": {
                      "NewPallet": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sscc": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Create a new case, optionally nested under an existing pallet.",
                    "properties": {
                      "NewCase": {
                        "properties": {
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parent_pallet_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "NewCase"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Add a new case as child of an existing pallet.",
                    "properties": {
                      "AddCaseToPallet": {
                        "properties": {
                          "new_case_code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pallet_code": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pallet_code"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "AddCaseToPallet"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "description": "Cross-dock staging container (Phase 2 cross-dock; outbound order ref).",
                    "properties": {
                      "CrossDock": {
                        "properties": {
                          "outbound_order_id": {
                            "format": "int64",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "CrossDock"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "items": {
                "description": "When empty, repack ALL inventory from source to target.",
                "items": {
                  "$ref": "#/definitions/RepackItem"
                },
                "type": "array"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "source_container_id": {
                "format": "int64",
                "type": "integer"
              },
              "target_spec": {
                "$ref": "#/definitions/TargetContainerSpec"
              }
            },
            "required": [
              "idempotency_key",
              "items",
              "owner_id",
              "source_container_id",
              "target_spec"
            ],
            "title": "RepackContainer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RepackItemDelta": {
              "description": "Одна переехавшая строка остатка.\n\nРаньше здесь были только товар, партия и количество, и по событию нельзя было сказать ни чей это товар, ни чем он лежал: упаковка терялась ровно в тот момент, ради которого событие и читают (спека физических измерений, приложение A.48). Поля описывают строку ПОСЛЕ перепаковки — она вся, кроме носителя, остаётся на месте.",
              "properties": {
                "balance_id": {
                  "default": 0,
                  "description": "Строка остатка — по ней восстанавливают всё остальное.",
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "default": "",
                  "description": "Ячейка, в которой всё это стоит: перепаковка её не меняет.",
                  "type": "string"
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "default": 0,
                  "description": "Чей товар переехал.",
                  "format": "int64",
                  "type": "integer"
                },
                "pack_id": {
                  "default": 0,
                  "description": "Упаковка и единица со строки остатка: то, чем товар лежит.",
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "uom": {
                  "default": "",
                  "type": "string"
                }
              },
              "required": [
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "properties": {
            "items_moved": {
              "items": {
                "$ref": "#/definitions/RepackItemDelta"
              },
              "type": "array"
            },
            "source_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_now_empty": {
              "type": "boolean"
            },
            "target_container_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "items_moved",
            "source_container_id",
            "source_now_empty",
            "target_container_id"
          ],
          "title": "RepackContainerResult",
          "type": "object"
        }
      },
      "summary": "Repack inventory from one container into another (drains source).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "container_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:283e58c3e468b417a8b4f19a36b262162439fd5ccaeb7f621af60a83fa5ca958",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:5135139ca1e17b35aab6a8aed9dc04dadcbe685e620f7a487d11a12023a32cde",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_dispatch_next",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "current_location": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "current_zone": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "equipment_profile_code": {
                "description": "The equipment kind chosen for the shift; it becomes the operator's profile. Only with `work_area_code`. Absent (and no `on_foot`) — the operator's current profile.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "on_foot": {
                "description": "The operator works on foot this shift: their profile is cleared (`NULL` = excludes no zone, no lift limit) and the area's default policy applies. Only with `work_area_code`, never with `equipment_profile_code`. Absent from the payload when false.",
                "type": "boolean"
              },
              "work_area_code": {
                "description": "The area the operator names (scanned or typed) on the RF entry \"Отбор по участку\": the policy comes from it, and a new task only from its zones. Absent on the old entry.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "work_area_id": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key"
            ],
            "title": "DispatchNextPick",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentDispatch": {
              "description": "What the operator does with a carrier.",
              "oneOf": [
                {
                  "description": "The operator's live assignment — or their carrier dissolved with goods and never delivered (R13): continue it.",
                  "properties": {
                    "assignment": {
                      "$ref": "#/definitions/PickAssignmentView"
                    },
                    "kind": {
                      "enum": [
                        "Resume"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "assignment",
                    "kind"
                  ],
                  "type": "object"
                },
                {
                  "description": "The named area works with a carrier for this equipment and the operator holds nothing: scan a carrier to start an assignment. No task was claimed.",
                  "properties": {
                    "kind": {
                      "enum": [
                        "ScanCarrier"
                      ],
                      "type": "string"
                    },
                    "max_targets": {
                      "description": "At most this many targets go on the carrier.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "policy_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "work_area_code": {
                      "type": "string"
                    },
                    "work_area_id": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "max_targets",
                    "policy_id",
                    "work_area_code",
                    "work_area_id"
                  ],
                  "type": "object"
                }
              ]
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "DispatchDiagnostic": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "phase": {
                  "$ref": "#/definitions/DispatchPhase"
                },
                "task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "phase"
              ],
              "type": "object"
            },
            "DispatchPhase": {
              "enum": [
                "Assigned",
                "CurrentArea",
                "PermittedAreas"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "OpenPickDropView": {
              "description": "The caller's open pick pallet.",
              "properties": {
                "destination_location": {
                  "description": "Where F2 puts it — frozen by its first deposit; `None` while it holds nothing.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "drop_code": {
                  "type": "string"
                },
                "drop_id": {
                  "description": "The pallet's CONTAINER id (the commit's `drop_id`).",
                  "format": "int64",
                  "type": "integer"
                },
                "has_goods": {
                  "description": "Stock anywhere in the pallet's tree.",
                  "type": "boolean"
                },
                "opened_at": {
                  "type": "string"
                },
                "order_code": {
                  "type": "string"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_drop_id": {
                  "description": "The pallet's record.",
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "description": "The record's version (every write of it bumps it).",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "drop_code",
                "drop_id",
                "has_goods",
                "opened_at",
                "order_code",
                "order_id",
                "pick_drop_id",
                "version"
              ],
              "type": "object"
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickDispatchPackaging": {
              "oneOf": [
                {
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "PlannedCarton": {
                      "properties": {
                        "carton_id": {
                          "format": "int64",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "carton_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "PlannedCarton"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "FactoryPackage": {
                      "properties": {
                        "pack_item_id": {
                          "format": "int64",
                          "type": "integer"
                        },
                        "pack_revision_id": {
                          "format": "int64",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "pack_item_id",
                        "pack_revision_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "FactoryPackage"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickDispatchWork": {
              "properties": {
                "blocked": {
                  "description": "The caller's own held task whose source turned unusable under them — the location not `Ok` or flagged other than by a count (`LOCATION_BLOCKED`), an inventory hold (`INVENTORY_HOLD`): the code (ruling D13). The card, the commit and a short refuse it as before; the holder rejects it (`pick_reject` with this `task.version`) instead of being locked out of every Pick. ABSENT otherwise, so every other answer serializes exactly as before.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "packaging": {
                  "$ref": "#/definitions/PickDispatchPackaging"
                },
                "phase": {
                  "$ref": "#/definitions/DispatchPhase"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task": {
                  "$ref": "#/definitions/Task"
                }
              },
              "required": [
                "order_id",
                "packaging",
                "phase",
                "pick_detail_id",
                "task"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "Task": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "batch_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "claimed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "ended_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "escalated_at": {
                  "default": null,
                  "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "heartbeat_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lease_expires_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_done": {
                  "format": "double",
                  "type": "number"
                },
                "refused_count": {
                  "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
                  "format": "int32",
                  "type": "integer"
                },
                "return_kind": {
                  "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skip_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "source_type": {
                  "type": "string"
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/TaskStatus"
                },
                "task_type": {
                  "$ref": "#/definitions/TaskType"
                },
                "to_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "weight": {
                  "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "workstation_completed_by": {
                  "default": null,
                  "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "priority",
                "qty_done",
                "refused_count",
                "source_id",
                "source_type",
                "status",
                "task_type",
                "version"
              ],
              "type": "object"
            },
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AssignmentDispatch"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Carrier work instead of a single task. ABSENT (not `null`) on every discrete answer, so the discrete wire is exactly what it was."
            },
            "diagnostics": {
              "items": {
                "$ref": "#/definitions/DispatchDiagnostic"
              },
              "type": "array"
            },
            "drop_to_close": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenPickDropView"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The caller's open pick pallet WITH goods, when the answer is not a discrete task that goes onto it — another order's task, a task of its order going to another location than the pallet (owner cross-review 2026-10-06, D-2), no work, or carrier work: the RF closes it first (spec §4.5, PICK13). ABSENT when `None`, so every other answer serializes exactly as before."
            },
            "work": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PickDispatchWork"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "diagnostics"
          ],
          "title": "DispatchNextPickResult",
          "type": "object"
        }
      },
      "summary": "Assign the next executable Pick using fixed dispatch phases.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9b0c03c3970bf9ad405963ace4b7760fefe5e8463e795fc3ab5a700dffae3579",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:acf59bef01386af22f5a0a047b616b56708512afc437f4e698318d95782424f8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_drop_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command. A physical fact (\"this label is on the pallet in my hands\"), so it carries no entity version: the lease is checked and renewed, and the answer carries the task's new version.",
            "properties": {
              "drop_code": {
                "description": "The scanned DRP label.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "work_area_code": {
                "description": "The area the operator named on the RF entry \"Отбор по участку\" (`globals.pka_area_code`): the pallet opens under that area's policy when the task is its work. Absent on the old entry — DISCRETE.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "drop_code",
              "idempotency_key",
              "task_id"
            ],
            "title": "OpenPickDrop",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "already_open": {
              "description": "The caller's open pallet of this order, scanned again: nothing was written.",
              "type": "boolean"
            },
            "created": {
              "description": "No container had the label: a new pallet was made.",
              "type": "boolean"
            },
            "drop_code": {
              "type": "string"
            },
            "drop_id": {
              "description": "The pallet's CONTAINER id — what a commit names as its `drop_id`.",
              "format": "int64",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "released_drop_code": {
              "description": "The label of the caller's empty open pallet let go on the way.",
              "type": [
                "string",
                "null"
              ]
            },
            "task_version": {
              "description": "The task after the lease renewal: the RF stores it for its next stateful confirmation.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_open",
            "created",
            "drop_code",
            "drop_id",
            "order_id",
            "task_version"
          ],
          "title": "OpenPickDropResult",
          "type": "object"
        }
      },
      "summary": "Open the operator's pick pallet (a scanned DRP label) for the task's order in INTRANSIT.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:be69666eec448da6d64d3262922e5bef15928e1b9f6795bc1459df33331d8fa1",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cf26891c8fc9ef35c8f80f69da38425bc7b82f8da17165c3ed7a643c164237f5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_drop_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command. A physical fact (\"this pallet is done and stands here\"), so it carries no entity version.",
            "properties": {
              "drop_code": {
                "description": "The scanned DRP label of the pallet.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "location_code": {
                "default": "",
                "description": "The scanned location: the pallet's frozen destination. Not needed — and ignored — for an empty pallet, which F2 lets go (ruling D12): absent reads as empty, and a loaded pallet is then refused `WRONG_DROP_LOCATION` naming its destination.",
                "type": "string"
              },
              "override_grant_id": {
                "description": "A supervisor's grant (`supervisor_override_grant`) for `pick_override_codes::close_foreign_drop(pick_drop_id)` — lets a caller without the right close another operator's pallet.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "drop_code",
              "idempotency_key"
            ],
            "title": "ClosePickDrop",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "already_closed": {
              "description": "The caller had already closed this pallet into this location: nothing was written this time.",
              "type": "boolean"
            },
            "authorized_by": {
              "description": "Who authorised closing another operator's pallet by a grant (read off the grant row, never the request).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "balances_moved": {
              "description": "Balances moved; 0 on an `already_closed` answer.",
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "drop_code": {
              "type": "string"
            },
            "drop_id": {
              "description": "The pallet's CONTAINER id.",
              "format": "int64",
              "type": "integer"
            },
            "location": {
              "description": "Where the pallet stands now: its destination. Empty when the pallet was let go (`released`): it stands nowhere.",
              "type": "string"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_drop_id": {
              "description": "The pallet's record.",
              "format": "int64",
              "type": "integer"
            },
            "released": {
              "description": "The pallet held nothing: its record was let go (`Released`) and its label is free again; nothing moved (ruling D12). Absent when false.",
              "type": "boolean"
            }
          },
          "required": [
            "already_closed",
            "balances_moved",
            "drop_code",
            "drop_id",
            "location",
            "order_id",
            "pick_drop_id"
          ],
          "title": "ClosePickDropResult",
          "type": "object"
        }
      },
      "summary": "Close a pick pallet: its whole tree moves from INTRANSIT into its frozen destination location.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4d53bcfeb0ce591ac4acfe5e5afdd44a991529e6bfbfdb373dba8b3a7e2557a4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a5b4de1b6e60226840097639c74083ecd8d4b3547dfd0e660779259a3c6c7380",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_location",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "scanned_location": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "scanned_location",
              "task_id"
            ],
            "title": "ConfirmPickLocation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version"
          ],
          "title": "PickConfirmationResult",
          "type": "object"
        }
      },
      "summary": "Confirm the Pick source location as a durable fact and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d0264647a7863e3d4617e97cb66e60e6f28d8b2de0ca60900bb6b6c7ab06f981",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:381a20bcd8aa4ab36687c32dcffdd68431ee4ae3a5244124b26370607e7299c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_item",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "scanned_item": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "scanned_item",
              "task_id"
            ],
            "title": "ConfirmPickItem",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version"
          ],
          "title": "PickConfirmationResult",
          "type": "object"
        }
      },
      "summary": "Confirm the Pick item barcode as a durable fact and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:26992829705e5056b00a4d81b9688de5567c604a4175815fe47503be4901ffbb",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:381a20bcd8aa4ab36687c32dcffdd68431ee4ae3a5244124b26370607e7299c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_source_lpn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "scanned_lpn": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "scanned_lpn",
              "task_id"
            ],
            "title": "ConfirmPickSourceLpn",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version"
          ],
          "title": "PickConfirmationResult",
          "type": "object"
        }
      },
      "summary": "Confirm the Pick source LPN as a durable fact and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e8e43661b4bc1417d5858bee7558ae1e8ab6323550fd981c954a9fb2c9990972",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:381a20bcd8aa4ab36687c32dcffdd68431ee4ae3a5244124b26370607e7299c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_substitute_source_lpn",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "«Взять этот LPN»: the pick `task_id` leads to takes its remaining from the scanned LPN instead of the one it reserved.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "scanned_lpn": {
                "description": "The LPN the operator scanned at the location (the one a `WRONG_SOURCE_LPN` refused).",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "scanned_lpn",
              "task_id"
            ],
            "title": "SubstituteSourceLpn",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "description": "A confirmation's answer — the task version the renewal left, the new episode, what the plan asks next and what this call recorded — plus the two LPNs.",
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "from_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            },
            "to_container_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "from_container_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version",
            "to_container_id"
          ],
          "title": "SourceLpnSubstituted",
          "type": "object"
        }
      },
      "summary": "Take the Pick's remaining from another LPN of the same lot at the location and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:15e93354e1e12fab9051e18fb790d72e8a497ac002c8286a0ca2db741fedcd00",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:db0566357f9189c516bcbecd739186a2c51c11ab120dd873bb1f7fe1b8f2362f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_qty",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "qty",
              "task_id"
            ],
            "title": "ConfirmPickQty",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version"
          ],
          "title": "PickConfirmationResult",
          "type": "object"
        }
      },
      "summary": "Confirm the full Pick quantity as an audit fact and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f9368756fa68206391342b75d043ac52c3100c996dd858e4cfaf6bb33c3dcc9e",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:381a20bcd8aa4ab36687c32dcffdd68431ee4ae3a5244124b26370607e7299c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_serial",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "actual_qty": {
                "description": "Physical quantity the operator intends to commit. Full picks pass the remaining Pick quantity; short picks pass the observed quantity before scanning its serials.",
                "format": "double",
                "type": "number"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "serial_number": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "actual_qty",
              "idempotency_key",
              "serial_number",
              "task_id"
            ],
            "title": "CapturePickSerial",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EpisodeStatus": {
              "enum": [
                "Open",
                "InProgress",
                "AwaitingConfirmation",
                "Committed",
                "Cancelled",
                "Abandoned"
              ],
              "type": "string"
            }
          },
          "properties": {
            "already_captured": {
              "type": "boolean"
            },
            "captured_base_qty": {
              "description": "Base quantity represented by the captured serials under this obligation.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "episode_status": {
              "$ref": "#/definitions/EpisodeStatus"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "serials_collected_qty": {
              "format": "int32",
              "type": "integer"
            },
            "serials_to_collect_qty": {
              "format": "int32",
              "type": "integer"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_captured",
            "episode_id",
            "episode_status",
            "pick_detail_id",
            "serials_collected_qty",
            "serials_to_collect_qty",
            "task_id",
            "task_version"
          ],
          "title": "CapturePickSerialResult",
          "type": "object"
        }
      },
      "summary": "Capture one or more serial numbers for a Pick without moving inventory.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7c14a9febbfb05f2a63a420d5bf34eeef15b7c53dd289a7b5cc225fb66b42603",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:bf02e7acd26c902827cafed50359d66a627886f5b9405443069f2976cbef2264",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_internal_lot",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The reserved internal lot, scanned from its label or typed (§11.2).",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "manual": {
                "default": false,
                "description": "Typed on the keypad rather than scanned (R16).",
                "type": "boolean"
              },
              "scanned_lot": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "scanned_lot",
              "task_id"
            ],
            "title": "ConfirmPickInternalLot",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version"
          ],
          "title": "PickConfirmationResult",
          "type": "object"
        }
      },
      "summary": "Confirm the Pick's reserved internal lot (scanned or typed) as a durable fact and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e588c220ac5c95b8f81458442d6d80593014d8cf0368686ad731c72686488247",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:381a20bcd8aa4ab36687c32dcffdd68431ee4ae3a5244124b26370607e7299c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_confirm_lot_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "ManualLotAttribute": {
                "description": "One lot attribute value the operator typed.",
                "properties": {
                  "code": {
                    "description": "The Lot Policy code (any case).",
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "value"
                ],
                "type": "object"
              }
            },
            "description": "The lot's checkable attributes as the operator sees them (§11.3).",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "manual": {
                "default": [],
                "description": "Values the operator typed (R16 decides whether that is allowed).",
                "items": {
                  "$ref": "#/definitions/ManualLotAttribute"
                },
                "type": "array"
              },
              "scan": {
                "default": null,
                "description": "One scan that may carry several values (GS1: lot + expiry). A plain barcode no format reads is the value of the attribute the plan asks next.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "task_id"
            ],
            "title": "ConfirmPickLotAttributes",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "PickConfirmationField": {
              "enum": [
                "Location",
                "Item",
                "SourceLpn",
                "Quantity",
                "InternalLot",
                "LotAttributes"
              ],
              "type": "string"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            }
          },
          "properties": {
            "confirmed": {
              "$ref": "#/definitions/PickConfirmationField"
            },
            "episode_id": {
              "format": "int64",
              "type": "integer"
            },
            "next": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RequiredEvidence"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What the plan still needs, in screen order; `None` once the source is proven."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "recorded": {
              "description": "The plan's evidence this call stored (empty on a re-scan the business key absorbed; the quantity is audit, not plan evidence, and is never listed).",
              "items": {
                "$ref": "#/definitions/EvidenceKey"
              },
              "type": "array"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "description": "The lease renewal bumps it; `pick_commit` / `pick_short` echo it.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "confirmed",
            "episode_id",
            "pick_detail_id",
            "recorded",
            "task_id",
            "task_version"
          ],
          "title": "PickConfirmationResult",
          "type": "object"
        }
      },
      "summary": "Confirm the Pick lot's checkable attributes (one scan or typed values) as durable facts and renew the task lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8cfeb604bea07ff67c8eedaa0c060e186468e0d2ec6083a65260d9a936bb4e83",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:381a20bcd8aa4ab36687c32dcffdd68431ee4ae3a5244124b26370607e7299c2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_commit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "count_freeze_grant_id": {
                "description": "A shift lead's grant (`supervisor_override_grant`) authorising this confirmation out of a location an open Hard count is counting (owner's decision 2026-10-21 §6). The SAME single-use grant the move and the adjustment redeem. Absent from the wire when `None`, so an ordinary commit serialises — and hashes — exactly as before.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "drop_id": {
                "description": "Discrete (CollectToRoot): the caller's open pick pallet — its CONTAINER id, as `pick_drop_open` answered it. Absent from the wire when `None`, so a discrete request serializes — and hashes — exactly as before slice 4.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "instructions_acknowledged": {
                "description": "The picker read the pick's instructions (RF `PICKINS`). Required when the pick has any (`picking::instructions`); the commit re-derives that from the locked rows, it does not trust the client. Absent from the wire when false, so the idempotency hash of a request without it is what it always was.",
                "type": "boolean"
              },
              "serial_capture_episode_id": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "target_container_code": {
                "description": "A pick a live assignment holds (DirectToTarget): the box the operator scanned at its position — must be that position's box (R5).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_task_version",
              "idempotency_key",
              "task_id"
            ],
            "title": "CommitPick",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickDetailStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picked"
                  ],
                  "type": "string"
                },
                {
                  "description": "A live reservation — the qty this row carries is set aside and must be released by cancel/short before the balance can be reused.",
                  "enum": [
                    "Allocated"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to a picker/task; still counts as reserved.",
                  "enum": [
                    "Released"
                  ],
                  "type": "string"
                },
                {
                  "description": "DEAD VALUE — nothing assigns it anymore (status-machine arc, owner decision 2026-08-19 §8.5): a released reservation is DELETED, its audit is the `process.order.line_allocation_released` event. The label stays here and in SQL only because Postgres cannot `ALTER TYPE ... DROP VALUE`, and rows written before the arc may still carry it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed with `qty_picked < qty` — the short-pick outcome. Kept as a ROW (unlike Cancelled): a short records an actual pick that happened, not an intention that was withdrawn. Where the shortfall was found is the row's `short_place` (set exactly while `Shorted`): [`PickShortPlace::Shelf`] — at the source location, nothing of the shortfall was picked (`qty - qty_picked` never left the shelf); [`PickShortPlace::Tote`] — in a tote at a station (S0 §7.4): all of `qty` WAS picked from the shelf and went to Lost with the short, and `qty_picked` is 0 because none of it is the order's any more. Alike otherwise; the balance per root (§7.7) counts only the tote's.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Taken from the shelf into a tote bound for a station (spec 2026-10-11 picking S0, §7 О-3): the task's work is done (П-3) — its task is closed — but the pick is not: the wall places it into a position's box through `picking::placement` (`Picked`), or closes it there (`Shorted`, `Returned`). Its goods lie in `held_in_container_id`. Never a dispatch / cart / continuation candidate; not a live reservation (`qty_allocated` left the source at the commit).",
                  "enum": [
                    "AwaitingPlacement"
                  ],
                  "type": "string"
                },
                {
                  "description": "Returned to storage (spec S0 §7.5, О-5): the wall took the pick back off picking (`record_unstaged`, R-14) — its goods became free where the wall put them. Terminal; `qty_picked = 0`. The row stays — the work physically happened (its task closed, journal rows name it) — unlike a released reservation, which is deleted (see `Cancelled`).",
                  "enum": [
                    "Returned"
                  ],
                  "type": "string"
                }
              ]
            },
            "RouteProgress": {
              "description": "The assignment after a route command: its new version (echo it on the next assignment command) and status (`Picking`, or `Delivering` once no stop is left — R3).",
              "properties": {
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "assignment_id",
                "status",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_committed": {
              "type": "boolean"
            },
            "ask_location_empty": {
              "default": false,
              "description": "The pick emptied its source location and the policy says to ask the operator whether it is empty (`pick_to_zero = Confirm`, count spec Appendix L): the RF asks, and sends the answer to `location_confirm_empty`.",
              "type": "boolean"
            },
            "destination_balance_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "line_status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "movement_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_status": {
              "$ref": "#/definitions/OrderStatus"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickDetailStatus"
                }
              ],
              "description": "The status the commit wrote: `Picked`, or `AwaitingPlacement` for a pick bound for a station (П-3). A replay under a new key answers the pick's status now — the wall may have placed or returned it since."
            },
            "qty_picked": {
              "format": "double",
              "type": "number"
            },
            "route": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RouteProgress"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Present only for a pick of an assignment: where its route stands after this commit (R3)."
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_committed",
            "line_status",
            "movement_id",
            "order_status",
            "pick_detail_id",
            "pick_status",
            "qty_picked",
            "task_id",
            "task_version"
          ],
          "title": "CommitPickResult",
          "type": "object"
        }
      },
      "summary": "Atomically commit a full Pick into its prepared DROPID. Refused while an open Hard inventory count is counting the pick's source location (LOCATION_BEING_COUNTED); context.pairs names the pair a shift lead's supervisor_override_grant must carry, and its id goes in count_freeze_grant_id.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1d0d6df10eb8a299ea453746190a541633a4305cf094fc8ceb9311ba643cf5df",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:597fba5a44c305ef22024fd609300c9aed96e40e27802a7fa5b18e6a3fb3dc51",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "pick_short",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "actual_qty": {
                "format": "double",
                "type": "number"
              },
              "count_freeze_grant_id": {
                "description": "A shift lead's single-use grant to take stock off a location an open Hard count is counting (owner's decision 2026-10-21 §6) — the same grant `CommitPick` redeems. A short that FOUND stock moves it off the shelf exactly as a commit does, so it meets the same freeze and needs the same way past it; a zero short moves nothing and reads no grant. Absent from the wire when `None`, so an ordinary short serialises — and hashes — exactly as before.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "drop_id": {
                "description": "Discrete (CollectToRoot): the caller's open pick pallet — its CONTAINER id. Required when stock is found; a zero short needs none. Absent from the wire when `None`, so a discrete request serializes — and hashes — exactly as before slice 4.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "instructions_acknowledged": {
                "description": "The picker read the pick's instructions (RF `PICKINS`) — the same acknowledgement `CommitPick` requires, required here when stock is found (`actual_qty > 0`): it goes onto the pallet like a full pick. A zero short handles nothing and needs none. Absent from the wire when false, so the idempotency hash of a request without it is unchanged.",
                "type": "boolean"
              },
              "note": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason_code": {
                "type": "string"
              },
              "serial_capture_episode_id": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "target_container_code": {
                "description": "A pick a live assignment holds: the box the operator scanned at its position (R5). Required when stock is found; a zero short needs none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "actual_qty",
              "expected_task_version",
              "idempotency_key",
              "reason_code",
              "task_id"
            ],
            "title": "ShortPick",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryCountIntentStatus": {
              "description": "Whether the short's reason has its source location counted (spec count Appendix C): the count itself is requested by the remediation that follows (`remediate_pick_discrepancy`), once the residual is in Lost.",
              "oneOf": [
                {
                  "enum": [
                    "NotConfigured"
                  ],
                  "type": "string"
                },
                {
                  "description": "Results recorded before counts were made say `ConfiguredNotImplemented`.",
                  "enum": [
                    "Requested"
                  ],
                  "type": "string"
                }
              ]
            },
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickDetailStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picked"
                  ],
                  "type": "string"
                },
                {
                  "description": "A live reservation — the qty this row carries is set aside and must be released by cancel/short before the balance can be reused.",
                  "enum": [
                    "Allocated"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to a picker/task; still counts as reserved.",
                  "enum": [
                    "Released"
                  ],
                  "type": "string"
                },
                {
                  "description": "DEAD VALUE — nothing assigns it anymore (status-machine arc, owner decision 2026-08-19 §8.5): a released reservation is DELETED, its audit is the `process.order.line_allocation_released` event. The label stays here and in SQL only because Postgres cannot `ALTER TYPE ... DROP VALUE`, and rows written before the arc may still carry it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed with `qty_picked < qty` — the short-pick outcome. Kept as a ROW (unlike Cancelled): a short records an actual pick that happened, not an intention that was withdrawn. Where the shortfall was found is the row's `short_place` (set exactly while `Shorted`): [`PickShortPlace::Shelf`] — at the source location, nothing of the shortfall was picked (`qty - qty_picked` never left the shelf); [`PickShortPlace::Tote`] — in a tote at a station (S0 §7.4): all of `qty` WAS picked from the shelf and went to Lost with the short, and `qty_picked` is 0 because none of it is the order's any more. Alike otherwise; the balance per root (§7.7) counts only the tote's.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Taken from the shelf into a tote bound for a station (spec 2026-10-11 picking S0, §7 О-3): the task's work is done (П-3) — its task is closed — but the pick is not: the wall places it into a position's box through `picking::placement` (`Picked`), or closes it there (`Shorted`, `Returned`). Its goods lie in `held_in_container_id`. Never a dispatch / cart / continuation candidate; not a live reservation (`qty_allocated` left the source at the commit).",
                  "enum": [
                    "AwaitingPlacement"
                  ],
                  "type": "string"
                },
                {
                  "description": "Returned to storage (spec S0 §7.5, О-5): the wall took the pick back off picking (`record_unstaged`, R-14) — its goods became free where the wall put them. Terminal; `qty_picked = 0`. The row stays — the work physically happened (its task closed, journal rows name it) — unlike a released reservation, which is deleted (see `Cancelled`).",
                  "enum": [
                    "Returned"
                  ],
                  "type": "string"
                }
              ]
            },
            "RouteProgress": {
              "description": "The assignment after a route command: its new version (echo it on the next assignment command) and status (`Picking`, or `Delivering` once no stop is left — R3).",
              "properties": {
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "assignment_id",
                "status",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_committed": {
              "type": "boolean"
            },
            "destination_balance_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "inventory_count": {
              "$ref": "#/definitions/InventoryCountIntentStatus"
            },
            "line_status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "location_blocked": {
              "type": "boolean"
            },
            "movement_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "order_status": {
              "$ref": "#/definitions/OrderStatus"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_status": {
              "$ref": "#/definitions/PickDetailStatus"
            },
            "picked_qty": {
              "format": "double",
              "type": "number"
            },
            "remediation_id": {
              "format": "int64",
              "type": "integer"
            },
            "route": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RouteProgress"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Present only for a pick of an assignment: where its route stands after this short (R3)."
            },
            "short_qty": {
              "format": "double",
              "type": "number"
            },
            "shorted_pick_id": {
              "description": "Q9 / П-5: the pick split off with the shortfall (`Shorted`, no task) when a station pick kept what was found. Absent from the wire otherwise.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_committed",
            "inventory_count",
            "line_status",
            "location_blocked",
            "order_status",
            "pick_detail_id",
            "pick_status",
            "picked_qty",
            "remediation_id",
            "short_qty",
            "task_id",
            "task_version"
          ],
          "title": "ShortPickResult",
          "type": "object"
        }
      },
      "summary": "Atomically commit a partial or zero Pick and persist remediation intent.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:36cfa0cad1ac90892f4162fdda05ef700b9fe04492da965ded7ab674fecfa05c",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b33d7c69c9a316a93aec3ec6af343d63a50557826607911f9f0afe1cc8b62e7a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "pick_reject",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "whole_group": {
                "description": "The summary step's reject (slice 5 §7): every remaining place of the group the task's pick stands in. `false` (the default): this place alone — and then the field is not serialized, so the payload a key was minted for before the field existed hashes as it did.",
                "type": "boolean"
              },
              "work_area_code": {
                "description": "The same area by its code — what the RF entry \"Отбор по участку\" knows (`globals.pka_area_code`), resolved as `pick_dispatch_next` resolves it (`UNKNOWN_WORK_AREA`), so the area's `allow_task_release` holds for a discrete reject (ruling D15 of the 11.10 review). With `work_area_id` too, both must name the same area (`WORK_AREA_MISMATCH`). Ignored, like the id, for a pick of a live assignment or of a live station route — not even resolved. Blank reads as absent. Not serialized when absent, so a payload a key was minted for before the field existed hashes as it did.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "work_area_id": {
                "default": null,
                "description": "Where the task cools down, and whose `allow_task_release` judges the return. Ignored for a pick of a live assignment: its cooldown is the assignment's work area (R9) — and for a stop of a live station route: its cooldown is the route's work area.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "expected_task_version",
              "idempotency_key",
              "reason",
              "task_id"
            ],
            "title": "RejectPick",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Task": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "batch_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "claimed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "ended_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "escalated_at": {
                  "default": null,
                  "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "heartbeat_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lease_expires_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_done": {
                  "format": "double",
                  "type": "number"
                },
                "refused_count": {
                  "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
                  "format": "int32",
                  "type": "integer"
                },
                "return_kind": {
                  "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skip_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "source_type": {
                  "type": "string"
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/TaskStatus"
                },
                "task_type": {
                  "$ref": "#/definitions/TaskType"
                },
                "to_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "weight": {
                  "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "workstation_completed_by": {
                  "default": null,
                  "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "priority",
                "qty_done",
                "refused_count",
                "source_id",
                "source_type",
                "status",
                "task_type",
                "version"
              ],
              "type": "object"
            },
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "rejected_task_ids": {
              "default": [],
              "description": "Every task that went back to the pool, ascending: the named one alone, or with `whole_group` every place taken along. Empty in a result stored before the field existed.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "reservation_unchanged": {
              "type": "boolean"
            },
            "rest_exception_ids": {
              "description": "The execution exceptions (`TargetLeftCart`) of the rests this reject repaired — rejected picks whose target could no longer be started as it stood (ruling D2), ascending. Empty in a result stored before the field existed.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "task": {
              "allOf": [
                {
                  "$ref": "#/definitions/Task"
                }
              ],
              "description": "The named place's task, back in the pool."
            }
          },
          "required": [
            "reservation_unchanged",
            "task"
          ],
          "title": "RejectPickResult",
          "type": "object"
        }
      },
      "summary": "Reject untouched Pick work using Task Manager cooldown and refusal audit.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:891215c39e69df9eb9483c8cb38ff074d5ecd0459482cb78bf486dd87163a980",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:88d29414551c21e9f19187f945c80e32709d32ec8ed629096b272f169abeb35f",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "pick_manual_complete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "ManualLotAttribute": {
                "description": "One lot attribute value the operator typed.",
                "properties": {
                  "code": {
                    "description": "The Lot Policy code (any case).",
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "value"
                ],
                "type": "object"
              },
              "ManualPickSourceInput": {
                "properties": {
                  "internal_lot": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "internal_lot_typed": {
                    "default": false,
                    "type": "boolean"
                  },
                  "item_scan": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "location_scan": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lot_attribute_scan": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lot_attribute_scans": {
                    "default": [],
                    "description": "Separate human scans, in addition to the legacy single-scan field.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "lot_attributes": {
                    "default": [],
                    "items": {
                      "$ref": "#/definitions/ManualLotAttribute"
                    },
                    "type": "array"
                  },
                  "source_lpn_scan": {
                    "default": null,
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            },
            "properties": {
              "count_freeze_grant_id": {
                "description": "A shift lead's single-use grant to take stock off a location an open Hard count is counting (owner's decision 2026-10-21 §6) — the same grant `CommitPick` redeems. A workstation completion moves the stock off the shelf exactly as an RF commit does, so it meets the same freeze and needs the same way past it. Absent from the wire when `None`, so an ordinary completion serialises — and hashes — exactly as before.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "destination_lpn": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "instructions_acknowledged": {
                "default": false,
                "type": "boolean"
              },
              "serial_scans": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "source": {
                "allOf": [
                  {
                    "$ref": "#/definitions/ManualPickSourceInput"
                  }
                ],
                "default": {
                  "internal_lot": null,
                  "internal_lot_typed": false,
                  "item_scan": null,
                  "location_scan": null,
                  "lot_attribute_scan": null,
                  "lot_attribute_scans": [],
                  "lot_attributes": [],
                  "source_lpn_scan": null
                }
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_task_version",
              "idempotency_key",
              "task_id"
            ],
            "title": "CompleteManualPick",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "PickDetailStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picked"
                  ],
                  "type": "string"
                },
                {
                  "description": "A live reservation — the qty this row carries is set aside and must be released by cancel/short before the balance can be reused.",
                  "enum": [
                    "Allocated"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to a picker/task; still counts as reserved.",
                  "enum": [
                    "Released"
                  ],
                  "type": "string"
                },
                {
                  "description": "DEAD VALUE — nothing assigns it anymore (status-machine arc, owner decision 2026-08-19 §8.5): a released reservation is DELETED, its audit is the `process.order.line_allocation_released` event. The label stays here and in SQL only because Postgres cannot `ALTER TYPE ... DROP VALUE`, and rows written before the arc may still carry it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed with `qty_picked < qty` — the short-pick outcome. Kept as a ROW (unlike Cancelled): a short records an actual pick that happened, not an intention that was withdrawn. Where the shortfall was found is the row's `short_place` (set exactly while `Shorted`): [`PickShortPlace::Shelf`] — at the source location, nothing of the shortfall was picked (`qty - qty_picked` never left the shelf); [`PickShortPlace::Tote`] — in a tote at a station (S0 §7.4): all of `qty` WAS picked from the shelf and went to Lost with the short, and `qty_picked` is 0 because none of it is the order's any more. Alike otherwise; the balance per root (§7.7) counts only the tote's.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Taken from the shelf into a tote bound for a station (spec 2026-10-11 picking S0, §7 О-3): the task's work is done (П-3) — its task is closed — but the pick is not: the wall places it into a position's box through `picking::placement` (`Picked`), or closes it there (`Shorted`, `Returned`). Its goods lie in `held_in_container_id`. Never a dispatch / cart / continuation candidate; not a live reservation (`qty_allocated` left the source at the commit).",
                  "enum": [
                    "AwaitingPlacement"
                  ],
                  "type": "string"
                },
                {
                  "description": "Returned to storage (spec S0 §7.5, О-5): the wall took the pick back off picking (`record_unstaged`, R-14) — its goods became free where the wall put them. Terminal; `qty_picked = 0`. The row stays — the work physically happened (its task closed, journal rows name it) — unlike a released reservation, which is deleted (see `Cancelled`).",
                  "enum": [
                    "Returned"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "already_committed": {
              "type": "boolean"
            },
            "ask_location_empty": {
              "type": "boolean"
            },
            "completion_capability": {
              "anyOf": [
                {
                  "$ref": "#/definitions/FlowCapability"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Frozen before the physical write, not recomputed by later shipping."
            },
            "destination_balance_id": {
              "format": "int64",
              "type": "integer"
            },
            "destination_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "destination_location": {
              "type": "string"
            },
            "destination_lpn": {
              "type": "string"
            },
            "executed_by": {
              "format": "int64",
              "type": "integer"
            },
            "line_status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "movement_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_id": {
              "default": 0,
              "format": "int64",
              "type": "integer"
            },
            "order_status": {
              "$ref": "#/definitions/OrderStatus"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_status": {
              "$ref": "#/definitions/PickDetailStatus"
            },
            "qty_picked": {
              "format": "double",
              "type": "number"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_committed",
            "ask_location_empty",
            "destination_balance_id",
            "destination_container_id",
            "destination_location",
            "destination_lpn",
            "executed_by",
            "line_status",
            "movement_id",
            "order_status",
            "pick_detail_id",
            "pick_status",
            "qty_picked",
            "task_id",
            "task_status",
            "task_version"
          ],
          "title": "CompleteManualPickResult",
          "type": "object"
        }
      },
      "summary": "Complete a reviewed workstation Pick: actual stock, Pick, Task and durable receipt atomically.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:27153b69aa674cdc67b44d94cea0bcf9c8b3e9e69282670f351dc28e8b0e613c",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:943d3077c7b2650f27da6c0ebabb4f4eb3de7fbe4b5112d380607b2ad647a6a5",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "pick_manual_finalize",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Stateless physical follow-up: the same completed deposits need the same hand-off regardless of what a screen rendered. No client-selected route or invented Pack completion. Owning Order locks protect receipt membership.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "order_id"
            ],
            "title": "FinalizeManualPicks",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "created_unit_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "existing_unit_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "unrouted_container_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "waiting_for_picks": {
              "type": "boolean"
            }
          },
          "required": [
            "created_unit_ids",
            "existing_unit_ids",
            "order_id",
            "unrouted_container_ids",
            "waiting_for_picks"
          ],
          "title": "FinalizeManualPicksResult",
          "type": "object"
        }
      },
      "summary": "Hand off completed workstation roots using their frozen routes; never mark Pack done.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6ea07f2c0b301fa7997675d1edb9dd668eb34ca56c990ae852cc302674c66ac1",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e0782d8dbd1dd05a43385b87889b8967666f08cb12b2689deb02255dc3f36a1a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_route_start",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "max_picks": {
                "description": "Maximum number of stops to claim in this portion (1..100).",
                "format": "uint16",
                "minimum": 0.0,
                "type": "integer"
              },
              "wave_code": {
                "description": "The wave by its code — what the operator sees (ruling 8).",
                "type": "string"
              },
              "work_area_code": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "max_picks",
              "wave_code",
              "work_area_code"
            ],
            "title": "StartSharedPickRoute",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SharedPickRoute": {
              "properties": {
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee": {
                  "format": "int64",
                  "type": "integer"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_snapshot": true,
                "station_location": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "wave_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_who",
                "assignee",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "policy_snapshot",
                "station_location",
                "version",
                "wave_id",
                "work_area_id"
              ],
              "type": "object"
            },
            "SharedPickRouteView": {
              "description": "The caller's live route as the RF works it: the route, its stops the holder may still work (in route order, each with the task version the next stateful command echoes) and every tote it bound. A live route with no stop left still answers: its stops went back to the pool, and its live totes are delivered or released before the next portion.",
              "properties": {
                "resumed": {
                  "type": "boolean"
                },
                "route": {
                  "$ref": "#/definitions/SharedPickRoute"
                },
                "stops": {
                  "items": {
                    "$ref": "#/definitions/SharedRouteStop"
                  },
                  "type": "array"
                },
                "task_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "totes": {
                  "description": "Bound, delivered and released alike, in the order they were bound.",
                  "items": {
                    "$ref": "#/definitions/SharedPickTote"
                  },
                  "type": "array"
                }
              },
              "required": [
                "resumed",
                "route",
                "stops",
                "task_ids",
                "totes"
              ],
              "type": "object"
            },
            "SharedPickTote": {
              "properties": {
                "bound_at": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "delivered_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivered_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "released_at": {
                  "default": null,
                  "description": "Given back empty to the handling-unit registry; never together with `delivered_at` (CHECK).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "route_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "bound_at",
                "container_id",
                "id",
                "route_id"
              ],
              "type": "object"
            },
            "SharedRouteStop": {
              "description": "One open stop of a route, in route order: its task (and the version the next stateful command on it echoes), its pick and what is left to collect there. A plain read; the stop's lease is judged by the caller.",
              "properties": {
                "base_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pick_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty_remaining": {
                  "description": "The pick's quantity still to collect (base units).",
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "location",
                "pick_id",
                "qty_remaining",
                "sku_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            }
          },
          "description": "The answer of the route's RF doors (`shared_pick_route_get`, `shared_pick_route_start`): the live route, or none; and, when the reader named a task, that task's stop — where the RF re-reads the version of the stop it is working after a conflict.",
          "properties": {
            "live": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SharedPickRouteView"
                },
                {
                  "type": "null"
                }
              ]
            },
            "stop": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SharedRouteStop"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "title": "CurrentSharedPickRoute",
          "type": "object"
        }
      },
      "summary": "Start a portion of a station wave's route by wave code, or resume the operator's live one.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cbefc9927762d9aa7f9fa6b879031ff0209b07b2c8079bb48a380e9d73bd6350",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c49bebf3fd9ed5d13b109b10e8838060c670dcc1c101abf02ad7f1ad4bdda259",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_tote_bind",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command. A physical fact (\"this tote is in my hands\"), so it carries no entity version; the route's held leases are renewed.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "route_id": {
                "format": "int64",
                "type": "integer"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "route_id",
              "tote_code"
            ],
            "title": "BindSharedPickTote",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "bound_at": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": "integer"
            },
            "delivered_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "delivered_by": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "released_at": {
              "default": null,
              "description": "Given back empty to the handling-unit registry; never together with `delivered_at` (CHECK).",
              "type": [
                "string",
                "null"
              ]
            },
            "route_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "bound_at",
            "container_id",
            "id",
            "route_id"
          ],
          "title": "SharedPickTote",
          "type": "object"
        }
      },
      "summary": "Bind an empty registered shared tote to the operator's station route.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2c4f21e3f980baa229086c8d119f7a7355c29aa0a3b2007aa3e4eabf250b5d96",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:98902e26233e5a5a56920f72b1058d1e700db4df66d1dd5023bd61e91f00e9b8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_commit",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command: a station route stop's collection of `qty` (base units) into the scanned tote of the caller's route.",
            "properties": {
              "count_freeze_grant_id": {
                "description": "A shift lead's single-use grant to collect from a location an open Hard count is counting (owner's decision 2026-10-21 §6). Carried because a collection into the route's tote takes stock off the shelf as surely as a full commit does, so it meets the same freeze and must have the same way past it — `pick_commit`'s own field, forwarded.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "instructions_acknowledged": {
                "default": false,
                "type": "boolean"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_task_version",
              "idempotency_key",
              "qty",
              "task_id",
              "tote_code"
            ],
            "title": "CommitSharedTotePick",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickDetailStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picked"
                  ],
                  "type": "string"
                },
                {
                  "description": "A live reservation — the qty this row carries is set aside and must be released by cancel/short before the balance can be reused.",
                  "enum": [
                    "Allocated"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to a picker/task; still counts as reserved.",
                  "enum": [
                    "Released"
                  ],
                  "type": "string"
                },
                {
                  "description": "DEAD VALUE — nothing assigns it anymore (status-machine arc, owner decision 2026-08-19 §8.5): a released reservation is DELETED, its audit is the `process.order.line_allocation_released` event. The label stays here and in SQL only because Postgres cannot `ALTER TYPE ... DROP VALUE`, and rows written before the arc may still carry it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed with `qty_picked < qty` — the short-pick outcome. Kept as a ROW (unlike Cancelled): a short records an actual pick that happened, not an intention that was withdrawn. Where the shortfall was found is the row's `short_place` (set exactly while `Shorted`): [`PickShortPlace::Shelf`] — at the source location, nothing of the shortfall was picked (`qty - qty_picked` never left the shelf); [`PickShortPlace::Tote`] — in a tote at a station (S0 §7.4): all of `qty` WAS picked from the shelf and went to Lost with the short, and `qty_picked` is 0 because none of it is the order's any more. Alike otherwise; the balance per root (§7.7) counts only the tote's.",
                  "enum": [
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Taken from the shelf into a tote bound for a station (spec 2026-10-11 picking S0, §7 О-3): the task's work is done (П-3) — its task is closed — but the pick is not: the wall places it into a position's box through `picking::placement` (`Picked`), or closes it there (`Shorted`, `Returned`). Its goods lie in `held_in_container_id`. Never a dispatch / cart / continuation candidate; not a live reservation (`qty_allocated` left the source at the commit).",
                  "enum": [
                    "AwaitingPlacement"
                  ],
                  "type": "string"
                },
                {
                  "description": "Returned to storage (spec S0 §7.5, О-5): the wall took the pick back off picking (`record_unstaged`, R-14) — its goods became free where the wall put them. Terminal; `qty_picked = 0`. The row stays — the work physically happened (its task closed, journal rows name it) — unlike a released reservation, which is deleted (see `Cancelled`).",
                  "enum": [
                    "Returned"
                  ],
                  "type": "string"
                }
              ]
            },
            "RouteProgress": {
              "description": "The assignment after a route command: its new version (echo it on the next assignment command) and status (`Picking`, or `Delivering` once no stop is left — R3).",
              "properties": {
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "assignment_id",
                "status",
                "version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_committed": {
              "type": "boolean"
            },
            "ask_location_empty": {
              "default": false,
              "description": "The pick emptied its source location and the policy says to ask the operator whether it is empty (`pick_to_zero = Confirm`, count spec Appendix L): the RF asks, and sends the answer to `location_confirm_empty`.",
              "type": "boolean"
            },
            "destination_balance_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "line_status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "movement_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_status": {
              "$ref": "#/definitions/OrderStatus"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickDetailStatus"
                }
              ],
              "description": "The status the commit wrote: `Picked`, or `AwaitingPlacement` for a pick bound for a station (П-3). A replay under a new key answers the pick's status now — the wall may have placed or returned it since."
            },
            "qty_picked": {
              "format": "double",
              "type": "number"
            },
            "route": {
              "anyOf": [
                {
                  "$ref": "#/definitions/RouteProgress"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Present only for a pick of an assignment: where its route stands after this commit (R3)."
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_committed",
            "line_status",
            "movement_id",
            "order_status",
            "pick_detail_id",
            "pick_status",
            "qty_picked",
            "task_id",
            "task_version"
          ],
          "title": "CommitPickResult",
          "type": "object"
        }
      },
      "summary": "Collect all or part of a station route stop into the route's shared tote.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:efd66e98d98ee74b2d3274571662e90aa2fca026d265066cacf9ee6b288526bb",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:597fba5a44c305ef22024fd609300c9aed96e40e27802a7fa5b18e6a3fb3dc51",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "shared_pick_tote_deliver",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command: the scanned tote and the scanned location.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "to_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "to_location",
              "tote_code"
            ],
            "title": "DeliverSharedPickTote",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "moved": {
              "description": "`false` when nothing moved: a repeat, or a tote already standing at the station.",
              "type": "boolean"
            },
            "route_completed": {
              "description": "The delivery finished the route: no live stop and no undelivered tote is left, and the operator's next start takes a new portion.",
              "type": "boolean"
            },
            "station_location": {
              "type": "string"
            },
            "tote_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "wave_id": {
              "description": "The wave whose route the tote served: reconciled at once after a delivery that moved the tote (ruling 6).",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "moved",
            "route_completed",
            "station_location",
            "tote_container_id",
            "wave_id"
          ],
          "title": "SharedToteDeliveryResult",
          "type": "object"
        }
      },
      "summary": "Deliver a station route's shared tote to its frozen station.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:476e3f4efda75f1a905ac2b1b6336967ab13818e48a2923949b4131cb1bf3fb4",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7ee0e8792425e47deefa49f6b3ea48f829b28d827fc07ce6ec8559e86b45b236",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_tote_release",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command: the route and the scanned tote.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "route_id": {
                "format": "int64",
                "type": "integer"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "route_id",
              "tote_code"
            ],
            "title": "ReleaseEmptySharedPickTote",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "route_completed": {
              "description": "The release finished the route: no live stop and no live tote is left, and the operator's next start takes a new portion.",
              "type": "boolean"
            },
            "tote_container_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "route_completed",
            "tote_container_id"
          ],
          "title": "SharedToteReleased",
          "type": "object"
        }
      },
      "summary": "Give an empty shared tote of the operator's station route back to the handling-unit registry.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7e7f917718aa5ea806d67bced9bf6eee860d56bd70d5174827b9c161b51276e1",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:186bf39c17aa725e51901d1f7712bcd536968ce3d678a2e04fe84efc481da8ad",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_work_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "task_id"
            ],
            "title": "PickWorkInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EpisodeStatus": {
              "enum": [
                "Open",
                "InProgress",
                "AwaitingConfirmation",
                "Committed",
                "Cancelled",
                "Abandoned"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickAction": {
              "oneOf": [
                {
                  "enum": [
                    "ConfirmLocation",
                    "ConfirmItem",
                    "ConfirmSourceLpn",
                    "ConfirmInternalLot",
                    "ConfirmLotAttributes",
                    "ConfirmQuantity",
                    "Commit",
                    "Short",
                    "Reject"
                  ],
                  "type": "string"
                },
                {
                  "description": "Scan a pallet label (`pick_drop_open`): the caller has no open pallet of this order.",
                  "enum": [
                    "OpenDrop"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickDepositMode": {
              "enum": [
                "CollectToDrop"
              ],
              "type": "string"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPackagingView": {
              "oneOf": [
                {
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "PlannedCarton": {
                      "properties": {
                        "carton_id": {
                          "format": "int64",
                          "type": "integer"
                        },
                        "code": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "carton_id",
                        "code"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "PlannedCarton"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "ShipAsIs": {
                      "properties": {
                        "pack_item_id": {
                          "format": "int64",
                          "type": "integer"
                        },
                        "pack_revision_id": {
                          "format": "int64",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "pack_item_id",
                        "pack_revision_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "ShipAsIs"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickSerialProgressView": {
              "properties": {
                "captured_base_qty": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "episode_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/EpisodeStatus"
                },
                "submitted_qty": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "captured_qty",
                "episode_id",
                "expected_qty",
                "status",
                "submitted_qty"
              ],
              "type": "object"
            },
            "PickSourceView": {
              "properties": {
                "base_uom": {
                  "description": "Historical base UOM frozen from the drawn stock; unknown legacy rows stay null.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "lot_display": {
                  "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" — what the operator looks for on the goods. Empty when the pick has no lot or the policy shows nothing.",
                  "items": {
                    "$ref": "#/definitions/PickLotAttributeView"
                  },
                  "type": "array"
                },
                "lot_summary": {
                  "description": "`lot_display` in one line, \"Expiration date 2028-01-01 · Color BLUE\"; empty when nothing is shown.",
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "description": "Quantity in base units.",
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "uom": {
                  "description": "Allocation step UOM; `qty` is not expressed in this unit.",
                  "type": "string"
                }
              },
              "required": [
                "location",
                "lot",
                "lot_display",
                "lot_summary",
                "owner_id",
                "qty",
                "sku_code",
                "uom"
              ],
              "type": "object"
            },
            "PickTargetView": {
              "properties": {
                "deposit_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickDepositMode"
                },
                "drop_code": {
                  "type": "string"
                },
                "drop_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "instruction": {
                  "type": "string"
                },
                "packaging": {
                  "$ref": "#/definitions/PickPackagingView"
                }
              },
              "required": [
                "deposit_container_id",
                "deposit_mode",
                "drop_code",
                "drop_id",
                "instruction",
                "packaging"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "allowed_actions": {
              "items": {
                "$ref": "#/definitions/PickAction"
              },
              "type": "array"
            },
            "instructions": {
              "description": "What the picker must read before the pick commits, in reading order: the SKU's instruction, the order line's, the ShipAsIs rule (`picking::instructions`). RF `PICKINS` shows them.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "instructions_require_acknowledgement": {
              "description": "`pick_commit` (and `pick_short` with stock found) refuses without `instructions_acknowledged` while this is true — exactly when `instructions` is not empty.",
              "type": "boolean"
            },
            "lease_expires_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "serial_progress": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PickSerialProgressView"
                },
                {
                  "type": "null"
                }
              ]
            },
            "serials_required": {
              "type": "boolean"
            },
            "source": {
              "$ref": "#/definitions/PickSourceView"
            },
            "target": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PickTargetView"
                },
                {
                  "type": "null"
                }
              ]
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            },
            "verification": {
              "allOf": [
                {
                  "$ref": "#/definitions/VerificationView"
                }
              ],
              "description": "What must be proven about the source before the pick commits, what is proven, what comes next (R17). `allowed_actions` follows it."
            }
          },
          "required": [
            "allowed_actions",
            "instructions",
            "instructions_require_acknowledgement",
            "order_id",
            "pick_detail_id",
            "serials_required",
            "source",
            "task_id",
            "task_version",
            "verification"
          ],
          "title": "PickWorkView",
          "type": "object"
        }
      },
      "summary": "Return authoritative Pick work and prepared DROPID state for reconnect.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c0718a7285bf0a98176e64543fda11eaa8e26f3e0a62b4de062c1a9d175721ed",
      "x-quark-response-schema-hash": "sha256:b2887053712a72a51331a5211522e2463cf5168db607cf5ab6a27b0ca5a07ef4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_drop_current",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "PickDropCurrentInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenPickDropView": {
              "description": "The caller's open pick pallet.",
              "properties": {
                "destination_location": {
                  "description": "Where F2 puts it — frozen by its first deposit; `None` while it holds nothing.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "drop_code": {
                  "type": "string"
                },
                "drop_id": {
                  "description": "The pallet's CONTAINER id (the commit's `drop_id`).",
                  "format": "int64",
                  "type": "integer"
                },
                "has_goods": {
                  "description": "Stock anywhere in the pallet's tree.",
                  "type": "boolean"
                },
                "opened_at": {
                  "type": "string"
                },
                "order_code": {
                  "type": "string"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_drop_id": {
                  "description": "The pallet's record.",
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "description": "The record's version (every write of it bumps it).",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "drop_code",
                "drop_id",
                "has_goods",
                "opened_at",
                "order_code",
                "order_id",
                "pick_drop_id",
                "version"
              ],
              "type": "object"
            }
          },
          "description": "The RF screen's answer: an object, so a screen reads `response.drop.*`.",
          "properties": {
            "drop": {
              "anyOf": [
                {
                  "$ref": "#/definitions/OpenPickDropView"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "title": "CurrentPickDrop",
          "type": "object"
        }
      },
      "summary": "The operator's open pick pallet: its label, order, goods and frozen destination location.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d5be80523acb4adc6c7e50c38dcae74f188b3c43de6d72c8a83f4b9976afc5d6",
      "x-quark-response-schema-hash": "sha256:ae1ecf352d25552927b4720a5319c9387d9add47bb6fda7424c39b46ab097825",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_manual_review",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "task_id"
            ],
            "title": "ManualPickReviewInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            }
          },
          "properties": {
            "destination_location": {
              "type": "string"
            },
            "destination_lpn_required": {
              "type": "boolean"
            },
            "instructions": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "internal_lot": {
              "type": "string"
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "required_serial_count": {
              "format": "uint32",
              "minimum": 0.0,
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            },
            "source_location": {
              "type": "string"
            },
            "source_lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_version": {
              "format": "int32",
              "type": "integer"
            },
            "verification_plan": {
              "$ref": "#/definitions/VerificationPlan"
            }
          },
          "required": [
            "destination_location",
            "destination_lpn_required",
            "instructions",
            "internal_lot",
            "pick_detail_id",
            "qty",
            "required_serial_count",
            "sku_code",
            "source_location",
            "task_id",
            "task_version",
            "verification_plan"
          ],
          "title": "ManualPickReview",
          "type": "object"
        }
      },
      "summary": "Review workstation Pick source requirements without an RF lease.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7d6a2ea1596e8edbe14f0f84f679a974f67e570b6b3f5a338407cdc267fb62a4",
      "x-quark-response-schema-hash": "sha256:28dca1eb6a654975494d66a4beee0869fb989d85a479d74fe5fda84fb533f83b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_route_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "task_id": {
                "default": null,
                "description": "The stop the reader is working: its current version comes back in `stop` (the RF's refresh after a version conflict).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "SharedPickRouteGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SharedPickRoute": {
              "properties": {
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee": {
                  "format": "int64",
                  "type": "integer"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_snapshot": true,
                "station_location": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "wave_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_who",
                "assignee",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "policy_snapshot",
                "station_location",
                "version",
                "wave_id",
                "work_area_id"
              ],
              "type": "object"
            },
            "SharedPickRouteView": {
              "description": "The caller's live route as the RF works it: the route, its stops the holder may still work (in route order, each with the task version the next stateful command echoes) and every tote it bound. A live route with no stop left still answers: its stops went back to the pool, and its live totes are delivered or released before the next portion.",
              "properties": {
                "resumed": {
                  "type": "boolean"
                },
                "route": {
                  "$ref": "#/definitions/SharedPickRoute"
                },
                "stops": {
                  "items": {
                    "$ref": "#/definitions/SharedRouteStop"
                  },
                  "type": "array"
                },
                "task_ids": {
                  "items": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "type": "array"
                },
                "totes": {
                  "description": "Bound, delivered and released alike, in the order they were bound.",
                  "items": {
                    "$ref": "#/definitions/SharedPickTote"
                  },
                  "type": "array"
                }
              },
              "required": [
                "resumed",
                "route",
                "stops",
                "task_ids",
                "totes"
              ],
              "type": "object"
            },
            "SharedPickTote": {
              "properties": {
                "bound_at": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "delivered_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivered_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "released_at": {
                  "default": null,
                  "description": "Given back empty to the handling-unit registry; never together with `delivered_at` (CHECK).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "route_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "bound_at",
                "container_id",
                "id",
                "route_id"
              ],
              "type": "object"
            },
            "SharedRouteStop": {
              "description": "One open stop of a route, in route order: its task (and the version the next stateful command on it echoes), its pick and what is left to collect there. A plain read; the stop's lease is judged by the caller.",
              "properties": {
                "base_uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pick_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty_remaining": {
                  "description": "The pick's quantity still to collect (base units).",
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "location",
                "pick_id",
                "qty_remaining",
                "sku_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            }
          },
          "description": "The answer of the route's RF doors (`shared_pick_route_get`, `shared_pick_route_start`): the live route, or none; and, when the reader named a task, that task's stop — where the RF re-reads the version of the stop it is working after a conflict.",
          "properties": {
            "live": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SharedPickRouteView"
                },
                {
                  "type": "null"
                }
              ]
            },
            "stop": {
              "anyOf": [
                {
                  "$ref": "#/definitions/SharedRouteStop"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "title": "CurrentSharedPickRoute",
          "type": "object"
        }
      },
      "summary": "The operator's live station route: its workable stops with their task versions, and its totes.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ef154a7f2df234591891a2e3bccce3e4250f5e9dde251dd101a999e5a968281f",
      "x-quark-response-schema-hash": "sha256:c49bebf3fd9ed5d13b109b10e8838060c670dcc1c101abf02ad7f1ad4bdda259",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_reconciliation_report",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "PickReconciliationInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickReconciliationCount": {
              "properties": {
                "code": {
                  "$ref": "#/definitions/PickReconciliationIssueCode"
                },
                "count": {
                  "format": "uint",
                  "minimum": 0.0,
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "count"
              ],
              "type": "object"
            },
            "PickReconciliationIssue": {
              "properties": {
                "code": {
                  "$ref": "#/definitions/PickReconciliationIssueCode"
                },
                "detail": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "task_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "detail"
              ],
              "type": "object"
            },
            "PickReconciliationIssueCode": {
              "enum": [
                "ORPHAN_TASK",
                "MISSING_TASK",
                "DUPLICATE_LIVE_TASK",
                "SOURCE_OUTCOME_MISSING",
                "TASK_OUTCOME_MISSING",
                "INVALID_TASK_STATE",
                "SOURCE_NOT_ELIGIBLE"
              ],
              "type": "string"
            }
          },
          "properties": {
            "counts": {
              "items": {
                "$ref": "#/definitions/PickReconciliationCount"
              },
              "type": "array"
            },
            "healthy": {
              "type": "boolean"
            },
            "issue_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "issues": {
              "items": {
                "$ref": "#/definitions/PickReconciliationIssue"
              },
              "type": "array"
            }
          },
          "required": [
            "counts",
            "healthy",
            "issue_count",
            "issues"
          ],
          "title": "PickReconciliationReport",
          "type": "object"
        }
      },
      "summary": "Report task/Pick lifecycle and dispatch-eligibility inconsistencies.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:656756a8b829e508e36a90be5abf47468531c41a5041259f940cf9fc1a1d076c",
      "x-quark-response-schema-hash": "sha256:a43623de20b886dcefbec769b31922dd2bbc3b2649c8aed0b6b0d6fb487442a6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_tote_complete_supervised",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command: the route, its version as the board showed it, and the tote.",
            "properties": {
              "expected_version": {
                "description": "`shared_pick_route.version` as the board showed it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "route_id": {
                "format": "int64",
                "type": "integer"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_version",
              "idempotency_key",
              "route_id",
              "tote_code"
            ],
            "title": "CompleteSharedPickToteSupervised",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SupervisedToteOutcome": {
              "description": "What the supervisor's door did with the tote.",
              "oneOf": [
                {
                  "description": "It held goods: delivered to the route's frozen station.",
                  "properties": {
                    "moved": {
                      "description": "`false` when nothing moved: a repeat, or a tote already standing at the station.",
                      "type": "boolean"
                    },
                    "outcome": {
                      "enum": [
                        "delivered"
                      ],
                      "type": "string"
                    },
                    "route_completed": {
                      "description": "The delivery finished the route: no live stop and no undelivered tote is left, and the operator's next start takes a new portion.",
                      "type": "boolean"
                    },
                    "station_location": {
                      "type": "string"
                    },
                    "tote_container_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "wave_id": {
                      "description": "The wave whose route the tote served: reconciled at once after a delivery that moved the tote (ruling 6).",
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "moved",
                    "outcome",
                    "route_completed",
                    "station_location",
                    "tote_container_id",
                    "wave_id"
                  ],
                  "type": "object"
                },
                {
                  "description": "It was empty: given back to the handling-unit registry.",
                  "properties": {
                    "outcome": {
                      "enum": [
                        "released"
                      ],
                      "type": "string"
                    },
                    "route_completed": {
                      "description": "The release finished the route: no live stop and no live tote is left, and the operator's next start takes a new portion.",
                      "type": "boolean"
                    },
                    "tote_container_id": {
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "outcome",
                    "route_completed",
                    "tote_container_id"
                  ],
                  "type": "object"
                }
              ]
            }
          },
          "properties": {
            "route_id": {
              "format": "int64",
              "type": "integer"
            },
            "route_version": {
              "description": "The route's version after the door — what the board echoes next.",
              "format": "int32",
              "type": "integer"
            },
            "tote": {
              "$ref": "#/definitions/SupervisedToteOutcome"
            }
          },
          "required": [
            "route_id",
            "route_version",
            "tote"
          ],
          "title": "SharedToteCompletedSupervised",
          "type": "object"
        }
      },
      "summary": "Deliver (or release, if empty) a live shared tote of a station route whose operator is gone, as a supervisor.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:16142f52c3c89e5aa5a7b7325c5949ce10c4c74c37663a4cf4333b0d70ce42e3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a509e06b836ba86fb243866937e3a4852e7056291d2dab23fe2b217c70f65d6e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shared_pick_route",
          "id_field": "route_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_drop_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenPickDropBoardRow": {
              "description": "One open pick pallet as the supervisor's list shows it.",
              "properties": {
                "destination_location": {
                  "description": "The frozen destination; `None` while it holds nothing.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "destination_takes_it": {
                  "description": "That destination would take the closed pallet now (a type its policy revision allows, `Ok`, no flag, no hold against outbound); `None` while it has none. `false` is what a retarget is for.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "drop_code": {
                  "type": "string"
                },
                "drop_id": {
                  "description": "The pallet's CONTAINER id (the commit's `drop_id`).",
                  "format": "int64",
                  "type": "integer"
                },
                "has_goods": {
                  "description": "Stock anywhere in the pallet's tree.",
                  "type": "boolean"
                },
                "id": {
                  "description": "The pallet's record id — the row's selection identity, what a metadata list ticks and rereads the row by. The same value as `pick_drop_id`.",
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "operator_id": {
                  "description": "Who holds it: the operator it is open for.",
                  "format": "int64",
                  "type": "integer"
                },
                "operator_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "operator_username": {
                  "type": "string"
                },
                "order_code": {
                  "type": "string"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_drop_id": {
                  "description": "The pallet's record — the retarget's `pick_drop_id`.",
                  "format": "int64",
                  "type": "integer"
                },
                "routed": {
                  "description": "The router froze a pack station as its destination.",
                  "type": "boolean"
                },
                "version": {
                  "description": "The record's version — the retarget's `expected_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "drop_code",
                "drop_id",
                "has_goods",
                "id",
                "opened_at",
                "operator_id",
                "operator_username",
                "order_code",
                "order_id",
                "pick_drop_id",
                "routed",
                "version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/OpenPickDropBoardRow"
          },
          "title": "Array_of_OpenPickDropBoardRow",
          "type": "array"
        }
      },
      "summary": "List every operator's open pick pallet with its record version and whether its frozen destination still takes it, for the supervisor.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:921021c69a3e13035e44ef640a8ad580facb332000f1c6467f53733e2fd83118",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "shared_pick_route_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "RouteToteState": {
              "description": "Whether the route's operator still works it, as the supervised door judges it.",
              "oneOf": [
                {
                  "description": "A stop of the route is held under a live lease (the door refuses `STATION_ROUTE_HOLDER_PRESENT`), or the holder acted on the route within the warehouse's wait — e.g. collected the last stop and is carrying the tote to the station (`STATION_ROUTE_RECENTLY_ACTIVE`).",
                  "enum": [
                    "Worked"
                  ],
                  "type": "string"
                },
                {
                  "description": "No stop is held under a live lease and nothing happened on the route for the warehouse's wait: the supervisor may finish the tote.",
                  "enum": [
                    "Abandoned"
                  ],
                  "type": "string"
                }
              ]
            },
            "SharedRouteToteBoardRow": {
              "description": "One live tote of a live station route, as the supervisor's board shows it.",
              "properties": {
                "bound_at": {
                  "type": "string"
                },
                "holds_goods": {
                  "description": "Picks await placement in the tote: the door delivers it to the station; otherwise it releases the empty tote.",
                  "type": "boolean"
                },
                "id": {
                  "description": "The tote's ownership row — the board row's identity.",
                  "format": "int64",
                  "type": "integer"
                },
                "live_stops": {
                  "description": "The route's stops still held under a live lease.",
                  "format": "int64",
                  "type": "integer"
                },
                "operator_id": {
                  "description": "The route's holder.",
                  "format": "int64",
                  "type": "integer"
                },
                "operator_username": {
                  "type": "string"
                },
                "route_id": {
                  "description": "The door's `route_id`.",
                  "format": "int64",
                  "type": "integer"
                },
                "route_version": {
                  "description": "The route's version — the door's `expected_version`.",
                  "format": "int32",
                  "type": "integer"
                },
                "state": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/RouteToteState"
                    }
                  ],
                  "description": "What the button gate reads."
                },
                "station_location": {
                  "description": "The frozen station the goods go to.",
                  "type": "string"
                },
                "tote_code": {
                  "description": "The tote's label — the door's `tote_code`.",
                  "type": "string"
                },
                "wave_code": {
                  "type": "string"
                },
                "work_area_code": {
                  "type": "string"
                }
              },
              "required": [
                "bound_at",
                "holds_goods",
                "id",
                "live_stops",
                "operator_id",
                "operator_username",
                "route_id",
                "route_version",
                "state",
                "station_location",
                "tote_code",
                "wave_code",
                "work_area_code"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SharedRouteToteBoardRow"
          },
          "title": "Array_of_SharedRouteToteBoardRow",
          "type": "array"
        }
      },
      "summary": "List every live tote of every live station route with its route version, its frozen station and whether its operator is gone, for the supervisor.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "query",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_commands",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:cac99b1d96aed1c9883e695c6d8a7f6240e906b5ebedb53ede3b15a582aba80f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_start",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carrier_code": {
                "description": "The scanned carrier.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "work_area_code": {
                "description": "The area the operator named on \"Отбор по участку\" — the same code the dispatch answered \"scan carrier\" for.",
                "type": "string"
              }
            },
            "required": [
              "carrier_code",
              "idempotency_key",
              "work_area_code"
            ],
            "title": "StartPickAssignment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "assignment": {
              "$ref": "#/definitions/PickAssignmentView"
            },
            "continuations_taken": {
              "default": [],
              "description": "The `Bypassed` continuations this start took, each as one position of the new assignment (ruling T22), in position order.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "resumed": {
              "description": "The operator already had a live assignment: it is continued and nothing new was built or claimed.",
              "type": "boolean"
            }
          },
          "required": [
            "assignment",
            "resumed"
          ],
          "title": "StartPickAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Build a pick assignment of whole planned targets on a scanned carrier.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:bca2fb461b80a39a003ae334320d723b90191bfb8d27503d718eda94863d82c9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a15df76fb1ec37ec594bfb48540b2fa94aa4e3539d1674e7e9789759fa88d637",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_bind_position",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_code": {
                "description": "The scanned box — or, for a disposable carton, the planned carton's own label.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "position_no": {
                "description": "The position on the carrier (1..N), as `pick_assignment_get` named it.",
                "format": "int16",
                "type": "integer"
              }
            },
            "required": [
              "container_code",
              "idempotency_key",
              "position_no"
            ],
            "title": "BindPickAssignmentPosition",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_bound": {
              "description": "The position was already bound to this box: nothing was written.",
              "type": "boolean"
            },
            "assignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickAssignmentView"
                }
              ],
              "description": "The assignment after the bind: its new `version`, `status` (`Ready` after the last bind) and the next step (the next `Open` position)."
            },
            "container_code": {
              "type": "string"
            },
            "position_no": {
              "format": "int16",
              "type": "integer"
            }
          },
          "required": [
            "already_bound",
            "assignment",
            "container_code",
            "position_no"
          ],
          "title": "BindPickAssignmentPositionResult",
          "type": "object"
        }
      },
      "summary": "Bind a scanned box to a position of the operator's pick assignment carrier.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0afb5bae6a842825bc79de408bac8b663d8f2d63a3cb0ad2c6a213ce40b96210",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:60047c535773d9352819f95e7a5fe5b4c0fa9868917f2db4d38e2cc9189a4536",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "assignment_id": {
                "default": null,
                "description": "Absent: the live assignment of the operator asking.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "PickAssignmentGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "assignment": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PickAssignmentView"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`None`: the operator has no live assignment."
            }
          },
          "title": "PickAssignmentGetResult",
          "type": "object"
        }
      },
      "summary": "Return a pick assignment (or the operator's live one) with its version.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5b9989ceb6ab8ce71e8a790a4eff3d4f1978e2d343e492eaa3bf5b525c289d34",
      "x-quark-response-schema-hash": "sha256:f7703c650d6203c3cc2812f63024c222503a3e843b59f860342e758ee9de3cee",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_dissolve",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The operator dissolves the assignment they hold (RF): before the first commit alone — after it, [`DissolveRefusal::SupervisorConfirmationRequired`] unless a supervisor's grant comes with it.",
            "properties": {
              "assignment_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`pick_assignment.version` as `pick_assignment_get` returned it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "override_grant_id": {
                "description": "A supervisor's grant (`supervisor_override_grant`) for `pick_override_codes::dissolve_after_commit(assignment_id)` — lets the holder dissolve after a commit (R14).",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "assignment_id",
              "expected_version",
              "idempotency_key"
            ],
            "title": "DissolvePickAssignment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "assignment_id": {
              "format": "int64",
              "type": "integer"
            },
            "authorized_by": {
              "description": "Who authorised a holder's dissolve after a commit (the grant's authorizer, read off the grant row — never from the request).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "boxes_off": {
              "description": "Boxes taken off the carrier, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "carrier_freed": {
              "description": "Nothing is left on the carrier: it is `Empty` again.",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "kept_positions": {
              "description": "`Bound` positions kept because their box holds goods, ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "released_positions": {
              "description": "Positions `Released`, ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "released_task_ids": {
              "description": "Tasks returned to the pool, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "rest_exception_ids": {
              "description": "The execution exceptions (`TargetLeftCart`) of the rests this dissolve repaired — targets whose rest could no longer be started as it stood (ruling D2), ascending. Empty in a result stored before the field existed.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "status": {
              "$ref": "#/definitions/PickAssignmentStatus"
            },
            "version": {
              "description": "The version after the dissolve.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "assignment_id",
            "boxes_off",
            "carrier_freed",
            "code",
            "kept_positions",
            "released_positions",
            "released_task_ids",
            "status",
            "version"
          ],
          "title": "DissolvePickAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Dissolve your own pick assignment; after its first commit with a supervisor's grant.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:17e8c02c42548732e28ecbe275cf338f6ff705130f518200585a676b4df11855",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:4c694344802431dbd954cd1b861f389b6c8547cd4b9debca92f8521879423db2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_assignment",
          "id_field": "assignment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_assignment_dissolve_supervised",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A supervisor dissolves any live assignment from the board, also after commits: boxes with goods stay on the carrier.",
            "properties": {
              "assignment_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`pick_assignment.version` as the board row showed it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "description": "Why: written on every released task (`skip_reason`). Required.",
                "type": "string"
              }
            },
            "required": [
              "assignment_id",
              "expected_version",
              "idempotency_key",
              "reason"
            ],
            "title": "DissolvePickAssignmentSupervised",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "assignment_id": {
              "format": "int64",
              "type": "integer"
            },
            "authorized_by": {
              "description": "Who authorised a holder's dissolve after a commit (the grant's authorizer, read off the grant row — never from the request).",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "boxes_off": {
              "description": "Boxes taken off the carrier, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "carrier_freed": {
              "description": "Nothing is left on the carrier: it is `Empty` again.",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "kept_positions": {
              "description": "`Bound` positions kept because their box holds goods, ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "released_positions": {
              "description": "Positions `Released`, ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "released_task_ids": {
              "description": "Tasks returned to the pool, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "rest_exception_ids": {
              "description": "The execution exceptions (`TargetLeftCart`) of the rests this dissolve repaired — targets whose rest could no longer be started as it stood (ruling D2), ascending. Empty in a result stored before the field existed.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "status": {
              "$ref": "#/definitions/PickAssignmentStatus"
            },
            "version": {
              "description": "The version after the dissolve.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "assignment_id",
            "boxes_off",
            "carrier_freed",
            "code",
            "kept_positions",
            "released_positions",
            "released_task_ids",
            "status",
            "version"
          ],
          "title": "DissolvePickAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Dissolve any live pick assignment as a supervisor, with a reason.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6930e08d448e94667aeaf523104c642a551995e9a7e8dab0131d7cd957dd10b6",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:4c694344802431dbd954cd1b861f389b6c8547cd4b9debca92f8521879423db2",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_assignment",
          "id_field": "assignment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_assignment_skip",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "\"Not now — later on the route\" (spec C.8, C.11-3; R2). A `stateless_command`: the operator skips because of where they stand, not because of what the screen showed; no entity version.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "whole_group": {
                "description": "The summary step's skip (slice 5 §7): every remaining place of the group the task's pick stands in. `false` (the default): this place alone — and then the field is not serialized, so the payload a key was minted for before the field existed hashes as it did.",
                "type": "boolean"
              }
            },
            "required": [
              "idempotency_key",
              "task_id"
            ],
            "title": "SkipInAssignment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "The assignment after the skip: its new version and status (`Picking` once a route command ran — R3).",
          "properties": {
            "assignment_id": {
              "format": "int64",
              "type": "integer"
            },
            "skipped_task_ids": {
              "default": [],
              "description": "Every task whose stop was skipped, ascending: the named one alone, or with `whole_group` every place taken along. Empty in a result stored before the field existed.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "status": {
              "$ref": "#/definitions/PickAssignmentStatus"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "assignment_id",
            "status",
            "task_id",
            "version"
          ],
          "title": "SkipInAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Skip a pick inside your pick assignment: it moves to the end of the route.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b803dce52dd2a4034b29b35394a836d2114797cdcce77148e72debb0d1689a06",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:6fe1ff9dc3ec6ae70b9b109c79f81e95b313b90c72b93a5c43dc14a8ae79d06e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_complete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "\"The carrier is delivered here\" (spec C.3 Завершение, C.6, ADR-091 §4.4; R11–R13). A `stateless_command`: a physical fact the operator reports, whatever the screen showed — no entity version.",
            "properties": {
              "carrier_code": {
                "description": "A carrier dissolved with goods, scanned by any operator (R12). Absent: the caller's own live (or dissolved-with-goods) assignment.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "location_code": {
                "description": "The scanned delivery location. Required when the policy's completion is `ConfirmAtLocation`, or for a `Complete` cart a supervisor retargeted (`pick_destination_retarget`: the location it stood in died — it goes to the one they named); otherwise not read for `Complete` (finish in place).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key"
            ],
            "title": "CompletePickAssignment",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "assignment_id": {
              "format": "int64",
              "type": "integer"
            },
            "boxes_off": {
              "description": "Empty boxes taken off the carrier, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "boxes_unloaded": {
              "description": "Boxes with goods detached from the carrier: roots at the delivery location, stock untouched (R12/R21), ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "carrier_freed": {
              "description": "The carrier is `Empty` with no children — always `true` after a successful delivery (R12); kept as a field for the RF result.",
              "type": "boolean"
            },
            "closed_positions": {
              "description": "Positions whose box holds goods: `Closed` (box and planned carton kept on the row as the record), ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "code": {
              "type": "string"
            },
            "delivered_by": {
              "description": "Who delivered it: the caller — the holder, the operator who scanned a carrier dissolved with goods, or a supervisor on the holder's behalf (ruling D3). `None` in a result stored before the field existed.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivered_location": {
              "type": "string"
            },
            "moved": {
              "description": "The tree was moved (`false`: it already stood there, or `Complete`).",
              "type": "boolean"
            },
            "released_positions": {
              "description": "Bound positions with an empty box: `Released`, the box off the carrier, ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "status": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickAssignmentStatus"
                }
              ],
              "description": "`Completed`, or `Dissolved` for a carrier dissolved with goods."
            },
            "version": {
              "description": "The version after the delivery.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "assignment_id",
            "boxes_off",
            "boxes_unloaded",
            "carrier_freed",
            "closed_positions",
            "code",
            "delivered_location",
            "moved",
            "released_positions",
            "status",
            "version"
          ],
          "title": "CompletePickAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Deliver your pick assignment's carrier (or a carrier dissolved with goods) to its delivery location and complete it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6c9d304d5ab88efbfce47ff232b21f5a4a01825eaa00ab7835b39dcd22dfcc09",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:47fe8a9189124ff4c66aa10f5e9355289ab7abcbc14a8dbb7d636f3078037119",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_position_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "CartonFullReason": {
                "oneOf": [
                  {
                    "enum": [
                      "MASTER_DATA_DIMENSIONS",
                      "PROTECTIVE_PACKAGING",
                      "ORIENTATION_NOT_FEASIBLE",
                      "PRODUCT_OR_CARTON_DEFORMED",
                      "SOLVER_LAYOUT_NOT_FEASIBLE"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "Needs a comment (`chk_ptee_other_needs_comment`).",
                    "enum": [
                      "OTHER"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PositionCloseReason": {
                "description": "Why a position is closed on the route. Only one reason exists today; the wire names it so a later reason is a new value, not a new command.",
                "oneOf": [
                  {
                    "description": "The box is physically full (`CARTON_FULL`).",
                    "enum": [
                      "CartonFull"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "comment": {
                "description": "Required when `reason_code` is `OTHER`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "position_no": {
                "description": "The position whose box is full, as `pick_assignment_get` named it.",
                "format": "int16",
                "type": "integer"
              },
              "reason": {
                "$ref": "#/definitions/PositionCloseReason"
              },
              "reason_code": {
                "$ref": "#/definitions/CartonFullReason"
              }
            },
            "required": [
              "idempotency_key",
              "position_no",
              "reason",
              "reason_code"
            ],
            "title": "ClosePickAssignmentPosition",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "NewTargetOutcome": {
              "description": "One new target the rest of the full box became.",
              "properties": {
                "carton_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carton_id": {
                  "description": "`PlannedCarton`: the new planned carton.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "continuation_id": {
                  "description": "`Bypassed`: the continuation.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "picks": {
                  "description": "How many picks it carries.",
                  "format": "int16",
                  "type": "integer"
                },
                "position_no": {
                  "description": "The free place on this carrier; `None`: it waits for the next assignment.",
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_kind": {
                  "$ref": "#/definitions/PickTargetKind"
                }
              },
              "required": [
                "picks",
                "target_kind"
              ],
              "type": "object"
            },
            "OperatorAction": {
              "description": "What the operator does next.",
              "oneOf": [
                {
                  "description": "A new box goes on a free place of the carrier: bind it.",
                  "enum": [
                    "BindNewBox"
                  ],
                  "type": "string"
                },
                {
                  "description": "Picks are left on this carrier's route.",
                  "enum": [
                    "ContinueRoute"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing is left to pick: deliver the carrier.",
                  "enum": [
                    "Deliver"
                  ],
                  "type": "string"
                },
                {
                  "description": "The rest could not be replanned: hand it over to recovery.",
                  "enum": [
                    "HandOverToRecovery"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickTargetKind": {
              "oneOf": [
                {
                  "description": "A carton the cartonization plan named.",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "The `Bypassed` picks of one order: no planned carton.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "TargetExceptionStatus": {
              "oneOf": [
                {
                  "description": "Reported, not yet resolving — kept for a two-phase variant; nothing writes it today (ruling T7). Not written in slice 6 (spec rev 2 state machine).",
                  "enum": [
                    "Reported"
                  ],
                  "type": "string"
                },
                {
                  "description": "The close's transaction is resolving it right now.",
                  "enum": [
                    "Resolving"
                  ],
                  "type": "string"
                },
                {
                  "description": "Resolved: a new plan (`PlannedCarton`) or a continuation (`Bypassed`).",
                  "enum": [
                    "Resolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "The repair failed; `error_code` says why. A supervisor retries.",
                  "enum": [
                    "RecoveryRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "Terminal: nothing is left to repair — none of its picks is a live reservation any more (deleted, shorted, picked), found by a retry. `error_code` says why, `resolved_at` when (`chk_ptee_cancelled`).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_reported": {
              "description": "The position was already closed full: nothing was written, the existing exception is answered (T9).",
              "type": "boolean"
            },
            "assignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickAssignmentView"
                }
              ],
              "description": "The assignment after the close: its version, status and next step."
            },
            "box_code": {
              "type": "string"
            },
            "error_code": {
              "description": "`RecoveryRequired`: why the repair failed.",
              "type": [
                "string",
                "null"
              ]
            },
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "exception_status": {
              "$ref": "#/definitions/TargetExceptionStatus"
            },
            "left_picks": {
              "description": "Picks that left the assignment for the next one, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "new_targets": {
              "items": {
                "$ref": "#/definitions/NewTargetOutcome"
              },
              "type": "array"
            },
            "next_action": {
              "$ref": "#/definitions/OperatorAction"
            },
            "position_no": {
              "format": "int16",
              "type": "integer"
            },
            "released_task_ids": {
              "description": "Tasks handed back to the pool, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "remaining_picks": {
              "description": "Picks still open on this carrier's route after the close.",
              "format": "int16",
              "type": "integer"
            },
            "resulting_plan_id": {
              "description": "`PlannedCarton`, resolved: the child plan of the repair.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "target_kind": {
              "$ref": "#/definitions/PickTargetKind"
            }
          },
          "required": [
            "already_reported",
            "assignment",
            "box_code",
            "exception_id",
            "exception_status",
            "left_picks",
            "new_targets",
            "next_action",
            "position_no",
            "released_task_ids",
            "remaining_picks",
            "target_kind"
          ],
          "title": "ClosePickAssignmentPositionResult",
          "type": "object"
        }
      },
      "summary": "Report the box at a position of your pick assignment full: it closes, the rest goes into new cartons.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8561945118c0f1f6fd7fc3e816317f56e49f13b2ccb025e4961968ca487bcae2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:51d6e99394487c9a94fc98e059906f5d31467bec5caa67366cf207fbf418f3de",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_position_hand_over",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "position_no": {
                "description": "The position waiting for recovery, as the route's `RecoveryHandover` step named it.",
                "format": "int16",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "position_no"
            ],
            "title": "HandOverPickAssignmentPosition",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "assignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickAssignmentView"
                }
              ],
              "description": "The assignment after the hand-over: its version, status and next step."
            },
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "left_picks": {
              "description": "Picks that left the assignment, ascending; empty on a repeat.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "position_no": {
              "format": "int16",
              "type": "integer"
            },
            "released_task_ids": {
              "description": "Their tasks, back in the pool, ascending; empty on a repeat.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            }
          },
          "required": [
            "assignment",
            "exception_id",
            "left_picks",
            "position_no",
            "released_task_ids"
          ],
          "title": "HandOverPickAssignmentPositionResult",
          "type": "object"
        }
      },
      "summary": "Hand the picks of a full box whose repair failed over to recovery: they leave your carrier.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:76b3d0371b1de3213291187b67fcd0fef8126625b1b5be5d3be5018e9c63c380",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:2a9b00c3648f52936f5953a7dcad5e6da95308c0af18232c7a5d9e6086bc3e5b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_position_replace_container",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "new_container_code": {
                "description": "The scanned new box (or, for a position planned as a disposable carton, that carton's own label).",
                "type": "string"
              },
              "position_no": {
                "description": "The position whose box is damaged, as `pick_assignment_get` named it.",
                "format": "int16",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "new_container_code",
              "position_no"
            ],
            "title": "ReplacePickAssignmentContainer",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AggregatedPlace": {
              "description": "One place of an [`AssignmentStep::AggregatedPick`]: the pick that fills it, and what it takes — each place commits or shorts on its own, under its own task version (spec §6, R3).",
              "properties": {
                "order_number": {
                  "type": "string"
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "description": "Still to pick for this place: `qty - qty_picked`.",
                  "format": "double",
                  "type": "number"
                },
                "target_container_code": {
                  "description": "The box bound to the place — where its goods go.",
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_version": {
                  "description": "Echo it as `expected_task_version` on this place's pick commands.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "order_number",
                "pick_detail_id",
                "position_no",
                "qty",
                "target_container_code",
                "task_id",
                "task_version"
              ],
              "type": "object"
            },
            "AssignmentStep": {
              "description": "The next step of an assignment.",
              "oneOf": [
                {
                  "description": "Put a box on this position: the lowest-numbered `Open` one (on the route: the lowest `Open` one with picks, before any pick).",
                  "properties": {
                    "kind": {
                      "enum": [
                        "BindPosition"
                      ],
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "description": "The order's own number — what the operator reads on paperwork.",
                      "type": "string"
                    },
                    "planned_box": {
                      "anyOf": [
                        {
                          "$ref": "#/definitions/PlannedBoxView"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The box the cartonization plan sized for this position: the carton's policy candidate. `None` when the position has no planned carton (`Bypassed`) or the candidate row is gone."
                    },
                    "planned_carton_code": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "planned_carton_id": {
                      "format": "int64",
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "planned_target_kind": {
                      "$ref": "#/definitions/PickPlannedTargetKind"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "kind",
                    "order_id",
                    "order_number",
                    "planned_target_kind",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The next stop of the route (R1). Also what a `Ready` assignment shows: the status tells the screen the route has not started.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "Pick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "Consecutive stops of one source on a cart that confirms quantities `Aggregated` (slice 5 §3, §4): the source is confirmed once, then each place takes its own quantity into its own box.",
                  "properties": {
                    "base_uom": {
                      "description": "Historical base UOM of `qty`, or null when it cannot be established.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "blocked_reason": {
                      "description": "Why this stop cannot be committed now — the pick's cartonization facts say no (`CARTONIZATION_PENDING` / `CARTONIZATION_BLOCKED` / `CARTONIZATION_INVALID`, e.g. a ShipAsIs pick without its factory package's proof). The stop is still shown, so the operator can skip or reject it; commit and short are not offered. `None`: the stop can be picked.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "instructions": {
                      "description": "What the picker must read before the pick commits (`picking::instructions`): the route card shows them; Enter on the card is the acknowledgement the commit needs. Empty while the stop is blocked.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "kind": {
                      "enum": [
                        "AggregatedPick"
                      ],
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "lot": {
                      "type": "string"
                    },
                    "lot_display": {
                      "description": "The reserved lot's attributes and dates the SKU's Lot Policy marks \"show on pick\" (`PickSourceView::lot_display`).",
                      "items": {
                        "$ref": "#/definitions/PickLotAttributeView"
                      },
                      "type": "array"
                    },
                    "lot_summary": {
                      "description": "`lot_display` in one line; empty when nothing is shown.",
                      "type": "string"
                    },
                    "order_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "order_number": {
                      "type": "string"
                    },
                    "pick_detail_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "places": {
                      "description": "The places still to fill, by place number (R10); the current first.",
                      "items": {
                        "$ref": "#/definitions/AggregatedPlace"
                      },
                      "type": "array"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    },
                    "qty": {
                      "description": "Still to pick in base units: `qty - qty_picked`.",
                      "format": "double",
                      "type": "number"
                    },
                    "serials_required": {
                      "description": "The SKU needs a serial episode.",
                      "type": "boolean"
                    },
                    "skipped": {
                      "description": "The operator skipped this stop before (it came round again).",
                      "type": "boolean"
                    },
                    "sku_code": {
                      "type": "string"
                    },
                    "source_container_code": {
                      "description": "The source LPN when the stock stands in a container.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "stops_left": {
                      "description": "Route steps left, this one included: a summary step is ONE stop, however many places it holds (controller ruling, replaces R9's count of picks). On a per-pick cart every step is one pick. The count is of the route's steps as grouped by the route rule, so a group the card then splits (a blocked place shown alone, a place outside the episode that comes later as its own stop) is still counted as one.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "target_container_code": {
                      "type": "string"
                    },
                    "target_container_id": {
                      "description": "The box bound to the position — where the goods go (R5).",
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "task_version": {
                      "description": "Echo it as `expected_task_version` on the pick commands.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "total_qty": {
                      "description": "What the remaining places take together — information only (§6).",
                      "format": "double",
                      "type": "number"
                    },
                    "uom": {
                      "description": "Allocation step UOM; preserved for existing consumers.",
                      "type": "string"
                    },
                    "verification": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/VerificationView"
                        }
                      ],
                      "description": "What must be proven about the source before the stop commits, and how far the operator has got (`PickWorkView::verification`). Its `blocked` is NOT `blocked_reason`: a source that cannot be identified keeps the stop on the card with skip, short (zero only) and reject, never commit."
                    }
                  },
                  "required": [
                    "instructions",
                    "kind",
                    "location",
                    "lot",
                    "lot_display",
                    "lot_summary",
                    "order_id",
                    "order_number",
                    "pick_detail_id",
                    "places",
                    "position_no",
                    "qty",
                    "serials_required",
                    "skipped",
                    "sku_code",
                    "stops_left",
                    "target_container_code",
                    "target_container_id",
                    "task_id",
                    "task_version",
                    "total_qty",
                    "uom",
                    "verification"
                  ],
                  "type": "object"
                },
                {
                  "description": "The repair after `CARTON_FULL` failed (`RecoveryRequired`) and the position still holds picks: hand them over to recovery before the route goes on (ruling T12).",
                  "properties": {
                    "error_code": {
                      "description": "Why the repair failed.",
                      "type": "string"
                    },
                    "exception_id": {
                      "format": "int64",
                      "type": "integer"
                    },
                    "kind": {
                      "enum": [
                        "RecoveryHandover"
                      ],
                      "type": "string"
                    },
                    "picks_left": {
                      "description": "Open stops the position still holds.",
                      "format": "int16",
                      "type": "integer"
                    },
                    "position_no": {
                      "format": "int16",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "error_code",
                    "exception_id",
                    "kind",
                    "picks_left",
                    "position_no"
                  ],
                  "type": "object"
                },
                {
                  "description": "The route is exhausted (or the carrier was dissolved with goods): deliver it (R11, R12, R13).",
                  "properties": {
                    "completion": {
                      "allOf": [
                        {
                          "$ref": "#/definitions/PickingCompletion"
                        }
                      ],
                      "description": "What the holder does: `ConfirmAtLocation` — scan `delivery_location`; `Complete` — finish in place. The frozen policy's `completion`, except that a `Complete` carrier a supervisor retargeted (`pick_destination_retarget`, ruling D3) says `ConfirmAtLocation`: it is delivered to the named location, scanned (`finishes_in_place`, the rule `pick_assignment_complete` judges by)."
                    },
                    "delivery_location": {
                      "description": "`None`: an assignment built before slice 4 whose tasks disagreed. After a supervisor's retarget: the location they named.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "enum": [
                        "Deliver"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "completion",
                    "kind"
                  ],
                  "type": "object"
                }
              ]
            },
            "Capture": {
              "description": "How an operator may give one piece of evidence.",
              "enum": [
                "Scan",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "EvidenceKey": {
              "description": "One thing the plan asks to be proven: a kind, and — for a lot attribute — its lower-cased Lot Policy code. Also the business key of a stored fact.",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                }
              },
              "required": [
                "kind"
              ],
              "type": "object"
            },
            "EvidenceKind": {
              "description": "What a plan can ask for. `Quantity` and `Target` are facts too (audit), but the plan never requires them, so they are not here.",
              "enum": [
                "Location",
                "Item",
                "Lpn",
                "InternalLot",
                "LotAttribute"
              ],
              "type": "string"
            },
            "LotPhysicalVerification": {
              "oneOf": [
                {
                  "description": "The operator cannot check this value on the floor; the card may show it, nothing is asked.",
                  "enum": [
                    "NotVerifiable"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator compares the value printed on the goods with the card.",
                  "enum": [
                    "Visual"
                  ],
                  "type": "string"
                },
                {
                  "description": "The value is read from a barcode on the goods.",
                  "enum": [
                    "Barcode"
                  ],
                  "type": "string"
                },
                {
                  "description": "Either of the two.",
                  "enum": [
                    "VisualOrBarcode"
                  ],
                  "type": "string"
                }
              ]
            },
            "LotProof": {
              "description": "What proves WHICH LOT is at the source.",
              "oneOf": [
                {
                  "description": "The policy asks nothing about the lot.",
                  "enum": [
                    "NotRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the lot label.",
                  "enum": [
                    "InternalLot"
                  ],
                  "type": "string"
                },
                {
                  "description": "The reserved LPN holds one lot.",
                  "enum": [
                    "SingleLotLpn"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location holds one lot.",
                  "enum": [
                    "SingleLotLocation"
                  ],
                  "type": "string"
                },
                {
                  "additionalProperties": false,
                  "description": "The operator confirms the lot's checkable attributes, and only the reserved lot has them.",
                  "properties": {
                    "Attributes": {
                      "properties": {
                        "codes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "codes"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "Attributes"
                  ],
                  "type": "object"
                }
              ]
            },
            "PickAssignmentAction": {
              "description": "What the operator may do with the assignment at this step.",
              "oneOf": [
                {
                  "enum": [
                    "BindPosition",
                    "Commit",
                    "Skip",
                    "Short",
                    "Reject",
                    "Complete",
                    "Dissolve"
                  ],
                  "type": "string"
                },
                {
                  "description": "Hand the stops of a held position over to recovery (`pick_assignment_position_hand_over`, ruling T12).",
                  "enum": [
                    "HandOver"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickAssignmentView": {
              "properties": {
                "allowed_actions": {
                  "items": {
                    "$ref": "#/definitions/PickAssignmentAction"
                  },
                  "type": "array"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "positions_bound": {
                  "format": "int16",
                  "type": "integer"
                },
                "positions_total": {
                  "description": "Positions that hold (or will hold) a box: `Open`, `Bound`, and a box closed full — it stays on the carrier until delivery.",
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickAssignmentStatus"
                },
                "step": {
                  "$ref": "#/definitions/AssignmentStep"
                },
                "version": {
                  "description": "Echo it back on `pick_assignment_dissolve` (a `stateful_command`).",
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "allowed_actions",
                "assignment_id",
                "code",
                "positions_bound",
                "positions_total",
                "status",
                "step",
                "version",
                "work_area_id"
              ],
              "type": "object"
            },
            "PickLotAttributeView": {
              "description": "One attribute of the reserved lot the card shows.",
              "properties": {
                "code": {
                  "description": "Lower-cased attribute code; the four dates are `DATE_ATTRIBUTE_CODES`.",
                  "type": "string"
                },
                "label": {
                  "description": "The policy's label for the operator.",
                  "type": "string"
                },
                "value": {
                  "description": "Dates as `YYYY-MM-DD`.",
                  "type": "string"
                },
                "verification": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/LotPhysicalVerification"
                    }
                  ],
                  "description": "How the operator can check the value on the goods."
                }
              },
              "required": [
                "code",
                "label",
                "value",
                "verification"
              ],
              "type": "object"
            },
            "PickPlannedTargetKind": {
              "oneOf": [
                {
                  "enum": [
                    "ShipAsIs"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton the cartonization plan named (`planned_carton_id`).",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every Bypassed pick of one order: no planned carton, one position.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PlannedBoxView": {
              "description": "The box a planned carton was sized as (`cartonization_policy_detail`): its candidate code and inner dimensions. A dimension of 0 is \"unknown\".",
              "properties": {
                "code": {
                  "description": "The candidate's code (`step_num`, e.g. `BOX-M`).",
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "inner_height": {
                  "format": "double",
                  "type": "number"
                },
                "inner_length": {
                  "format": "double",
                  "type": "number"
                },
                "inner_width": {
                  "format": "double",
                  "type": "number"
                },
                "tare_type_code": {
                  "description": "The tare type the candidate plans (slice 7); `None`: any box that fits.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tare_type_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "description",
                "inner_height",
                "inner_length",
                "inner_width"
              ],
              "type": "object"
            },
            "ReplacedContainerOutcome": {
              "oneOf": [
                {
                  "description": "A disposable box (no handling-unit type): `Disposed`, no hold.",
                  "enum": [
                    "Disposed"
                  ],
                  "type": "string"
                },
                {
                  "description": "A reusable box: `Empty`, with a `Damaged` hold (`damage_hold_id`).",
                  "enum": [
                    "HeldDamaged"
                  ],
                  "type": "string"
                }
              ]
            },
            "RequiredEvidence": {
              "description": "One thing the operator must prove, in the order the screen asks it.",
              "properties": {
                "capture": {
                  "$ref": "#/definitions/Capture"
                },
                "code": {
                  "description": "The lower-cased Lot Policy code of a `LotAttribute`; `None` otherwise.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expected_display_value": {
                  "description": "What the card shows the operator to compare with (a lot attribute's reserved value).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "$ref": "#/definitions/EvidenceKind"
                },
                "label": {
                  "description": "The Lot Policy label of a `LotAttribute`.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "capture",
                "kind"
              ],
              "type": "object"
            },
            "SourceFingerprint": {
              "description": "Spec §9 (cross-review 2026-10-06): the expected SOURCE. `source_container_id` is `pick_detail.container_id` — where the goods are taken FROM; the pallet (`drop_id`, `pick_drop_id`) and the planned box (`carton_id`) are where they go and are never part of it (X-06).",
              "properties": {
                "internal_lot": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "source_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_location": {
                  "type": "string"
                }
              },
              "required": [
                "internal_lot",
                "owner_id",
                "sku_code",
                "source_location"
              ],
              "type": "object"
            },
            "VerificationPlan": {
              "properties": {
                "lot_proof": {
                  "$ref": "#/definitions/LotProof"
                },
                "policy_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "policy_revision": {
                  "format": "int32",
                  "type": "integer"
                },
                "required_evidence": {
                  "items": {
                    "$ref": "#/definitions/RequiredEvidence"
                  },
                  "type": "array"
                },
                "source": {
                  "$ref": "#/definitions/SourceFingerprint"
                }
              },
              "required": [
                "lot_proof",
                "policy_id",
                "policy_revision",
                "required_evidence",
                "source"
              ],
              "type": "object"
            },
            "VerificationView": {
              "description": "What the card must prove about the source of a pick, and how far the operator has got.",
              "properties": {
                "blocked": {
                  "description": "The wire code of the refusal that makes the pick uncommittable: `SOURCE_EXPIRED` — the reserved lot fell below the SKU's minimum shelf life on pick after it was reserved (ruling D5; the pick is shorted to zero with the reason `EXPIRED`, or rejected); or `SOURCE_NOT_PHYSICALLY_IDENTIFIABLE` — the source cannot be told apart by what is physically there (shorted to zero, rejected or skipped). Not the route step's `blocked_reason` (cartonization facts).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "blocked_message": {
                  "description": "What the card says about `blocked`, in the reader's language: why the pick cannot be committed and the way out a short has. Set exactly when `blocked` is; the terminal prints it as is.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "episode_id": {
                  "description": "The caller's usable open episode, if one exists. A confirmation opens it; this view never does.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "next": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/RequiredEvidence"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "What the operator proves next; `None` when the plan is satisfied (or blocked)."
                },
                "plan": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/VerificationPlan"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "`None` exactly when `blocked` is set."
                },
                "satisfied": {
                  "description": "The plan's evidence already proven, in plan order.",
                  "items": {
                    "$ref": "#/definitions/EvidenceKey"
                  },
                  "type": "array"
                },
                "stale": {
                  "description": "The caller's open episode proves another source, or belongs to another ownership (R8, R12): the plan restarts, and the first confirmation cancels that episode and opens a new one.",
                  "type": "boolean"
                }
              },
              "required": [
                "satisfied",
                "stale"
              ],
              "type": "object"
            }
          },
          "properties": {
            "already_replaced": {
              "description": "The position was already bound to this box by a replacement: nothing was written, the recorded replacement is answered.",
              "type": "boolean"
            },
            "assignment": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickAssignmentView"
                }
              ],
              "description": "The assignment after the replacement: its version and next step."
            },
            "balances_moved": {
              "description": "Balance rows with stock that moved into the new box (0 on `already_replaced`: nothing moved this time).",
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "damage_hold_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "new_container_code": {
              "type": "string"
            },
            "old_container_code": {
              "type": "string"
            },
            "old_container_outcome": {
              "allOf": [
                {
                  "$ref": "#/definitions/ReplacedContainerOutcome"
                }
              ],
              "description": "`Disposed`: a disposable box, written off. `HeldDamaged`: a reusable box, back to `Empty` under a `Damaged` hold."
            },
            "position_no": {
              "format": "int16",
              "type": "integer"
            },
            "replacement_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "already_replaced",
            "assignment",
            "balances_moved",
            "new_container_code",
            "old_container_code",
            "old_container_outcome",
            "position_no",
            "replacement_id"
          ],
          "title": "ReplacePickAssignmentContainerResult",
          "type": "object"
        }
      },
      "summary": "Replace the damaged box at a position of your pick assignment by a new box: the goods move into it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f019a415f369003ab0a727bf41f440d092fbe5f4b9245191e199cd6ae57f2e97",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7a3a07490762b957db717f5e9b9505de520a17ce49422267f7dc44f916175f6f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cartonization_exception_retry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "exception_id": {
                "description": "The exception, as the supervisor's list shows it.",
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "exception_id",
              "idempotency_key"
            ],
            "title": "RetryCartonException",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "NewTargetOutcome": {
              "description": "One new target the rest of the full box became.",
              "properties": {
                "carton_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carton_id": {
                  "description": "`PlannedCarton`: the new planned carton.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "continuation_id": {
                  "description": "`Bypassed`: the continuation.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "picks": {
                  "description": "How many picks it carries.",
                  "format": "int16",
                  "type": "integer"
                },
                "position_no": {
                  "description": "The free place on this carrier; `None`: it waits for the next assignment.",
                  "format": "int16",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_kind": {
                  "$ref": "#/definitions/PickTargetKind"
                }
              },
              "required": [
                "picks",
                "target_kind"
              ],
              "type": "object"
            },
            "PickTargetKind": {
              "oneOf": [
                {
                  "description": "A carton the cartonization plan named.",
                  "enum": [
                    "PlannedCarton"
                  ],
                  "type": "string"
                },
                {
                  "description": "The `Bypassed` picks of one order: no planned carton.",
                  "enum": [
                    "Bypassed"
                  ],
                  "type": "string"
                }
              ]
            },
            "TargetExceptionStatus": {
              "oneOf": [
                {
                  "description": "Reported, not yet resolving — kept for a two-phase variant; nothing writes it today (ruling T7). Not written in slice 6 (spec rev 2 state machine).",
                  "enum": [
                    "Reported"
                  ],
                  "type": "string"
                },
                {
                  "description": "The close's transaction is resolving it right now.",
                  "enum": [
                    "Resolving"
                  ],
                  "type": "string"
                },
                {
                  "description": "Resolved: a new plan (`PlannedCarton`) or a continuation (`Bypassed`).",
                  "enum": [
                    "Resolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "The repair failed; `error_code` says why. A supervisor retries.",
                  "enum": [
                    "RecoveryRequired"
                  ],
                  "type": "string"
                },
                {
                  "description": "Terminal: nothing is left to repair — none of its picks is a live reservation any more (deleted, shorted, picked), found by a retry. `error_code` says why, `resolved_at` when (`chk_ptee_cancelled`).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "already_finished": {
              "description": "It was finished (`Resolved` or `Cancelled`) before this press: its result, nothing written.",
              "type": "boolean"
            },
            "error_code": {
              "description": "`RecoveryRequired`: why the repair failed this time. `Cancelled`: why nothing was repaired (`CARTON_REPLAN_NOTHING_LEFT`).",
              "type": [
                "string",
                "null"
              ]
            },
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "handed_over_picks": {
              "description": "Picks this retry took off a carrier first, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "new_cartons": {
              "description": "Resolved: the new planned cartons, each waiting whole for the next carrier (`position_no` empty).",
              "items": {
                "$ref": "#/definitions/NewTargetOutcome"
              },
              "type": "array"
            },
            "released_task_ids": {
              "description": "Their tasks, `Seized` back to the pool, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "resulting_plan_id": {
              "description": "Resolved: the child plan of the repair.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "status": {
              "allOf": [
                {
                  "$ref": "#/definitions/TargetExceptionStatus"
                }
              ],
              "description": "`Resolved`, `RecoveryRequired` again, or `Cancelled` — nothing was left to repair."
            }
          },
          "required": [
            "already_finished",
            "exception_id",
            "handed_over_picks",
            "new_cartons",
            "released_task_ids",
            "status"
          ],
          "title": "RetryCartonExceptionResult",
          "type": "object"
        }
      },
      "summary": "Retry the repair of a box-full exception that waits for recovery, as a supervisor.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:55877fa2501895e73920337ce31a30550014bd88b2b6c2f7d77dcd720d8fb2fc",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:20dd1b256b65958ce8b833eb3bdbff3e688247477ec57ce91a4f79f6acfc68e0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "cartonization_exception_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TargetExceptionRow": {
              "description": "One exception as the supervisor's list shows it (`pick_target_exception_board` view, wms-app 059 part 5): what was reported, where, by whom, and how it stands — the row the web screen's Retry acts on.",
              "properties": {
                "assignment_code": {
                  "type": "string"
                },
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "box_code": {
                  "description": "The box reported full.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comment": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "continuation_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "error_detail": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "handed_over_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "kind": {
                  "description": "`pick_target_exception_kind` as text: `CartonFull` | `TargetLeftCart`.",
                  "type": "string"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "picks": {
                  "description": "How many picks the exception replans.",
                  "format": "int32",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "reason_code": {
                  "description": "`carton_full_reason` as text — `CartonFull` only.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reported_at": {
                  "type": "string"
                },
                "reported_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "reported_by_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resolved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resulting_plan_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "source_carton_code": {
                  "description": "The full box's planned carton (`PlannedCarton` only).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "description": "`pick_target_exception_status` as text.",
                  "type": "string"
                },
                "target_kind": {
                  "description": "`pick_target_kind` as text: `PlannedCarton` | `Bypassed`.",
                  "type": "string"
                }
              },
              "required": [
                "assignment_code",
                "assignment_id",
                "id",
                "kind",
                "order_id",
                "order_number",
                "picks",
                "position_no",
                "reported_at",
                "reported_by",
                "status",
                "target_kind"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/TargetExceptionRow"
          },
          "title": "Array_of_TargetExceptionRow",
          "type": "array"
        }
      },
      "summary": "List pick target execution exceptions (box full) for the supervisor, newest first.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:2dffe75d899475c0f1618150ea67ae90f4cb5e9e22ad2f71840b100ac647d07a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_complete_supervised",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A supervisor delivers a `Delivering` cart on its holder's behalf (ruling D3): the holder left the shift, is ill, or their account is gone, and the picked goods must still reach their location. So is a cart the supervisor dissolved with goods on its carrier (the only exit ruling D1 leaves a started cart). The carrier goes to the assignment's delivery location as the row has it — frozen at start, or retargeted by a supervisor (`pick_destination_retarget`) — with no scan; the policy's `Complete` finishes it where it stands, unless a supervisor retargeted it because that location died: then at the location they named. Recorded with the supervisor as `delivered_by` and on every journal row.\n\nA `stateful_command` on `pick_assignment.version` (`.claude/rules/api-versioning-and-idempotency.md`): the supervisor decides on what the board shows — a cart waiting for delivery, its location; had they seen the holder back on it, or another location, they would not press this. A stale version answers code 40 with the current state.",
            "properties": {
              "assignment_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`pick_assignment.version` as the board row showed it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "assignment_id",
              "expected_version",
              "idempotency_key"
            ],
            "title": "CompletePickAssignmentSupervised",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Picking",
                    "Delivering",
                    "Completed",
                    "Dissolved"
                  ],
                  "type": "string"
                },
                {
                  "description": "Positions are being bound to physical boxes.",
                  "enum": [
                    "Building"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every position is bound; the route may start.",
                  "enum": [
                    "Ready"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "assignment_id": {
              "format": "int64",
              "type": "integer"
            },
            "boxes_off": {
              "description": "Empty boxes taken off the carrier, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "boxes_unloaded": {
              "description": "Boxes with goods detached from the carrier: roots at the delivery location, stock untouched (R12/R21), ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "carrier_freed": {
              "description": "The carrier is `Empty` with no children — always `true` after a successful delivery (R12); kept as a field for the RF result.",
              "type": "boolean"
            },
            "closed_positions": {
              "description": "Positions whose box holds goods: `Closed` (box and planned carton kept on the row as the record), ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "code": {
              "type": "string"
            },
            "delivered_by": {
              "description": "Who delivered it: the caller — the holder, the operator who scanned a carrier dissolved with goods, or a supervisor on the holder's behalf (ruling D3). `None` in a result stored before the field existed.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "delivered_location": {
              "type": "string"
            },
            "moved": {
              "description": "The tree was moved (`false`: it already stood there, or `Complete`).",
              "type": "boolean"
            },
            "released_positions": {
              "description": "Bound positions with an empty box: `Released`, the box off the carrier, ascending.",
              "items": {
                "format": "int16",
                "type": "integer"
              },
              "type": "array"
            },
            "status": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickAssignmentStatus"
                }
              ],
              "description": "`Completed`, or `Dissolved` for a carrier dissolved with goods."
            },
            "version": {
              "description": "The version after the delivery.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "assignment_id",
            "boxes_off",
            "boxes_unloaded",
            "carrier_freed",
            "closed_positions",
            "code",
            "delivered_location",
            "moved",
            "released_positions",
            "status",
            "version"
          ],
          "title": "CompletePickAssignmentResult",
          "type": "object"
        }
      },
      "summary": "Deliver a pick assignment's carrier waiting for delivery (Delivering, or dissolved with goods) on its holder's behalf, as a supervisor.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ea9d0bab31e7a441442570b4bbb4a9d408d535287a82544b13a4c0f9c212a088",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:47fe8a9189124ff4c66aa10f5e9355289ab7abcbc14a8dbb7d636f3078037119",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_assignment",
          "id_field": "assignment_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_destination_retarget",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command. Exactly one subject; `expected_version` is ITS version.",
            "properties": {
              "assignment_id": {
                "description": "A cart waiting for delivery (`pick_assignment.id`): `Delivering`, or dissolved with goods on its carrier.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "expected_version": {
                "description": "The subject's version as the board showed it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "location_code": {
                "description": "The new destination.",
                "type": "string"
              },
              "pick_drop_id": {
                "description": "A loaded open pick pallet's RECORD (`pick_drop.id`, the wire's `pick_drop_id` — not its container).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "default": "",
                "description": "Why — written on the journal row. Required: missing or blank is refused `RETARGET_REASON_REQUIRED`.",
                "type": "string"
              }
            },
            "required": [
              "expected_version",
              "idempotency_key",
              "location_code"
            ],
            "title": "RetargetPickDestination",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "assignment_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "from_location": {
              "description": "The destination it replaced — for a cart finished in place, the location its carrier stood in (`None`: it had none).",
              "type": [
                "string",
                "null"
              ]
            },
            "order_ids": {
              "default": [],
              "description": "The orders whose later pallets and carts now go to `to_location`, ascending.",
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "pick_drop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "retarget_id": {
              "description": "The journal row.",
              "format": "int64",
              "type": "integer"
            },
            "routed": {
              "description": "The router still waits there (`completion_capability` kept).",
              "type": "boolean"
            },
            "to_location": {
              "type": "string"
            },
            "version": {
              "description": "The subject's version after the change.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "retarget_id",
            "routed",
            "to_location",
            "version"
          ],
          "title": "RetargetPickDestinationResult",
          "type": "object"
        }
      },
      "summary": "Send the goods of a cart waiting for delivery or of a loaded pick pallet to another location when the frozen one no longer takes them, as a supervisor.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f7d310c3102cc193e6f0e62a86ac2a0d288cbf8b982998c767dd8fde03aef3de",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:ab437f5aa3db7ab605c19520df1224048bef0c3815c68f19c890144347443114",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_assignment",
          "id_field": "assignment_id",
          "version_field": "expected_version"
        },
        {
          "entity": "pick_drop",
          "id_field": "pick_drop_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_assignment_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentBoardRow": {
              "description": "One assignment as the board lists it (`pick_assignment_board` view).",
              "properties": {
                "assignee": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "assignee_username": {
                  "type": "string"
                },
                "awaits_delivery": {
                  "description": "The cart waits to be delivered: `Delivering`, or dissolved with a box still on its carrier and never delivered — what the supervisor's delivery and retarget act on (ruling R6).",
                  "type": "boolean"
                },
                "carrier_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carrier_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "delivery_location": {
                  "description": "Where the cart goes — frozen at start, moved only by a retarget; `None` for a cart that never froze one.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dissolved_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "grouping_unit": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "positions_bound": {
                  "description": "Positions holding a box now (Bound) or to the end (Closed).",
                  "format": "int32",
                  "type": "integer"
                },
                "positions_total": {
                  "format": "int32",
                  "type": "integer"
                },
                "ready_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "description": "`pick_assignment_status` as text.",
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "work_area_code": {
                  "type": "string"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "assignee",
                "assignee_username",
                "awaits_delivery",
                "code",
                "created_at",
                "grouping_unit",
                "id",
                "positions_bound",
                "positions_total",
                "status",
                "version",
                "work_area_code",
                "work_area_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PickAssignmentBoardRow"
          },
          "title": "Array_of_PickAssignmentBoardRow",
          "type": "array"
        }
      },
      "summary": "List pick assignments in any status for the supervisor's board, newest first.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:8b2bf40433f7e531c91429eaec4f9dd161390815e6ae30ef2be23edd7b25738c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_board_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One assignment as the board lists it (`pick_assignment_board` view).",
          "properties": {
            "assignee": {
              "format": "int64",
              "type": "integer"
            },
            "assignee_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "assignee_username": {
              "type": "string"
            },
            "awaits_delivery": {
              "description": "The cart waits to be delivered: `Delivering`, or dissolved with a box still on its carrier and never delivered — what the supervisor's delivery and retarget act on (ruling R6).",
              "type": "boolean"
            },
            "carrier_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "carrier_container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "completed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "delivery_location": {
              "description": "Where the cart goes — frozen at start, moved only by a retarget; `None` for a cart that never froze one.",
              "type": [
                "string",
                "null"
              ]
            },
            "dissolved_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "grouping_unit": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "positions_bound": {
              "description": "Positions holding a box now (Bound) or to the end (Closed).",
              "format": "int32",
              "type": "integer"
            },
            "positions_total": {
              "format": "int32",
              "type": "integer"
            },
            "ready_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "description": "`pick_assignment_status` as text.",
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "work_area_code": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "assignee",
            "assignee_username",
            "awaits_delivery",
            "code",
            "created_at",
            "grouping_unit",
            "id",
            "positions_bound",
            "positions_total",
            "status",
            "version",
            "work_area_code",
            "work_area_id"
          ],
          "title": "PickAssignmentBoardRow",
          "type": "object"
        }
      },
      "summary": "Get one pick assignment as the board shows it, in any status.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:73cf81aff377e8883a216daeea0b07de3e55c786c372c19a9acd85fda7146ce0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_assignment_position_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickAssignmentPositionBoardRow": {
              "description": "One position of an assignment (`pick_assignment_position_board` view).",
              "properties": {
                "assignment_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "bound_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "box_code": {
                  "description": "The box the operator put on the position.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "planned_carton_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "planned_target_kind": {
                  "type": "string"
                },
                "position_no": {
                  "format": "int16",
                  "type": "integer"
                },
                "status": {
                  "description": "`pick_position_status` as text.",
                  "type": "string"
                }
              },
              "required": [
                "assignment_id",
                "id",
                "order_id",
                "order_number",
                "planned_target_kind",
                "position_no",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PickAssignmentPositionBoardRow"
          },
          "title": "Array_of_PickAssignmentPositionBoardRow",
          "type": "array"
        }
      },
      "summary": "List the positions of pick assignments (filter by assignment_id).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_assignment",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:3716d44ced84cb0770f529a2d1329af145944080a43895f818ce221a5b44b141",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_short_reason_create_draft",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PickShortActionDraft": {
                "properties": {
                  "action": {
                    "$ref": "#/definitions/PickShortActionType"
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "fixed_location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "order_scope": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortOrderScope"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "required": {
                    "default": false,
                    "type": "boolean"
                  },
                  "scope": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortActionScope"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "supervisor_review": {
                    "default": false,
                    "type": "boolean"
                  },
                  "target_mode": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortTargetMode"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trigger_after": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortTriggerAfter"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "action"
                ],
                "type": "object"
              },
              "PickShortActionScope": {
                "enum": [
                  "CurrentPick",
                  "SameSourceStock",
                  "CurrentSkuAtLocation",
                  "EntireLocation"
                ],
                "type": "string"
              },
              "PickShortActionType": {
                "enum": [
                  "ReleaseCurrentRemainder",
                  "BlockSourceLocation",
                  "ReleaseRelatedReservations",
                  "RelocateResidualToMissing",
                  "ReallocateReleasedDemand",
                  "CreateInventoryCount",
                  "HoldInventory",
                  "HoldContainer",
                  "RequestSupervisorReview"
                ],
                "type": "string"
              },
              "PickShortOrderScope": {
                "enum": [
                  "CurrentOrder",
                  "OrdersWithReleasedReservations",
                  "CurrentAndAffectedOrders"
                ],
                "type": "string"
              },
              "PickShortTargetMode": {
                "enum": [
                  "ZoneMissingToLoc",
                  "FixedLocation"
                ],
                "type": "string"
              },
              "PickShortTriggerAfter": {
                "enum": [
                  "AfterReservationRelease",
                  "AfterResidualRelocation",
                  "AfterCountCompletion"
                ],
                "type": "string"
              }
            },
            "properties": {
              "actions": {
                "items": {
                  "$ref": "#/definitions/PickShortActionDraft"
                },
                "type": "array"
              },
              "allow_partial": {
                "default": true,
                "type": "boolean"
              },
              "allow_zero": {
                "default": true,
                "type": "boolean"
              },
              "code": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "actions",
              "code",
              "description"
            ],
            "title": "CreatePickShortReasonDraft",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortActionScope": {
              "enum": [
                "CurrentPick",
                "SameSourceStock",
                "CurrentSkuAtLocation",
                "EntireLocation"
              ],
              "type": "string"
            },
            "PickShortActionType": {
              "enum": [
                "ReleaseCurrentRemainder",
                "BlockSourceLocation",
                "ReleaseRelatedReservations",
                "RelocateResidualToMissing",
                "ReallocateReleasedDemand",
                "CreateInventoryCount",
                "HoldInventory",
                "HoldContainer",
                "RequestSupervisorReview"
              ],
              "type": "string"
            },
            "PickShortOrderScope": {
              "enum": [
                "CurrentOrder",
                "OrdersWithReleasedReservations",
                "CurrentAndAffectedOrders"
              ],
              "type": "string"
            },
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonAction": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PickShortActionType"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "enabled": {
                  "type": "boolean"
                },
                "fixed_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortOrderScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required": {
                  "type": "boolean"
                },
                "scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortActionScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supervisor_review": {
                  "type": "boolean"
                },
                "target_mode": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTargetMode"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trigger_after": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTriggerAfter"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "action",
                "add_when",
                "add_who",
                "enabled",
                "mod_when",
                "mod_who",
                "reason_revision_id",
                "required",
                "supervisor_review"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickShortTargetMode": {
              "enum": [
                "ZoneMissingToLoc",
                "FixedLocation"
              ],
              "type": "string"
            },
            "PickShortTriggerAfter": {
              "enum": [
                "AfterReservationRelease",
                "AfterResidualRelocation",
                "AfterCountCompletion"
              ],
              "type": "string"
            }
          },
          "properties": {
            "actions": {
              "items": {
                "$ref": "#/definitions/PickShortReasonAction"
              },
              "type": "array"
            },
            "reason": {
              "$ref": "#/definitions/PickShortReason"
            }
          },
          "required": [
            "actions",
            "reason"
          ],
          "title": "PickShortReasonView",
          "type": "object"
        }
      },
      "summary": "Create the next editable revision of a Pick-short reason.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6c78352ca27739bc0ef430def6cd8c0270d4fe8b97b2566dc910a774bad9d74f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:bd627cec32880c86499b5a019f96eb0e75447f267efb6f8c39567fab10c3173e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_short_reason_update_draft",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PickShortActionDraft": {
                "properties": {
                  "action": {
                    "$ref": "#/definitions/PickShortActionType"
                  },
                  "enabled": {
                    "default": true,
                    "type": "boolean"
                  },
                  "fixed_location": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "order_scope": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortOrderScope"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "required": {
                    "default": false,
                    "type": "boolean"
                  },
                  "scope": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortActionScope"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "supervisor_review": {
                    "default": false,
                    "type": "boolean"
                  },
                  "target_mode": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortTargetMode"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trigger_after": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/PickShortTriggerAfter"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "action"
                ],
                "type": "object"
              },
              "PickShortActionScope": {
                "enum": [
                  "CurrentPick",
                  "SameSourceStock",
                  "CurrentSkuAtLocation",
                  "EntireLocation"
                ],
                "type": "string"
              },
              "PickShortActionType": {
                "enum": [
                  "ReleaseCurrentRemainder",
                  "BlockSourceLocation",
                  "ReleaseRelatedReservations",
                  "RelocateResidualToMissing",
                  "ReallocateReleasedDemand",
                  "CreateInventoryCount",
                  "HoldInventory",
                  "HoldContainer",
                  "RequestSupervisorReview"
                ],
                "type": "string"
              },
              "PickShortOrderScope": {
                "enum": [
                  "CurrentOrder",
                  "OrdersWithReleasedReservations",
                  "CurrentAndAffectedOrders"
                ],
                "type": "string"
              },
              "PickShortTargetMode": {
                "enum": [
                  "ZoneMissingToLoc",
                  "FixedLocation"
                ],
                "type": "string"
              },
              "PickShortTriggerAfter": {
                "enum": [
                  "AfterReservationRelease",
                  "AfterResidualRelocation",
                  "AfterCountCompletion"
                ],
                "type": "string"
              }
            },
            "properties": {
              "actions": {
                "items": {
                  "$ref": "#/definitions/PickShortActionDraft"
                },
                "type": "array"
              },
              "allow_partial": {
                "type": "boolean"
              },
              "allow_zero": {
                "type": "boolean"
              },
              "description": {
                "type": "string"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "reason_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "actions",
              "allow_partial",
              "allow_zero",
              "description",
              "expected_version",
              "reason_id"
            ],
            "title": "UpdatePickShortReasonDraft",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortActionScope": {
              "enum": [
                "CurrentPick",
                "SameSourceStock",
                "CurrentSkuAtLocation",
                "EntireLocation"
              ],
              "type": "string"
            },
            "PickShortActionType": {
              "enum": [
                "ReleaseCurrentRemainder",
                "BlockSourceLocation",
                "ReleaseRelatedReservations",
                "RelocateResidualToMissing",
                "ReallocateReleasedDemand",
                "CreateInventoryCount",
                "HoldInventory",
                "HoldContainer",
                "RequestSupervisorReview"
              ],
              "type": "string"
            },
            "PickShortOrderScope": {
              "enum": [
                "CurrentOrder",
                "OrdersWithReleasedReservations",
                "CurrentAndAffectedOrders"
              ],
              "type": "string"
            },
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonAction": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PickShortActionType"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "enabled": {
                  "type": "boolean"
                },
                "fixed_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortOrderScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required": {
                  "type": "boolean"
                },
                "scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortActionScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supervisor_review": {
                  "type": "boolean"
                },
                "target_mode": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTargetMode"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trigger_after": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTriggerAfter"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "action",
                "add_when",
                "add_who",
                "enabled",
                "mod_when",
                "mod_who",
                "reason_revision_id",
                "required",
                "supervisor_review"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickShortTargetMode": {
              "enum": [
                "ZoneMissingToLoc",
                "FixedLocation"
              ],
              "type": "string"
            },
            "PickShortTriggerAfter": {
              "enum": [
                "AfterReservationRelease",
                "AfterResidualRelocation",
                "AfterCountCompletion"
              ],
              "type": "string"
            }
          },
          "properties": {
            "actions": {
              "items": {
                "$ref": "#/definitions/PickShortReasonAction"
              },
              "type": "array"
            },
            "reason": {
              "$ref": "#/definitions/PickShortReason"
            }
          },
          "required": [
            "actions",
            "reason"
          ],
          "title": "PickShortReasonView",
          "type": "object"
        }
      },
      "summary": "Replace one Pick-short draft and its typed action set.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:298ad7d5042faf036d1ccce0d01addb6d54bdf9f17331978b23b3d03daab7c25",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:bd627cec32880c86499b5a019f96eb0e75447f267efb6f8c39567fab10c3173e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_short_reason",
          "id_field": "reason_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_short_reason_publish",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "reason_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "reason_id"
            ],
            "title": "PublishPickShortReason",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortActionScope": {
              "enum": [
                "CurrentPick",
                "SameSourceStock",
                "CurrentSkuAtLocation",
                "EntireLocation"
              ],
              "type": "string"
            },
            "PickShortActionType": {
              "enum": [
                "ReleaseCurrentRemainder",
                "BlockSourceLocation",
                "ReleaseRelatedReservations",
                "RelocateResidualToMissing",
                "ReallocateReleasedDemand",
                "CreateInventoryCount",
                "HoldInventory",
                "HoldContainer",
                "RequestSupervisorReview"
              ],
              "type": "string"
            },
            "PickShortOrderScope": {
              "enum": [
                "CurrentOrder",
                "OrdersWithReleasedReservations",
                "CurrentAndAffectedOrders"
              ],
              "type": "string"
            },
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonAction": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PickShortActionType"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "enabled": {
                  "type": "boolean"
                },
                "fixed_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortOrderScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required": {
                  "type": "boolean"
                },
                "scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortActionScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supervisor_review": {
                  "type": "boolean"
                },
                "target_mode": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTargetMode"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trigger_after": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTriggerAfter"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "action",
                "add_when",
                "add_who",
                "enabled",
                "mod_when",
                "mod_who",
                "reason_revision_id",
                "required",
                "supervisor_review"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickShortTargetMode": {
              "enum": [
                "ZoneMissingToLoc",
                "FixedLocation"
              ],
              "type": "string"
            },
            "PickShortTriggerAfter": {
              "enum": [
                "AfterReservationRelease",
                "AfterResidualRelocation",
                "AfterCountCompletion"
              ],
              "type": "string"
            }
          },
          "properties": {
            "actions": {
              "items": {
                "$ref": "#/definitions/PickShortReasonAction"
              },
              "type": "array"
            },
            "reason": {
              "$ref": "#/definitions/PickShortReason"
            }
          },
          "required": [
            "actions",
            "reason"
          ],
          "title": "PickShortReasonView",
          "type": "object"
        }
      },
      "summary": "Validate and publish an immutable Pick-short reason revision.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8c152ac4c2f3382f5562f2d9b530c9068544f8c3597adfffcfca8daa45e8d644",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:bd627cec32880c86499b5a019f96eb0e75447f267efb6f8c39567fab10c3173e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_short_reason",
          "id_field": "reason_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_short_reason_retire",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "reason_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "reason_id"
            ],
            "title": "RetirePickShortReason",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortActionScope": {
              "enum": [
                "CurrentPick",
                "SameSourceStock",
                "CurrentSkuAtLocation",
                "EntireLocation"
              ],
              "type": "string"
            },
            "PickShortActionType": {
              "enum": [
                "ReleaseCurrentRemainder",
                "BlockSourceLocation",
                "ReleaseRelatedReservations",
                "RelocateResidualToMissing",
                "ReallocateReleasedDemand",
                "CreateInventoryCount",
                "HoldInventory",
                "HoldContainer",
                "RequestSupervisorReview"
              ],
              "type": "string"
            },
            "PickShortOrderScope": {
              "enum": [
                "CurrentOrder",
                "OrdersWithReleasedReservations",
                "CurrentAndAffectedOrders"
              ],
              "type": "string"
            },
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonAction": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PickShortActionType"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "enabled": {
                  "type": "boolean"
                },
                "fixed_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortOrderScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required": {
                  "type": "boolean"
                },
                "scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortActionScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supervisor_review": {
                  "type": "boolean"
                },
                "target_mode": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTargetMode"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trigger_after": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTriggerAfter"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "action",
                "add_when",
                "add_who",
                "enabled",
                "mod_when",
                "mod_who",
                "reason_revision_id",
                "required",
                "supervisor_review"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickShortTargetMode": {
              "enum": [
                "ZoneMissingToLoc",
                "FixedLocation"
              ],
              "type": "string"
            },
            "PickShortTriggerAfter": {
              "enum": [
                "AfterReservationRelease",
                "AfterResidualRelocation",
                "AfterCountCompletion"
              ],
              "type": "string"
            }
          },
          "properties": {
            "actions": {
              "items": {
                "$ref": "#/definitions/PickShortReasonAction"
              },
              "type": "array"
            },
            "reason": {
              "$ref": "#/definitions/PickShortReason"
            }
          },
          "required": [
            "actions",
            "reason"
          ],
          "title": "PickShortReasonView",
          "type": "object"
        }
      },
      "summary": "Retire a published Pick-short reason revision.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:104edf8be2c06b1961301bea27f0f7c7b79117ba5a8273acbf4db3a5df64dbe9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:bd627cec32880c86499b5a019f96eb0e75447f267efb6f8c39567fab10c3173e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "pick_short_reason",
          "id_field": "reason_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "pick_short_reason_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortActionScope": {
              "enum": [
                "CurrentPick",
                "SameSourceStock",
                "CurrentSkuAtLocation",
                "EntireLocation"
              ],
              "type": "string"
            },
            "PickShortActionType": {
              "enum": [
                "ReleaseCurrentRemainder",
                "BlockSourceLocation",
                "ReleaseRelatedReservations",
                "RelocateResidualToMissing",
                "ReallocateReleasedDemand",
                "CreateInventoryCount",
                "HoldInventory",
                "HoldContainer",
                "RequestSupervisorReview"
              ],
              "type": "string"
            },
            "PickShortOrderScope": {
              "enum": [
                "CurrentOrder",
                "OrdersWithReleasedReservations",
                "CurrentAndAffectedOrders"
              ],
              "type": "string"
            },
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonAction": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PickShortActionType"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "enabled": {
                  "type": "boolean"
                },
                "fixed_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortOrderScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required": {
                  "type": "boolean"
                },
                "scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortActionScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supervisor_review": {
                  "type": "boolean"
                },
                "target_mode": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTargetMode"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trigger_after": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTriggerAfter"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "action",
                "add_when",
                "add_who",
                "enabled",
                "mod_when",
                "mod_who",
                "reason_revision_id",
                "required",
                "supervisor_review"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickShortTargetMode": {
              "enum": [
                "ZoneMissingToLoc",
                "FixedLocation"
              ],
              "type": "string"
            },
            "PickShortTriggerAfter": {
              "enum": [
                "AfterReservationRelease",
                "AfterResidualRelocation",
                "AfterCountCompletion"
              ],
              "type": "string"
            }
          },
          "properties": {
            "actions": {
              "items": {
                "$ref": "#/definitions/PickShortReasonAction"
              },
              "type": "array"
            },
            "reason": {
              "$ref": "#/definitions/PickShortReason"
            }
          },
          "required": [
            "actions",
            "reason"
          ],
          "title": "PickShortReasonView",
          "type": "object"
        }
      },
      "summary": "Get one Pick-short reason revision with actions.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bd627cec32880c86499b5a019f96eb0e75447f267efb6f8c39567fab10c3173e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "pick_short_reason_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "title": "PickShortReasonListInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortActionScope": {
              "enum": [
                "CurrentPick",
                "SameSourceStock",
                "CurrentSkuAtLocation",
                "EntireLocation"
              ],
              "type": "string"
            },
            "PickShortActionType": {
              "enum": [
                "ReleaseCurrentRemainder",
                "BlockSourceLocation",
                "ReleaseRelatedReservations",
                "RelocateResidualToMissing",
                "ReallocateReleasedDemand",
                "CreateInventoryCount",
                "HoldInventory",
                "HoldContainer",
                "RequestSupervisorReview"
              ],
              "type": "string"
            },
            "PickShortOrderScope": {
              "enum": [
                "CurrentOrder",
                "OrdersWithReleasedReservations",
                "CurrentAndAffectedOrders"
              ],
              "type": "string"
            },
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonAction": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PickShortActionType"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "enabled": {
                  "type": "boolean"
                },
                "fixed_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortOrderScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reason_revision_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "required": {
                  "type": "boolean"
                },
                "scope": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortActionScope"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supervisor_review": {
                  "type": "boolean"
                },
                "target_mode": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTargetMode"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trigger_after": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PickShortTriggerAfter"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "action",
                "add_when",
                "add_who",
                "enabled",
                "mod_when",
                "mod_who",
                "reason_revision_id",
                "required",
                "supervisor_review"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickShortReasonView": {
              "properties": {
                "actions": {
                  "items": {
                    "$ref": "#/definitions/PickShortReasonAction"
                  },
                  "type": "array"
                },
                "reason": {
                  "$ref": "#/definitions/PickShortReason"
                }
              },
              "required": [
                "actions",
                "reason"
              ],
              "type": "object"
            },
            "PickShortTargetMode": {
              "enum": [
                "ZoneMissingToLoc",
                "FixedLocation"
              ],
              "type": "string"
            },
            "PickShortTriggerAfter": {
              "enum": [
                "AfterReservationRelease",
                "AfterResidualRelocation",
                "AfterCountCompletion"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/PickShortReasonView"
          },
          "title": "Array_of_PickShortReasonView",
          "type": "array"
        }
      },
      "summary": "List all Pick-short reason revisions with actions.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1797dd06f76b4c75d8074b6d9fc45a2a00053f219df6a235148fb951477b48cd",
      "x-quark-response-schema-hash": "sha256:f76ccf97266539ce9a7a72f93280ba952b72b366aae94b79d0394024e0c5e820",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pick_short_reason_revision",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_partial": {
              "type": "boolean"
            },
            "allow_zero": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "revision_no": {
              "format": "int32",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/PickShortReasonStatus"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_partial",
            "allow_zero",
            "code",
            "description",
            "id",
            "mod_when",
            "mod_who",
            "revision_no",
            "status",
            "version"
          ],
          "title": "PickShortReason",
          "type": "object"
        }
      },
      "summary": "Get a pick_short_reason_revision by ID — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:9dc988a5a4e621fa6ebba84da77c60d65338e5be1f92ed9e1602fef084e48a92",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_pick_short_reason_revision",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickShortReason": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_partial": {
                  "type": "boolean"
                },
                "allow_zero": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PickShortReasonStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_partial",
                "allow_zero",
                "code",
                "description",
                "id",
                "mod_when",
                "mod_who",
                "revision_no",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PickShortReasonStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/PickShortReason"
          },
          "title": "Array_of_PickShortReason",
          "type": "array"
        }
      },
      "summary": "List pick_short_reason_revision — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9c5c735361a4c89532b427ee31b1f129a520004d9aff617f6d7341069fb5bffe",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_pick_short_reason_revision",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count pick_short_reason_revision — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pick_short_reason_action",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "row_key",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Get one Pick-short action by its metadata UI compound key.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7d0ae1dcdc2b95f2b1fa1bc614bf76543750a88dc38385903f6982faa2d12c13",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_pick_short_reason_action",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "items": true,
          "title": "Array_of_AnyValue",
          "type": "array"
        }
      },
      "summary": "List Pick-short actions as a metadata UI read projection.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:f1cf3efc62c58cf3d254501d46fbbe8ea8a53e5d269305d1841a39b396cc0834",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_pick_short_reason_action",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count pick_short_reason_action — CRUD.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "pick_short_reason",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "picking_policy_create_draft",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LocType": {
                "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
                "oneOf": [
                  {
                    "enum": [
                      "None",
                      "Other",
                      "Case",
                      "Pick",
                      "Pnd",
                      "Door",
                      "Pickto",
                      "Sort",
                      "SpeedPick",
                      "QC",
                      "Damage",
                      "Rtv",
                      "Destroy",
                      "Returns",
                      "Stage",
                      "Lost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                    "enum": [
                      "InTransit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                    "enum": [
                      "Pack"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                    "enum": [
                      "Consolidation"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickToZeroMode": {
                "oneOf": [
                  {
                    "description": "A pick that empties its location does nothing more.",
                    "enum": [
                      "Off"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                    "enum": [
                      "Count"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                    "enum": [
                      "Confirm"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingCompletion": {
                "enum": [
                  "Complete",
                  "ConfirmAtLocation"
                ],
                "type": "string"
              },
              "PickingDepositMode": {
                "enum": [
                  "CollectToRoot",
                  "DirectToTarget"
                ],
                "type": "string"
              },
              "PickingGroupingUnit": {
                "enum": [
                  "Order",
                  "PlannedTarget"
                ],
                "type": "string"
              },
              "PickingItemConfirmation": {
                "oneOf": [
                  {
                    "description": "The card shows the item; nothing is asked of the operator.",
                    "enum": [
                      "DisplayOnly"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator confirms the item by scanning it.",
                    "enum": [
                      "Scan"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingLooseLotConfirmation": {
                "oneOf": [
                  {
                    "enum": [
                      "NoConfirmation",
                      "ScanInternalLot",
                      "ConfirmLotAttributes"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The server picks the proof from the physical structure of the source.",
                    "enum": [
                      "Automatic"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "One lot per location is the proof.",
                    "enum": [
                      "ExclusiveLocation"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingLotAttributeCapture": {
                "enum": [
                  "ScanOnly",
                  "ScanOrManual"
                ],
                "type": "string"
              },
              "PickingPalletDropSuggestion": {
                "oneOf": [
                  {
                    "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                    "enum": [
                      "OwnerThenTask"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingPolicySections": {
                "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
                "properties": {
                  "carrier_required": {
                    "type": "boolean"
                  },
                  "completion": {
                    "$ref": "#/definitions/PickingCompletion"
                  },
                  "deposit_mode": {
                    "$ref": "#/definitions/PickingDepositMode"
                  },
                  "grouping_unit": {
                    "$ref": "#/definitions/PickingGroupingUnit"
                  },
                  "item_confirmation": {
                    "$ref": "#/definitions/PickingItemConfirmation"
                  },
                  "loose_lot_confirmation": {
                    "$ref": "#/definitions/PickingLooseLotConfirmation"
                  },
                  "lot_attribute_capture": {
                    "$ref": "#/definitions/PickingLotAttributeCapture"
                  },
                  "max_targets": {
                    "format": "int16",
                    "type": "integer"
                  },
                  "pallet_drop_suggestion": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/PickingPalletDropSuggestion"
                      }
                    ],
                    "description": "Where the location suggested for a closed pallet comes from."
                  },
                  "pallet_drop_types": {
                    "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                    "items": {
                      "$ref": "#/definitions/LocType"
                    },
                    "type": "array"
                  },
                  "pick_to_zero": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/PickToZeroMode"
                      }
                    ],
                    "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
                  },
                  "qty_confirmation": {
                    "$ref": "#/definitions/PickingQtyConfirmation"
                  },
                  "reserved_lpn_confirmation": {
                    "$ref": "#/definitions/PickingReservedLpnConfirmation"
                  },
                  "source_location_confirmation": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/PickingSourceLocationConfirmation"
                      }
                    ],
                    "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
                  },
                  "target_binding": {
                    "$ref": "#/definitions/PickingTargetBinding"
                  },
                  "target_confirmation": {
                    "$ref": "#/definitions/PickingTargetConfirmation"
                  }
                },
                "required": [
                  "carrier_required",
                  "completion",
                  "deposit_mode",
                  "grouping_unit",
                  "item_confirmation",
                  "loose_lot_confirmation",
                  "lot_attribute_capture",
                  "max_targets",
                  "pallet_drop_suggestion",
                  "pallet_drop_types",
                  "pick_to_zero",
                  "qty_confirmation",
                  "reserved_lpn_confirmation",
                  "source_location_confirmation",
                  "target_binding",
                  "target_confirmation"
                ],
                "type": "object"
              },
              "PickingQtyConfirmation": {
                "enum": [
                  "PerPick",
                  "Aggregated"
                ],
                "type": "string"
              },
              "PickingReservedLpnConfirmation": {
                "oneOf": [
                  {
                    "enum": [
                      "DoNotConfirm"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator scans the reserved LPN whenever the source has one.",
                    "enum": [
                      "ScanWhenPresent"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingSourceLocationConfirmation": {
                "oneOf": [
                  {
                    "description": "The card shows the source location; nothing is asked of the operator.",
                    "enum": [
                      "DisplayOnly"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator confirms the location by scanning it.",
                    "enum": [
                      "Scan"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingTargetBinding": {
                "enum": [
                  "Unbound",
                  "BeforeRoute"
                ],
                "type": "string"
              },
              "PickingTargetConfirmation": {
                "enum": [
                  "ScanContainer",
                  "PositionNumber"
                ],
                "type": "string"
              }
            },
            "properties": {
              "code": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "sections": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/PickingPolicySections"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "`None`: a copy of the code's latest revision, `DISCRETE` for a new code."
              }
            },
            "required": [
              "code",
              "description"
            ],
            "title": "CreatePickingPolicyDraft",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicySections": {
              "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
              "properties": {
                "carrier_required": {
                  "type": "boolean"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the location suggested for a closed pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                  "items": {
                    "$ref": "#/definitions/LocType"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "source_location_confirmation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingSourceLocationConfirmation"
                    }
                  ],
                  "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                }
              },
              "required": [
                "carrier_required",
                "completion",
                "deposit_mode",
                "grouping_unit",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "source_location_confirmation",
                "target_binding",
                "target_confirmation"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "description": "On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "carrier_required": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "completion": {
              "$ref": "#/definitions/PickingCompletion"
            },
            "deposit_mode": {
              "$ref": "#/definitions/PickingDepositMode"
            },
            "description": {
              "type": "string"
            },
            "grouping_unit": {
              "$ref": "#/definitions/PickingGroupingUnit"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_confirmation": {
              "$ref": "#/definitions/PickingItemConfirmation"
            },
            "loose_lot_confirmation": {
              "$ref": "#/definitions/PickingLooseLotConfirmation"
            },
            "lot_attribute_capture": {
              "$ref": "#/definitions/PickingLotAttributeCapture"
            },
            "max_targets": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pallet_drop_suggestion": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickingPalletDropSuggestion"
                }
              ],
              "description": "Where the suggested location for a closed pick pallet comes from."
            },
            "pallet_drop_types": {
              "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pick_to_zero": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickToZeroMode"
                }
              ],
              "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "qty_confirmation": {
              "$ref": "#/definitions/PickingQtyConfirmation"
            },
            "reserved_lpn_confirmation": {
              "$ref": "#/definitions/PickingReservedLpnConfirmation"
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "revision_no": {
              "format": "int32",
              "type": "integer"
            },
            "sections": {
              "$ref": "#/definitions/PickingPolicySections"
            },
            "source_location_confirmation": {
              "$ref": "#/definitions/PickingSourceLocationConfirmation"
            },
            "status": {
              "$ref": "#/definitions/PickingPolicyStatus"
            },
            "target_binding": {
              "$ref": "#/definitions/PickingTargetBinding"
            },
            "target_confirmation": {
              "$ref": "#/definitions/PickingTargetConfirmation"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "carrier_required",
            "code",
            "completion",
            "deposit_mode",
            "description",
            "grouping_unit",
            "id",
            "item_confirmation",
            "loose_lot_confirmation",
            "lot_attribute_capture",
            "max_targets",
            "mod_when",
            "mod_who",
            "pallet_drop_suggestion",
            "pallet_drop_types",
            "pick_to_zero",
            "qty_confirmation",
            "reserved_lpn_confirmation",
            "revision_no",
            "sections",
            "source_location_confirmation",
            "status",
            "target_binding",
            "target_confirmation",
            "version"
          ],
          "title": "PickingPolicyView",
          "type": "object"
        }
      },
      "summary": "Create the next editable revision of a picking policy.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3a81cafdf003136ead1dd780343861fd1e9859d6113334040d00411ad28a3c74",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:97065b0c88d33901c3dfec1054b4f29a8939f10add275ebb7869f39ece420f16",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "picking_policy_update_draft",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "LocType": {
                "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
                "oneOf": [
                  {
                    "enum": [
                      "None",
                      "Other",
                      "Case",
                      "Pick",
                      "Pnd",
                      "Door",
                      "Pickto",
                      "Sort",
                      "SpeedPick",
                      "QC",
                      "Damage",
                      "Rtv",
                      "Destroy",
                      "Returns",
                      "Stage",
                      "Lost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                    "enum": [
                      "InTransit"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                    "enum": [
                      "Pack"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                    "enum": [
                      "Consolidation"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickToZeroMode": {
                "oneOf": [
                  {
                    "description": "A pick that empties its location does nothing more.",
                    "enum": [
                      "Off"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                    "enum": [
                      "Count"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                    "enum": [
                      "Confirm"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingCompletion": {
                "enum": [
                  "Complete",
                  "ConfirmAtLocation"
                ],
                "type": "string"
              },
              "PickingDepositMode": {
                "enum": [
                  "CollectToRoot",
                  "DirectToTarget"
                ],
                "type": "string"
              },
              "PickingGroupingUnit": {
                "enum": [
                  "Order",
                  "PlannedTarget"
                ],
                "type": "string"
              },
              "PickingItemConfirmation": {
                "oneOf": [
                  {
                    "description": "The card shows the item; nothing is asked of the operator.",
                    "enum": [
                      "DisplayOnly"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator confirms the item by scanning it.",
                    "enum": [
                      "Scan"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingLooseLotConfirmation": {
                "oneOf": [
                  {
                    "enum": [
                      "NoConfirmation",
                      "ScanInternalLot",
                      "ConfirmLotAttributes"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The server picks the proof from the physical structure of the source.",
                    "enum": [
                      "Automatic"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "One lot per location is the proof.",
                    "enum": [
                      "ExclusiveLocation"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingLotAttributeCapture": {
                "enum": [
                  "ScanOnly",
                  "ScanOrManual"
                ],
                "type": "string"
              },
              "PickingPalletDropSuggestion": {
                "oneOf": [
                  {
                    "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                    "enum": [
                      "OwnerThenTask"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingQtyConfirmation": {
                "enum": [
                  "PerPick",
                  "Aggregated"
                ],
                "type": "string"
              },
              "PickingReservedLpnConfirmation": {
                "oneOf": [
                  {
                    "enum": [
                      "DoNotConfirm"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator scans the reserved LPN whenever the source has one.",
                    "enum": [
                      "ScanWhenPresent"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingSourceLocationConfirmation": {
                "oneOf": [
                  {
                    "description": "The card shows the source location; nothing is asked of the operator.",
                    "enum": [
                      "DisplayOnly"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The operator confirms the location by scanning it.",
                    "enum": [
                      "Scan"
                    ],
                    "type": "string"
                  }
                ]
              },
              "PickingTargetBinding": {
                "enum": [
                  "Unbound",
                  "BeforeRoute"
                ],
                "type": "string"
              },
              "PickingTargetConfirmation": {
                "enum": [
                  "ScanContainer",
                  "PositionNumber"
                ],
                "type": "string"
              }
            },
            "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
            "properties": {
              "carrier_required": {
                "type": "boolean"
              },
              "completion": {
                "$ref": "#/definitions/PickingCompletion"
              },
              "deposit_mode": {
                "$ref": "#/definitions/PickingDepositMode"
              },
              "description": {
                "type": "string"
              },
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "grouping_unit": {
                "$ref": "#/definitions/PickingGroupingUnit"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "item_confirmation": {
                "$ref": "#/definitions/PickingItemConfirmation"
              },
              "loose_lot_confirmation": {
                "$ref": "#/definitions/PickingLooseLotConfirmation"
              },
              "lot_attribute_capture": {
                "$ref": "#/definitions/PickingLotAttributeCapture"
              },
              "max_targets": {
                "format": "int16",
                "type": "integer"
              },
              "pallet_drop_suggestion": {
                "allOf": [
                  {
                    "$ref": "#/definitions/PickingPalletDropSuggestion"
                  }
                ],
                "description": "Where the location suggested for a closed pallet comes from."
              },
              "pallet_drop_types": {
                "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                "items": {
                  "$ref": "#/definitions/LocType"
                },
                "type": "array"
              },
              "pick_to_zero": {
                "allOf": [
                  {
                    "$ref": "#/definitions/PickToZeroMode"
                  }
                ],
                "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty_confirmation": {
                "$ref": "#/definitions/PickingQtyConfirmation"
              },
              "reserved_lpn_confirmation": {
                "$ref": "#/definitions/PickingReservedLpnConfirmation"
              },
              "source_location_confirmation": {
                "allOf": [
                  {
                    "$ref": "#/definitions/PickingSourceLocationConfirmation"
                  }
                ],
                "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
              },
              "target_binding": {
                "$ref": "#/definitions/PickingTargetBinding"
              },
              "target_confirmation": {
                "$ref": "#/definitions/PickingTargetConfirmation"
              }
            },
            "required": [
              "carrier_required",
              "completion",
              "deposit_mode",
              "description",
              "expected_version",
              "grouping_unit",
              "item_confirmation",
              "loose_lot_confirmation",
              "lot_attribute_capture",
              "max_targets",
              "pallet_drop_suggestion",
              "pallet_drop_types",
              "pick_to_zero",
              "policy_id",
              "qty_confirmation",
              "reserved_lpn_confirmation",
              "source_location_confirmation",
              "target_binding",
              "target_confirmation"
            ],
            "title": "UpdatePickingPolicyDraft",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicySections": {
              "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
              "properties": {
                "carrier_required": {
                  "type": "boolean"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the location suggested for a closed pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                  "items": {
                    "$ref": "#/definitions/LocType"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "source_location_confirmation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingSourceLocationConfirmation"
                    }
                  ],
                  "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                }
              },
              "required": [
                "carrier_required",
                "completion",
                "deposit_mode",
                "grouping_unit",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "source_location_confirmation",
                "target_binding",
                "target_confirmation"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "description": "On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "carrier_required": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "completion": {
              "$ref": "#/definitions/PickingCompletion"
            },
            "deposit_mode": {
              "$ref": "#/definitions/PickingDepositMode"
            },
            "description": {
              "type": "string"
            },
            "grouping_unit": {
              "$ref": "#/definitions/PickingGroupingUnit"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_confirmation": {
              "$ref": "#/definitions/PickingItemConfirmation"
            },
            "loose_lot_confirmation": {
              "$ref": "#/definitions/PickingLooseLotConfirmation"
            },
            "lot_attribute_capture": {
              "$ref": "#/definitions/PickingLotAttributeCapture"
            },
            "max_targets": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pallet_drop_suggestion": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickingPalletDropSuggestion"
                }
              ],
              "description": "Where the suggested location for a closed pick pallet comes from."
            },
            "pallet_drop_types": {
              "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pick_to_zero": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickToZeroMode"
                }
              ],
              "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "qty_confirmation": {
              "$ref": "#/definitions/PickingQtyConfirmation"
            },
            "reserved_lpn_confirmation": {
              "$ref": "#/definitions/PickingReservedLpnConfirmation"
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "revision_no": {
              "format": "int32",
              "type": "integer"
            },
            "sections": {
              "$ref": "#/definitions/PickingPolicySections"
            },
            "source_location_confirmation": {
              "$ref": "#/definitions/PickingSourceLocationConfirmation"
            },
            "status": {
              "$ref": "#/definitions/PickingPolicyStatus"
            },
            "target_binding": {
              "$ref": "#/definitions/PickingTargetBinding"
            },
            "target_confirmation": {
              "$ref": "#/definitions/PickingTargetConfirmation"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "carrier_required",
            "code",
            "completion",
            "deposit_mode",
            "description",
            "grouping_unit",
            "id",
            "item_confirmation",
            "loose_lot_confirmation",
            "lot_attribute_capture",
            "max_targets",
            "mod_when",
            "mod_who",
            "pallet_drop_suggestion",
            "pallet_drop_types",
            "pick_to_zero",
            "qty_confirmation",
            "reserved_lpn_confirmation",
            "revision_no",
            "sections",
            "source_location_confirmation",
            "status",
            "target_binding",
            "target_confirmation",
            "version"
          ],
          "title": "PickingPolicyView",
          "type": "object"
        }
      },
      "summary": "Replace the description and sections of one picking-policy draft.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b5eab69c19c7b9875857b519e2fd79c7ddf98ada94ad92453bc3f11fdab21628",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:97065b0c88d33901c3dfec1054b4f29a8939f10add275ebb7869f39ece420f16",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "picking_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "picking_policy_publish",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "policy_id"
            ],
            "title": "PublishPickingPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicySections": {
              "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
              "properties": {
                "carrier_required": {
                  "type": "boolean"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the location suggested for a closed pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                  "items": {
                    "$ref": "#/definitions/LocType"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "source_location_confirmation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingSourceLocationConfirmation"
                    }
                  ],
                  "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                }
              },
              "required": [
                "carrier_required",
                "completion",
                "deposit_mode",
                "grouping_unit",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "source_location_confirmation",
                "target_binding",
                "target_confirmation"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "description": "On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "carrier_required": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "completion": {
              "$ref": "#/definitions/PickingCompletion"
            },
            "deposit_mode": {
              "$ref": "#/definitions/PickingDepositMode"
            },
            "description": {
              "type": "string"
            },
            "grouping_unit": {
              "$ref": "#/definitions/PickingGroupingUnit"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_confirmation": {
              "$ref": "#/definitions/PickingItemConfirmation"
            },
            "loose_lot_confirmation": {
              "$ref": "#/definitions/PickingLooseLotConfirmation"
            },
            "lot_attribute_capture": {
              "$ref": "#/definitions/PickingLotAttributeCapture"
            },
            "max_targets": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pallet_drop_suggestion": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickingPalletDropSuggestion"
                }
              ],
              "description": "Where the suggested location for a closed pick pallet comes from."
            },
            "pallet_drop_types": {
              "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pick_to_zero": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickToZeroMode"
                }
              ],
              "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "qty_confirmation": {
              "$ref": "#/definitions/PickingQtyConfirmation"
            },
            "reserved_lpn_confirmation": {
              "$ref": "#/definitions/PickingReservedLpnConfirmation"
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "revision_no": {
              "format": "int32",
              "type": "integer"
            },
            "sections": {
              "$ref": "#/definitions/PickingPolicySections"
            },
            "source_location_confirmation": {
              "$ref": "#/definitions/PickingSourceLocationConfirmation"
            },
            "status": {
              "$ref": "#/definitions/PickingPolicyStatus"
            },
            "target_binding": {
              "$ref": "#/definitions/PickingTargetBinding"
            },
            "target_confirmation": {
              "$ref": "#/definitions/PickingTargetConfirmation"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "carrier_required",
            "code",
            "completion",
            "deposit_mode",
            "description",
            "grouping_unit",
            "id",
            "item_confirmation",
            "loose_lot_confirmation",
            "lot_attribute_capture",
            "max_targets",
            "mod_when",
            "mod_who",
            "pallet_drop_suggestion",
            "pallet_drop_types",
            "pick_to_zero",
            "qty_confirmation",
            "reserved_lpn_confirmation",
            "revision_no",
            "sections",
            "source_location_confirmation",
            "status",
            "target_binding",
            "target_confirmation",
            "version"
          ],
          "title": "PickingPolicyView",
          "type": "object"
        }
      },
      "summary": "Validate and publish a picking-policy revision, retiring the previous one.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:18a7d6c4a18de95a73c9252cac1630cba6064d0423760fece56ac9b4bd1dcf54",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:97065b0c88d33901c3dfec1054b4f29a8939f10add275ebb7869f39ece420f16",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "picking_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "picking_policy_retire",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "policy_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "policy_id"
            ],
            "title": "RetirePickingPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicySections": {
              "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
              "properties": {
                "carrier_required": {
                  "type": "boolean"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the location suggested for a closed pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                  "items": {
                    "$ref": "#/definitions/LocType"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "source_location_confirmation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingSourceLocationConfirmation"
                    }
                  ],
                  "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                }
              },
              "required": [
                "carrier_required",
                "completion",
                "deposit_mode",
                "grouping_unit",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "source_location_confirmation",
                "target_binding",
                "target_confirmation"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "description": "On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "carrier_required": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "completion": {
              "$ref": "#/definitions/PickingCompletion"
            },
            "deposit_mode": {
              "$ref": "#/definitions/PickingDepositMode"
            },
            "description": {
              "type": "string"
            },
            "grouping_unit": {
              "$ref": "#/definitions/PickingGroupingUnit"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_confirmation": {
              "$ref": "#/definitions/PickingItemConfirmation"
            },
            "loose_lot_confirmation": {
              "$ref": "#/definitions/PickingLooseLotConfirmation"
            },
            "lot_attribute_capture": {
              "$ref": "#/definitions/PickingLotAttributeCapture"
            },
            "max_targets": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pallet_drop_suggestion": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickingPalletDropSuggestion"
                }
              ],
              "description": "Where the suggested location for a closed pick pallet comes from."
            },
            "pallet_drop_types": {
              "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pick_to_zero": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickToZeroMode"
                }
              ],
              "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "qty_confirmation": {
              "$ref": "#/definitions/PickingQtyConfirmation"
            },
            "reserved_lpn_confirmation": {
              "$ref": "#/definitions/PickingReservedLpnConfirmation"
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "revision_no": {
              "format": "int32",
              "type": "integer"
            },
            "sections": {
              "$ref": "#/definitions/PickingPolicySections"
            },
            "source_location_confirmation": {
              "$ref": "#/definitions/PickingSourceLocationConfirmation"
            },
            "status": {
              "$ref": "#/definitions/PickingPolicyStatus"
            },
            "target_binding": {
              "$ref": "#/definitions/PickingTargetBinding"
            },
            "target_confirmation": {
              "$ref": "#/definitions/PickingTargetConfirmation"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "carrier_required",
            "code",
            "completion",
            "deposit_mode",
            "description",
            "grouping_unit",
            "id",
            "item_confirmation",
            "loose_lot_confirmation",
            "lot_attribute_capture",
            "max_targets",
            "mod_when",
            "mod_who",
            "pallet_drop_suggestion",
            "pallet_drop_types",
            "pick_to_zero",
            "qty_confirmation",
            "reserved_lpn_confirmation",
            "revision_no",
            "sections",
            "source_location_confirmation",
            "status",
            "target_binding",
            "target_confirmation",
            "version"
          ],
          "title": "PickingPolicyView",
          "type": "object"
        }
      },
      "summary": "Retire a published picking-policy revision no work area depends on.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3b93fd542f2e3ca0a532a52b4a933e6a7bc82750abba85856dfbda6077588f5e",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:97065b0c88d33901c3dfec1054b4f29a8939f10add275ebb7869f39ece420f16",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "picking_policy",
          "id_field": "policy_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "work_area_assign_picking_policy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "description": "`None`: the area works by `DISCRETE`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "work_area_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "work_area_id"
            ],
            "title": "AssignPickingPolicyToWorkArea",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_required": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "description": {
                  "type": "string"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the suggested location for a closed pick pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "source_location_confirmation": {
                  "$ref": "#/definitions/PickingSourceLocationConfirmation"
                },
                "status": {
                  "$ref": "#/definitions/PickingPolicyStatus"
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "carrier_required",
                "code",
                "completion",
                "deposit_mode",
                "description",
                "grouping_unit",
                "id",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "mod_when",
                "mod_who",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "revision_no",
                "source_location_confirmation",
                "status",
                "target_binding",
                "target_confirmation",
                "version"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "description": "What an area works by: its assigned code (`None` = no assignment) and the published revision that code resolves to right now.",
          "properties": {
            "code": {
              "type": [
                "string",
                "null"
              ]
            },
            "resolved": {
              "$ref": "#/definitions/PickingPolicy"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "resolved",
            "work_area_id"
          ],
          "title": "WorkAreaPolicyView",
          "type": "object"
        }
      },
      "summary": "Point a work area at a published picking policy (none: DISCRETE).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:122d4b3e90fc92c566a3c35febd0eb97d2d7486ce0a1543cac634fb39c4921aa",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f09af30a8d916b49b6482d68cbc764c690d5dc6ab572ea90f6507e9f58bb211a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "work_area_equipment_policy_create",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "description": "A code with a published revision; `DISCRETE` is a legitimate answer (\"on foot in a cart area picks discretely\").",
                "type": "string"
              },
              "equipment_profile_id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              },
              "work_area_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "code",
              "equipment_profile_id",
              "work_area_id"
            ],
            "title": "CreateWorkAreaEquipmentPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The stored row.",
          "properties": {
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "picking_policy_code": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "equipment_profile_id",
            "id",
            "picking_policy_code",
            "work_area_id"
          ],
          "title": "WorkAreaPickingPolicy",
          "type": "object"
        }
      },
      "summary": "Name the picking policy a work area works by for one equipment profile.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a7e3aaa4ab6c419f498e7424120446b50dac83bf333a2a61b5e52f15237eec70",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e11574ff342f2c16adcb6896bd66a75d89e63aa31c2c1e93a953292cbbbd4d1f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "work_area_equipment_policy_update",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "id": {
                "description": "The row (`work_area_picking_policy.id`).",
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "code",
              "id"
            ],
            "title": "ChangeWorkAreaEquipmentPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The stored row.",
          "properties": {
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "picking_policy_code": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "equipment_profile_id",
            "id",
            "picking_policy_code",
            "work_area_id"
          ],
          "title": "WorkAreaPickingPolicy",
          "type": "object"
        }
      },
      "summary": "Point a work area's equipment-profile row at another published picking policy.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4bb6caa4abc51599e89cc8d9749dd1ebec1ab942b3e2f379e3f078d3bdacdb5a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e11574ff342f2c16adcb6896bd66a75d89e63aa31c2c1e93a953292cbbbd4d1f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "work_area_equipment_policy_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "default": "00000000-0000-0000-0000-000000000000",
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "title": "RemoveWorkAreaEquipmentPolicy",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "The stored row.",
          "properties": {
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "picking_policy_code": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "equipment_profile_id",
            "id",
            "picking_policy_code",
            "work_area_id"
          ],
          "title": "WorkAreaPickingPolicy",
          "type": "object"
        }
      },
      "summary": "Remove a work area's policy for one equipment profile (back to the area default).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e77b69fa201e446233303a1b06eaca80fc8026fd4f86872a7036d7e77aa29ea3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e11574ff342f2c16adcb6896bd66a75d89e63aa31c2c1e93a953292cbbbd4d1f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "picking_policy_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LocType": {
              "description": "LocType — dependent type, mirrors PostgreSQL `loc_type` enum. Migration 143 added 7 hold-stage zone purposes (QC/Damage/Rtv/Destroy/ Returns/Stage/Lost) used by Move primitive §3.2.1 destination authorization.",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Other",
                    "Case",
                    "Pick",
                    "Pnd",
                    "Door",
                    "Pickto",
                    "Sort",
                    "SpeedPick",
                    "QC",
                    "Damage",
                    "Rtv",
                    "Destroy",
                    "Returns",
                    "Stage",
                    "Lost"
                  ],
                  "type": "string"
                },
                {
                  "description": "The location of open discrete pick pallets (the pick-pallet wms-app migrations): goods on an operator's forks between the pick and the pallet's close. One per warehouse schema, seeded as `INTRANSIT`; outside every other door — allocation, putaway, move, adjustment, receiving, the location advisory.",
                  "enum": [
                    "InTransit"
                  ],
                  "type": "string"
                },
                {
                  "description": "A pack station (post-pick spec §6, D-47, D-49; wms-app 066/067): the location where picked units wait for Verify / Repack. Goods arrive only by the Outbound Flow Router's decision, so no putaway, manual move or allocation targets it; picked stock is delivered into it.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "A consolidation station (consolidation H1; wms-app 20261021191020/1): the location where packed boxes are put onto outbound pallets. Goods arrive only by the router's decision; never allocated from.",
                  "enum": [
                    "Consolidation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicySections": {
              "description": "Every field is required on the wire: an update that left the pallet-drop list out would otherwise reset a narrowed list without a word, and one that left a Confirmation value out would loosen what the operator proves at the source. Only an assignment snapshot taken before those settings existed reads them as their defaults ([`PickingPolicySections::deserialize_snapshot`]).",
              "properties": {
                "carrier_required": {
                  "type": "boolean"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the location suggested for a closed pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "The location types a closed discrete pick pallet may be put into (section «Завершение»): at least one, none twice, all from [`PALLET_DROP_ADMISSIBLE`], ordered as it is once saved.",
                  "items": {
                    "$ref": "#/definitions/LocType"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (section «Завершение»): nothing, count the location (count spec Appendix D, PICK_TO_ZERO) or ask the operator whether it is empty (Appendix L, ZERO_CONFIRMATION)."
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "source_location_confirmation": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingSourceLocationConfirmation"
                    }
                  ],
                  "description": "Spec §7, section «Подтверждение»: what the operator proves at the source. Not part of the grouping shape (`shape_eq` ignores them)."
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                }
              },
              "required": [
                "carrier_required",
                "completion",
                "deposit_mode",
                "grouping_unit",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "source_location_confirmation",
                "target_binding",
                "target_confirmation"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "description": "On the wire the revision's columns sit at the top level, like every `get_<entity>`, because `generic_rpc_form_load` fills the web card from the top-level keys (wms-meta-ui 081).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "carrier_required": {
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "completion": {
              "$ref": "#/definitions/PickingCompletion"
            },
            "deposit_mode": {
              "$ref": "#/definitions/PickingDepositMode"
            },
            "description": {
              "type": "string"
            },
            "grouping_unit": {
              "$ref": "#/definitions/PickingGroupingUnit"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "item_confirmation": {
              "$ref": "#/definitions/PickingItemConfirmation"
            },
            "loose_lot_confirmation": {
              "$ref": "#/definitions/PickingLooseLotConfirmation"
            },
            "lot_attribute_capture": {
              "$ref": "#/definitions/PickingLotAttributeCapture"
            },
            "max_targets": {
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pallet_drop_suggestion": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickingPalletDropSuggestion"
                }
              ],
              "description": "Where the suggested location for a closed pick pallet comes from."
            },
            "pallet_drop_types": {
              "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pick_to_zero": {
              "allOf": [
                {
                  "$ref": "#/definitions/PickToZeroMode"
                }
              ],
              "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
            },
            "published_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "qty_confirmation": {
              "$ref": "#/definitions/PickingQtyConfirmation"
            },
            "reserved_lpn_confirmation": {
              "$ref": "#/definitions/PickingReservedLpnConfirmation"
            },
            "retired_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "revision_no": {
              "format": "int32",
              "type": "integer"
            },
            "sections": {
              "$ref": "#/definitions/PickingPolicySections"
            },
            "source_location_confirmation": {
              "$ref": "#/definitions/PickingSourceLocationConfirmation"
            },
            "status": {
              "$ref": "#/definitions/PickingPolicyStatus"
            },
            "target_binding": {
              "$ref": "#/definitions/PickingTargetBinding"
            },
            "target_confirmation": {
              "$ref": "#/definitions/PickingTargetConfirmation"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "carrier_required",
            "code",
            "completion",
            "deposit_mode",
            "description",
            "grouping_unit",
            "id",
            "item_confirmation",
            "loose_lot_confirmation",
            "lot_attribute_capture",
            "max_targets",
            "mod_when",
            "mod_who",
            "pallet_drop_suggestion",
            "pallet_drop_types",
            "pick_to_zero",
            "qty_confirmation",
            "reserved_lpn_confirmation",
            "revision_no",
            "sections",
            "source_location_confirmation",
            "status",
            "target_binding",
            "target_confirmation",
            "version"
          ],
          "title": "PickingPolicyView",
          "type": "object"
        }
      },
      "summary": "Get one picking-policy revision with its sections.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:97065b0c88d33901c3dfec1054b4f29a8939f10add275ebb7869f39ece420f16",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "picking_policy_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PickToZeroMode": {
              "oneOf": [
                {
                  "description": "A pick that empties its location does nothing more.",
                  "enum": [
                    "Off"
                  ],
                  "type": "string"
                },
                {
                  "description": "The emptied location is counted (count spec Appendix D, PICK_TO_ZERO).",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator is asked whether the location is empty; an answer the stock contradicts asks for a count (count spec Appendix L).",
                  "enum": [
                    "Confirm"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingCompletion": {
              "enum": [
                "Complete",
                "ConfirmAtLocation"
              ],
              "type": "string"
            },
            "PickingDepositMode": {
              "enum": [
                "CollectToRoot",
                "DirectToTarget"
              ],
              "type": "string"
            },
            "PickingGroupingUnit": {
              "enum": [
                "Order",
                "PlannedTarget"
              ],
              "type": "string"
            },
            "PickingItemConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the item; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the item by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLooseLotConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "NoConfirmation",
                    "ScanInternalLot",
                    "ConfirmLotAttributes"
                  ],
                  "type": "string"
                },
                {
                  "description": "The server picks the proof from the physical structure of the source.",
                  "enum": [
                    "Automatic"
                  ],
                  "type": "string"
                },
                {
                  "description": "One lot per location is the proof.",
                  "enum": [
                    "ExclusiveLocation"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingLotAttributeCapture": {
              "enum": [
                "ScanOnly",
                "ScanOrManual"
              ],
              "type": "string"
            },
            "PickingPalletDropSuggestion": {
              "oneOf": [
                {
                  "description": "`owners.picking_toloc`, else the order's tasks' `to_location` when they agree (ADR-091) — the only chain today.",
                  "enum": [
                    "OwnerThenTask"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingPolicy": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "carrier_required": {
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "completion": {
                  "$ref": "#/definitions/PickingCompletion"
                },
                "deposit_mode": {
                  "$ref": "#/definitions/PickingDepositMode"
                },
                "description": {
                  "type": "string"
                },
                "grouping_unit": {
                  "$ref": "#/definitions/PickingGroupingUnit"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "item_confirmation": {
                  "$ref": "#/definitions/PickingItemConfirmation"
                },
                "loose_lot_confirmation": {
                  "$ref": "#/definitions/PickingLooseLotConfirmation"
                },
                "lot_attribute_capture": {
                  "$ref": "#/definitions/PickingLotAttributeCapture"
                },
                "max_targets": {
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_drop_suggestion": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickingPalletDropSuggestion"
                    }
                  ],
                  "description": "Where the suggested location for a closed pick pallet comes from."
                },
                "pallet_drop_types": {
                  "description": "Location types (`LocType` labels) a closed discrete pick pallet may be put into (the pick-pallet wms-app migration, `chk_picking_policy_pallet_drop_types`). `text[]` like `putaway_step_criterion.values`; the domain parses the labels.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "pick_to_zero": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PickToZeroMode"
                    }
                  ],
                  "description": "What a full pick that leaves its source location holding no stock does (wms-app 111, count spec Appendices D and L)."
                },
                "published_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty_confirmation": {
                  "$ref": "#/definitions/PickingQtyConfirmation"
                },
                "reserved_lpn_confirmation": {
                  "$ref": "#/definitions/PickingReservedLpnConfirmation"
                },
                "retired_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "revision_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "source_location_confirmation": {
                  "$ref": "#/definitions/PickingSourceLocationConfirmation"
                },
                "status": {
                  "$ref": "#/definitions/PickingPolicyStatus"
                },
                "target_binding": {
                  "$ref": "#/definitions/PickingTargetBinding"
                },
                "target_confirmation": {
                  "$ref": "#/definitions/PickingTargetConfirmation"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "carrier_required",
                "code",
                "completion",
                "deposit_mode",
                "description",
                "grouping_unit",
                "id",
                "item_confirmation",
                "loose_lot_confirmation",
                "lot_attribute_capture",
                "max_targets",
                "mod_when",
                "mod_who",
                "pallet_drop_suggestion",
                "pallet_drop_types",
                "pick_to_zero",
                "qty_confirmation",
                "reserved_lpn_confirmation",
                "revision_no",
                "source_location_confirmation",
                "status",
                "target_binding",
                "target_confirmation",
                "version"
              ],
              "type": "object"
            },
            "PickingPolicyStatus": {
              "enum": [
                "Draft",
                "Published",
                "Retired"
              ],
              "type": "string"
            },
            "PickingQtyConfirmation": {
              "enum": [
                "PerPick",
                "Aggregated"
              ],
              "type": "string"
            },
            "PickingReservedLpnConfirmation": {
              "oneOf": [
                {
                  "enum": [
                    "DoNotConfirm"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator scans the reserved LPN whenever the source has one.",
                  "enum": [
                    "ScanWhenPresent"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingSourceLocationConfirmation": {
              "oneOf": [
                {
                  "description": "The card shows the source location; nothing is asked of the operator.",
                  "enum": [
                    "DisplayOnly"
                  ],
                  "type": "string"
                },
                {
                  "description": "The operator confirms the location by scanning it.",
                  "enum": [
                    "Scan"
                  ],
                  "type": "string"
                }
              ]
            },
            "PickingTargetBinding": {
              "enum": [
                "Unbound",
                "BeforeRoute"
              ],
              "type": "string"
            },
            "PickingTargetConfirmation": {
              "enum": [
                "ScanContainer",
                "PositionNumber"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/PickingPolicy"
          },
          "title": "Array_of_PickingPolicy",
          "type": "array"
        }
      },
      "summary": "List picking-policy revisions, filtered like any list (by status, code).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:c82dd6e1c39155c99c72e4032e0fed610b4eea2d62d0e4430dfd348bcddf60e6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "work_area_equipment_policy_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WorkAreaPickingPolicyRow": {
              "description": "The row as the work-area card lists it: with the profile's own code.",
              "properties": {
                "equipment_profile_code": {
                  "type": "string"
                },
                "equipment_profile_description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "equipment_profile_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "picking_policy_code": {
                  "type": "string"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "equipment_profile_code",
                "equipment_profile_id",
                "id",
                "picking_policy_code",
                "work_area_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/WorkAreaPickingPolicyRow"
          },
          "title": "Array_of_WorkAreaPickingPolicyRow",
          "type": "array"
        }
      },
      "summary": "List work areas' picking policies by equipment profile (filter by work_area_id).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "picking_policy",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:23cc47f3b7036c20b79237571b47c9514752b0a5bd642b08d9dcc20a24b01de0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_queue_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "default": null,
                "description": "At most this many units; absent — 50, never more than 200.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "station": {
                "description": "The pack station's location code (scanned or chosen).",
                "type": "string"
              }
            },
            "required": [
              "station"
            ],
            "title": "PackingQueueListInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "StationQueueRow": {
              "description": "One unit of a station's queue ([`OutboundFlowUnitBmc::station_queue`]).",
              "properties": {
                "container_code": {
                  "description": "The label the operator scans; `None` when the container is gone.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "description": "`None` only when the order row is gone (no foreign key, D-46).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "picks": {
                  "description": "How many picks the unit carries.",
                  "format": "int64",
                  "type": "integer"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "A box to verify, a pallet to repack, or a reopened package."
                },
                "unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "created_at",
                "order_id",
                "picks",
                "subject_container_id",
                "subject_kind",
                "unit_id",
                "version"
              ],
              "type": "object"
            }
          },
          "description": "What waits at a station.",
          "properties": {
            "capability": {
              "$ref": "#/definitions/FlowCapability"
            },
            "station": {
              "description": "The station's location code, as stored.",
              "type": "string"
            },
            "units": {
              "description": "Oldest first.",
              "items": {
                "$ref": "#/definitions/StationQueueRow"
              },
              "type": "array"
            }
          },
          "required": [
            "capability",
            "station",
            "units"
          ],
          "title": "StationQueue",
          "type": "object"
        }
      },
      "summary": "List the units waiting to be packed at a pack station, oldest first.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:241f1a9c362dca67ff4c761afbaf61bd24b94705866c7fc9e2522cbbbac69058",
      "x-quark-response-schema-hash": "sha256:fcaebe49d107a36db1fbf125d2bfb183ead2929573d19de1ee0da1455321dcf7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_work_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_id": {
                "default": null,
                "description": "A pallet being repacked: the output carton of its job to show (`carton` and `carton_holds` of the answer).",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "unit_id": {
                "description": "The router unit, as the station's queue named it.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "unit_id"
            ],
            "title": "PackingWorkGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowSubjectKind": {
              "oneOf": [
                {
                  "description": "A box off a carrier: already a shipping package — packing verifies it.",
                  "enum": [
                    "Box"
                  ],
                  "type": "string"
                },
                {
                  "description": "A discrete pick pallet: a source packing repacks into cartons.",
                  "enum": [
                    "Pallet"
                  ],
                  "type": "string"
                },
                {
                  "description": "A carton packing produced: released, `Pack` done, when it closed (post-pick spec §8.1).",
                  "enum": [
                    "Package"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "LabelPrinter": {
              "description": "The printer a label goes to, as the station shows it and the close answers it.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "id",
                "name"
              ],
              "type": "object"
            },
            "OpenOutputCarton": {
              "description": "An open output carton of the job (§36): where goods may go next.",
              "properties": {
                "carton_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "container_code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "version": {
                  "description": "What `packing_carton_close` sends back as `expected_version`.",
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "carton_id",
                "container_code",
                "container_id",
                "version"
              ],
              "type": "object"
            },
            "OutboundFlowUnit": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assigned_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_normal_capabilities": {
                  "items": {
                    "$ref": "#/definitions/FlowCapability"
                  },
                  "type": "array"
                },
                "created_at": {
                  "type": "string"
                },
                "handoff_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_capability": {
                  "$ref": "#/definitions/FlowCapability"
                },
                "order_id": {
                  "description": "The unit's one order — `None` only for a consolidated pallet carrying several (H2): its orders are [`OutboundFlowUnitBmc::orders_of`].",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/FlowUnitStatus"
                },
                "subject_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "subject_kind": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/FlowSubjectKind"
                    }
                  ],
                  "description": "What the subject is; it decides packing's action (spec §8.4)."
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "completed_normal_capabilities",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "next_capability",
                "status",
                "subject_container_id",
                "subject_kind",
                "version"
              ],
              "type": "object"
            },
            "PackingAction": {
              "oneOf": [
                {
                  "description": "Move the unit's goods into output cartons (slice C).",
                  "enum": [
                    "Repack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Check the unit as the package it already is (slice B).",
                  "enum": [
                    "Verify"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingCarton": {
              "properties": {
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "completion_reason": {
                  "description": "Why the carton closed, when not simply done: `CartonFull` (§19).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "execution_expected_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "handling_unit_type_snapshot": true,
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "job_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "measured_gross_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "obligation_id": {
                  "description": "`Verify`: the obligation this package satisfies when it closes (§11.3, rule 5). `None` for a `Repack` output carton.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "plan_expected_weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "planned_carton_ref": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "produced_flow_unit_id": {
                  "description": "A `Repack` output carton: the router unit its first close released (wms-app 088, §8.1); `None` until then and for a `Verify` package.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "sscc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/PackingCartonStatus"
                },
                "tracking_ref": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "voided_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "voided_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "weight_verdict": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/PackingWeightVerdict"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "container_id",
                "id",
                "job_id",
                "mod_when",
                "mod_who",
                "opened_at",
                "opened_by",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PackingCartonStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Open",
                    "Closed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up while open; its container is free for another carton.",
                  "enum": [
                    "Voided"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingJob": {
              "properties": {
                "cancelled_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "cancelled_by": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "opened_at": {
                  "type": "string"
                },
                "opened_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "packed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "policy_id": {
                  "description": "Reserved for a packing policy, which does not exist yet: every job is opened with `None` (B4-37). Nothing reads it.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "policy_snapshot": {
                  "description": "Reserved with `policy_id`: `{}` on every job today. Nothing reads it."
                },
                "release_mode": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/PackingReleaseMode"
                    }
                  ],
                  "description": "Reserved with `policy_id`: `PerUnit` on every job today (§10.3, the MVP default); `WholeOrder` is not built. Nothing reads it."
                },
                "station_location": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/PackingJobStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "mod_when",
                "mod_who",
                "opened_at",
                "opened_by",
                "order_id",
                "policy_snapshot",
                "release_mode",
                "station_location",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingObligation": {
              "properties": {
                "action": {
                  "$ref": "#/definitions/PackingAction"
                },
                "created_at": {
                  "type": "string"
                },
                "created_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "job_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "satisfied_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_flow_unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/PackingObligationStatus"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "action",
                "created_at",
                "created_by",
                "id",
                "job_id",
                "mod_when",
                "mod_who",
                "source_flow_unit_id",
                "status",
                "version"
              ],
              "type": "object"
            },
            "PackingObligationStatus": {
              "oneOf": [
                {
                  "description": "Still owed.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Done: `Verify` — its package closed (back to `Open` on a controlled reopen); `Repack` — the source completed, monotonically (§11.3).",
                  "enum": [
                    "Satisfied"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingReleaseMode": {
              "oneOf": [
                {
                  "description": "A closed package goes on to the router at once (§10.1; MVP).",
                  "enum": [
                    "PerUnit"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed packages wait for the job to be `Packed` (§10.2).",
                  "enum": [
                    "WholeOrder"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingWeightVerdict": {
              "oneOf": [
                {
                  "description": "The measured weight was recorded beside the expected one (policy `Record`, §24.3).",
                  "enum": [
                    "Recorded"
                  ],
                  "type": "string"
                },
                {
                  "description": "No expected weight can be computed (catch-weight, an item without a weight).",
                  "enum": [
                    "NotComparable"
                  ],
                  "type": "string"
                }
              ]
            },
            "WorkLine": {
              "description": "One item line of the view.",
              "properties": {
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_id": {
                  "description": "Actual lines: the order the stock was picked for; `None` — stock no pick put there. Expected lines carry the unit's order.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "owner_id",
                "qty",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "description": "What the station shows for one unit.",
          "properties": {
            "actual": {
              "description": "Inventory in the container's tree — what it holds.",
              "items": {
                "$ref": "#/definitions/WorkLine"
              },
              "type": "array"
            },
            "carton": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PackingCarton"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`Verify`: the obligation's live package, once opened. `Repack`: the output carton the view was asked for (`carton_id`)."
            },
            "carton_holds": {
              "description": "What `carton` holds: for a package under verification the unit's own container (`actual`); for an output carton, its tree.",
              "items": {
                "$ref": "#/definitions/WorkLine"
              },
              "type": "array"
            },
            "container_code": {
              "type": "string"
            },
            "execution_expected_weight": {
              "description": "Σ unit weight × qty of the ACTUAL content + tare (§24.2); `None` when some item has no weight.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "expected": {
              "description": "The unit's picks, by item — what the package should hold.",
              "items": {
                "$ref": "#/definitions/WorkLine"
              },
              "type": "array"
            },
            "job": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PackingJob"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The order's live packing job, once the work was opened."
            },
            "obligation": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PackingObligation"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What packing owes this unit, once the work was opened."
            },
            "open_cartons": {
              "description": "The job's open output cartons (`Repack`), oldest first.",
              "items": {
                "$ref": "#/definitions/OpenOutputCarton"
              },
              "type": "array"
            },
            "order_number": {
              "type": "string"
            },
            "plan_expected_weight": {
              "description": "The planned gross weight, when the container is a carton of the order's live cartonization plan (§24.1). Shown for reference only: the MVP weight policy is `Record` (§24.3) — a close records the measured weight and compares nothing (B4-37).",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "printer": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LabelPrinter"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The printer the shipping label goes to unless the operator scans another: the station's ([`station_printer`]). `None` — no printer covers the station."
            },
            "tare_weight": {
              "format": "double",
              "type": "number"
            },
            "unit": {
              "$ref": "#/definitions/OutboundFlowUnit"
            }
          },
          "required": [
            "actual",
            "carton_holds",
            "container_code",
            "expected",
            "open_cartons",
            "order_number",
            "tare_weight",
            "unit"
          ],
          "title": "PackingWork",
          "type": "object"
        }
      },
      "summary": "Read the station's view of one unit: its package, what it should and does hold, the weights.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f48b2ca1094cd9659280cbdc192e993ccd76e40bf7c0039b376b60408bfeff12",
      "x-quark-response-schema-hash": "sha256:975328fa7303c0bc8f0c7ece47c5e5b2322ef2bdeb6cda52315c513a311eea08",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_work_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_code": {
                "default": null,
                "description": "the label of the unit's container, as the operator scanned it at the station: the unit waiting there with it.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "station": {
                "description": "The station the operator works at.",
                "type": "string"
              },
              "unit_id": {
                "default": null,
                "description": "The router unit, as the station's queue named it. Or:",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "station"
            ],
            "title": "OpenPackingWork",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackingAction": {
              "oneOf": [
                {
                  "description": "Move the unit's goods into output cartons (slice C).",
                  "enum": [
                    "Repack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Check the unit as the package it already is (slice B).",
                  "enum": [
                    "Verify"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "action": {
              "$ref": "#/definitions/PackingAction"
            },
            "already_open": {
              "description": "The work was open already: nothing new was written.",
              "type": "boolean"
            },
            "carton_id": {
              "description": "`Verify`: the package under verification. `Repack`: `None` — the output cartons are opened by `packing_carton_open`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "carton_version": {
              "description": "What `packing_carton_close` sends back as `expected_version`.",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "job_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_version": {
              "format": "int32",
              "type": "integer"
            },
            "obligation_id": {
              "format": "int64",
              "type": "integer"
            },
            "obligation_version": {
              "description": "`Repack`: the obligation's version — what `packing_source_complete` sends back as `expected_version`.",
              "format": "int32",
              "type": "integer"
            },
            "unit_id": {
              "description": "The unit opened: what `packing_work_get` reads next.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "action",
            "already_open",
            "job_id",
            "job_version",
            "obligation_id",
            "obligation_version",
            "unit_id"
          ],
          "title": "OpenPackingWorkResult",
          "type": "object"
        }
      },
      "summary": "Open the packing work of a unit at a station, by its id or its container's label.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6fbc6a3491f325c3d88daeaae0eec6d688bb7da8e4bc84086a337c0a2590bb4b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:996dea9eb822fc129f02bc4ccf8f6ed66b7f9a8f8e4c9b99e054017c35c5904f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_carton_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_full": {
                "default": false,
                "description": "An output carton closed because it is physically full (§19).",
                "type": "boolean"
              },
              "carton_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`packing_carton.version` as the operator saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "measured_gross_weight": {
                "default": null,
                "description": "The scale's reading, in the owner's canonical weight UOM.",
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "printer_code": {
                "default": null,
                "description": "The printer the operator scanned for the shipping label (an active printer's code); absent — the station's printer.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "carton_id",
              "expected_version",
              "idempotency_key"
            ],
            "title": "ClosePackingCarton",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "LabelPrinter": {
              "description": "The printer a label goes to, as the station shows it and the close answers it.",
              "properties": {
                "code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "id",
                "name"
              ],
              "type": "object"
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingObligationStatus": {
              "oneOf": [
                {
                  "description": "Still owed.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Done: `Verify` — its package closed (back to `Open` on a controlled reopen); `Repack` — the source completed, monotonically (§11.3).",
                  "enum": [
                    "Satisfied"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingWeightVerdict": {
              "oneOf": [
                {
                  "description": "The measured weight was recorded beside the expected one (policy `Record`, §24.3).",
                  "enum": [
                    "Recorded"
                  ],
                  "type": "string"
                },
                {
                  "description": "No expected weight can be computed (catch-weight, an item without a weight).",
                  "enum": [
                    "NotComparable"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_version": {
              "description": "The version after the close.",
              "format": "int32",
              "type": "integer"
            },
            "execution_expected_weight": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "job_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_status": {
              "$ref": "#/definitions/PackingJobStatus"
            },
            "label_printer": {
              "anyOf": [
                {
                  "$ref": "#/definitions/LabelPrinter"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Where the shipping label is printed after the commit; `None` — no printer covers the station, no label."
            },
            "measured_gross_weight": {
              "format": "double",
              "type": "number"
            },
            "obligation_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PackingObligationStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A package's obligation after the close; `None` for an output carton of `Repack` (its source's obligation is not touched, §11.4)."
            },
            "order_packed": {
              "description": "The close finished the order's packing (spec §14).",
              "type": "boolean"
            },
            "unit_id": {
              "description": "The package's unit, or the unit the output carton released.",
              "format": "int64",
              "type": "integer"
            },
            "unit_next": {
              "allOf": [
                {
                  "$ref": "#/definitions/FlowCapability"
                }
              ],
              "description": "What the router sends the package to next (`None`: its flow is done)."
            },
            "unit_status": {
              "$ref": "#/definitions/FlowUnitStatus"
            },
            "weight_verdict": {
              "$ref": "#/definitions/PackingWeightVerdict"
            }
          },
          "required": [
            "carton_id",
            "carton_version",
            "job_id",
            "job_status",
            "measured_gross_weight",
            "order_packed",
            "unit_id",
            "unit_next",
            "unit_status",
            "weight_verdict"
          ],
          "title": "ClosePackingCartonResult",
          "type": "object"
        }
      },
      "summary": "Close a package or an output carton with its measured weight; prints its shipping label.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d1420278602f9336858be0062cb7a68a8f3858da93be8ce22ec910a637ef14f3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:e1f11b7ca35bd32db0307a26ff0dfe22857e5de56e867adb672fcf120b33ed09",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_carton",
          "id_field": "carton_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "packing_carton_void",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`packing_carton.version` as the operator saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "carton_id",
              "expected_version",
              "idempotency_key"
            ],
            "title": "VoidPackingCarton",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackingCartonStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Open",
                    "Closed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up while open; its container is free for another carton.",
                  "enum": [
                    "Voided"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_status": {
              "$ref": "#/definitions/PackingCartonStatus"
            },
            "carton_version": {
              "description": "The version after the void.",
              "format": "int32",
              "type": "integer"
            },
            "job_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "carton_id",
            "carton_status",
            "carton_version",
            "job_id"
          ],
          "title": "VoidPackingCartonResult",
          "type": "object"
        }
      },
      "summary": "Void an open package; the unit keeps waiting to be packed.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f9b68858f341f160ef9ab8909f229073eb28577b00d49d127c9e343115f233e5",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:3689a763cbcccebbc8cd74961bf7fd4172213b8ddb86781623b86980098743a6",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_carton",
          "id_field": "carton_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "packing_carton_reopen",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`packing_carton.version` as the operator saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "override_grant_id": {
                "description": "A supervisor's grant for `packing_override_codes::reopen_carton(carton_id)`.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "description": "Why the package is reopened; journalled.",
                "type": "string"
              }
            },
            "required": [
              "carton_id",
              "expected_version",
              "idempotency_key",
              "reason"
            ],
            "title": "ReopenPackingCarton",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowCapability": {
              "oneOf": [
                {
                  "description": "Verify / Repack at a pack station.",
                  "enum": [
                    "Pack"
                  ],
                  "type": "string"
                },
                {
                  "description": "Gather the order's units before shipment.",
                  "enum": [
                    "Consolidate"
                  ],
                  "type": "string"
                },
                {
                  "description": "Stand the unit in a staging location.",
                  "enum": [
                    "Stage"
                  ],
                  "type": "string"
                },
                {
                  "description": "Commit warehouse exit of the unit through Goods Issue, not a Load scan.",
                  "enum": [
                    "Ship"
                  ],
                  "type": "string"
                },
                {
                  "description": "Nothing next: the normal outbound flow of the unit is finished.",
                  "enum": [
                    "None"
                  ],
                  "type": "string"
                }
              ]
            },
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingCartonStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Open",
                    "Closed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up while open; its container is free for another carton.",
                  "enum": [
                    "Voided"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingObligationStatus": {
              "oneOf": [
                {
                  "description": "Still owed.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Done: `Verify` — its package closed (back to `Open` on a controlled reopen); `Repack` — the source completed, monotonically (§11.3).",
                  "enum": [
                    "Satisfied"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "authorized_by": {
              "description": "Who authorised the reopen (read off the grant, never the request).",
              "format": "int64",
              "type": "integer"
            },
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_status": {
              "$ref": "#/definitions/PackingCartonStatus"
            },
            "carton_version": {
              "description": "The version after the reopen.",
              "format": "int32",
              "type": "integer"
            },
            "job_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_reopened": {
              "description": "The job was `Packed` and is `Open` again (recovery, P-32).",
              "type": "boolean"
            },
            "job_status": {
              "$ref": "#/definitions/PackingJobStatus"
            },
            "obligation_id": {
              "description": "A package's obligation; `None` for an output carton of `Repack`.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "obligation_status": {
              "anyOf": [
                {
                  "$ref": "#/definitions/PackingObligationStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reopen_id": {
              "description": "The journal row.",
              "format": "int64",
              "type": "integer"
            },
            "unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "unit_next": {
              "allOf": [
                {
                  "$ref": "#/definitions/FlowCapability"
                }
              ],
              "description": "What the unit waits for now: `Pack` again."
            },
            "unit_status": {
              "$ref": "#/definitions/FlowUnitStatus"
            }
          },
          "required": [
            "authorized_by",
            "carton_id",
            "carton_status",
            "carton_version",
            "job_id",
            "job_reopened",
            "job_status",
            "reopen_id",
            "unit_id",
            "unit_next",
            "unit_status"
          ],
          "title": "ReopenPackingCartonResult",
          "type": "object"
        }
      },
      "summary": "Reopen a closed package with a supervisor's grant and a reason.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f4e6e00ebf10bc6cd32709a66ebb34c1990d2dfe5d5eff7cb1ea36f44bacca46",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:41c0945899ca62f1cf376b4f0fcbcced80516fbf5f7a94ec7a80a0e6a643fca0",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_carton",
          "id_field": "carton_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "packing_exception_report",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PackingExceptionCode": {
                "oneOf": [
                  {
                    "description": "`PACK_SOURCE_SHORT`: less stock than the unit should carry (§21.1).",
                    "enum": [
                      "SourceShort"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "`PACK_UNEXPECTED_ITEM`: stock that is not the order's (§21.2).",
                    "enum": [
                      "UnexpectedItem"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "`PACK_CARTON_FULL`: an output carton was physically full before the plan said (§19). Recorded, not blocking; cartonization is not redone.",
                    "enum": [
                      "CartonFull"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "carton_id": {
                "description": "The package the discrepancy was found in.",
                "format": "int64",
                "type": "integer"
              },
              "code": {
                "$ref": "#/definitions/PackingExceptionCode"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "carton_id",
              "code",
              "idempotency_key"
            ],
            "title": "ReportPackingException",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackingExceptionCode": {
              "oneOf": [
                {
                  "description": "`PACK_SOURCE_SHORT`: less stock than the unit should carry (§21.1).",
                  "enum": [
                    "SourceShort"
                  ],
                  "type": "string"
                },
                {
                  "description": "`PACK_UNEXPECTED_ITEM`: stock that is not the order's (§21.2).",
                  "enum": [
                    "UnexpectedItem"
                  ],
                  "type": "string"
                },
                {
                  "description": "`PACK_CARTON_FULL`: an output carton was physically full before the plan said (§19). Recorded, not blocking; cartonization is not redone.",
                  "enum": [
                    "CartonFull"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingExceptionStatus": {
              "enum": [
                "Open",
                "Resolved"
              ],
              "type": "string"
            }
          },
          "properties": {
            "blocking": {
              "description": "The exception keeps the order from `Packed`.",
              "type": "boolean"
            },
            "code": {
              "$ref": "#/definitions/PackingExceptionCode"
            },
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_id": {
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/PackingExceptionStatus"
            }
          },
          "required": [
            "blocking",
            "code",
            "exception_id",
            "job_id",
            "status"
          ],
          "title": "ReportPackingExceptionResult",
          "type": "object"
        }
      },
      "summary": "Report missing or unexpected goods in an open package; blocks the order's packing.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:70bcb1be87d8aca4e9046dbd8b819189c3e23e66374ba879386686b73a26941e",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:aec0130a53b75d6ff4a5138291e5bb7bf45a6da812db4dc0a183963c10848ba1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_carton_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_code": {
                "description": "The label of the box, as the operator scanned it.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "unit_id": {
                "description": "The pallet being repacked (its router unit, as the work was opened).",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "carton_code",
              "idempotency_key",
              "unit_id"
            ],
            "title": "OpenPackingCarton",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "already_open": {
              "description": "This job had the box open already: nothing new was written.",
              "type": "boolean"
            },
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_version": {
              "description": "What `packing_carton_close` / `_void` send back as `expected_version`.",
              "format": "int32",
              "type": "integer"
            },
            "container_code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "already_open",
            "carton_id",
            "carton_version",
            "container_code",
            "container_id",
            "job_id"
          ],
          "title": "OpenPackingCartonResult",
          "type": "object"
        }
      },
      "summary": "Open the next output carton for a pallet being repacked, by the box's label.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1bd2c8b573d3d07d2c594f3abd7e7e831d380244cb870bb0402e4973c65fa056",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:4b9dc83e331b12a623a045b887ee6893a14ea799aae01ff3cc0092627e9dfa91",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_add",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_id": {
                "description": "The output carton the goods go into.",
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot": {
                "default": null,
                "description": "The lot, when the operator scanned it; needed only when the pallet holds the item in several.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "sku_code": {
                "type": "string"
              },
              "unit_id": {
                "description": "The pallet they come from (its router unit).",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "carton_id",
              "idempotency_key",
              "qty",
              "sku_code",
              "unit_id"
            ],
            "title": "PackingAdd",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_version": {
              "description": "The carton's version after the add: what `packing_carton_close` sends back.",
              "format": "int32",
              "type": "integer"
            },
            "lot": {
              "type": "string"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "sku_code": {
              "type": "string"
            },
            "source_empty": {
              "description": "Nothing of the order is left on the pallet: the screen offers to complete the source (§11.4) — it never completes by itself.",
              "type": "boolean"
            },
            "source_picked_left": {
              "description": "Picked stock of the order still on the pallet, all items together.",
              "format": "double",
              "type": "number"
            },
            "tran_id": {
              "description": "The journal row.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "carton_id",
            "carton_version",
            "lot",
            "qty",
            "sku_code",
            "source_empty",
            "source_picked_left",
            "tran_id"
          ],
          "title": "PackingAddResult",
          "type": "object"
        }
      },
      "summary": "Move picked goods from the pallet being repacked into an open output carton.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:840585bc4e57ffb52c532d9649929e2d8496e891649dd28947a00af8914cde41",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:63f52c89584adac161b42738f01a4c5520f35d601c165d6c0e7d4ed581e62aae",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_remove",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "carton_id": {
                "description": "The output carton the goods come out of.",
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot": {
                "default": null,
                "description": "The lot, when the operator scanned it; needed only when the carton holds the item in several.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "sku_code": {
                "type": "string"
              },
              "to_carton_id": {
                "default": null,
                "description": "into this other open output carton of the order.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "to_unit_id": {
                "default": null,
                "description": "Back onto this pallet (its router unit) — or:",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "carton_id",
              "idempotency_key",
              "qty",
              "sku_code"
            ],
            "title": "PackingRemove",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_version": {
              "description": "The carton's version after the remove.",
              "format": "int32",
              "type": "integer"
            },
            "lot": {
              "type": "string"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "sku_code": {
              "type": "string"
            },
            "to_carton_id": {
              "description": "The target carton and its version, when the goods went into one.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "to_carton_version": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "tran_id": {
              "description": "The journal row.",
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "carton_id",
            "carton_version",
            "lot",
            "qty",
            "sku_code",
            "tran_id"
          ],
          "title": "PackingRemoveResult",
          "type": "object"
        }
      },
      "summary": "Move picked goods out of an output carton: back onto its pallet or into another open carton.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7ab76adc48a2bb0c1f9b0667ea934176e024d54493c99e310dae18279e2a4de8",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:9aaa1a955776a8a312bd17ff838a9653efef37b6a3e272df5b690262f9458543",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_source_complete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "description": "`packing_obligation.version` as the operator saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "obligation_id": {
                "description": "The obligation over the pallet repacked, as `packing_work_open` answered it.",
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "idempotency_key",
              "obligation_id"
            ],
            "title": "CompletePackingSource",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingObligationStatus": {
              "oneOf": [
                {
                  "description": "Still owed.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Done: `Verify` — its package closed (back to `Open` on a controlled reopen); `Repack` — the source completed, monotonically (§11.3).",
                  "enum": [
                    "Satisfied"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "job_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_status": {
              "$ref": "#/definitions/PackingJobStatus"
            },
            "obligation_id": {
              "format": "int64",
              "type": "integer"
            },
            "obligation_status": {
              "$ref": "#/definitions/PackingObligationStatus"
            },
            "obligation_version": {
              "description": "The version after the completion.",
              "format": "int32",
              "type": "integer"
            },
            "order_packed": {
              "description": "The completion finished the order's packing (spec §14).",
              "type": "boolean"
            },
            "unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "unit_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/FlowUnitStatus"
                }
              ],
              "description": "`Consumed`."
            }
          },
          "required": [
            "job_id",
            "job_status",
            "obligation_id",
            "obligation_status",
            "obligation_version",
            "order_packed",
            "unit_id",
            "unit_status"
          ],
          "title": "CompletePackingSourceResult",
          "type": "object"
        }
      },
      "summary": "Complete a repacked pallet: its obligation is satisfied and its router unit consumed.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4550cb69059ac6c4a40f760a30184cf180876c2edf9f43ddfd00285969744720",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:bfdacfd121ba27fc6383ca28af9263ece62301c0a22c30c867ad200c0daac77f",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_obligation",
          "id_field": "obligation_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "packing_exception_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OpenPackingException": {
              "description": "An open blocking exception as the supervisor's screen lists it ([`PackingExceptionBmc::open_blocking`]): what was reported, on which order, carton and station.",
              "properties": {
                "carton_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "carton_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "code": {
                  "$ref": "#/definitions/PackingExceptionCode"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reported_at": {
                  "type": "string"
                },
                "reported_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "id",
                "order_id",
                "reported_at",
                "reported_by",
                "station_location",
                "version"
              ],
              "type": "object"
            },
            "PackingExceptionCode": {
              "oneOf": [
                {
                  "description": "`PACK_SOURCE_SHORT`: less stock than the unit should carry (§21.1).",
                  "enum": [
                    "SourceShort"
                  ],
                  "type": "string"
                },
                {
                  "description": "`PACK_UNEXPECTED_ITEM`: stock that is not the order's (§21.2).",
                  "enum": [
                    "UnexpectedItem"
                  ],
                  "type": "string"
                },
                {
                  "description": "`PACK_CARTON_FULL`: an output carton was physically full before the plan said (§19). Recorded, not blocking; cartonization is not redone.",
                  "enum": [
                    "CartonFull"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/OpenPackingException"
          },
          "title": "Array_of_OpenPackingException",
          "type": "array"
        }
      },
      "summary": "List the open packing exceptions that hold orders back, oldest first.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:c66a333628e955e5b3537f771f7a6dad02e43c18559b17fa816333687b553522",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_exception_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "description": "The exception's id.",
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackingExceptionCode": {
              "oneOf": [
                {
                  "description": "`PACK_SOURCE_SHORT`: less stock than the unit should carry (§21.1).",
                  "enum": [
                    "SourceShort"
                  ],
                  "type": "string"
                },
                {
                  "description": "`PACK_UNEXPECTED_ITEM`: stock that is not the order's (§21.2).",
                  "enum": [
                    "UnexpectedItem"
                  ],
                  "type": "string"
                },
                {
                  "description": "`PACK_CARTON_FULL`: an output carton was physically full before the plan said (§19). Recorded, not blocking; cartonization is not redone.",
                  "enum": [
                    "CartonFull"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "An open blocking exception as the supervisor's screen lists it ([`PackingExceptionBmc::open_blocking`]): what was reported, on which order, carton and station.",
          "properties": {
            "carton_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "carton_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "code": {
              "$ref": "#/definitions/PackingExceptionCode"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "note": {
              "type": [
                "string",
                "null"
              ]
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": [
                "string",
                "null"
              ]
            },
            "reported_at": {
              "type": "string"
            },
            "reported_by": {
              "format": "int64",
              "type": "integer"
            },
            "station_location": {
              "type": "string"
            },
            "version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "code",
            "id",
            "order_id",
            "reported_at",
            "reported_by",
            "station_location",
            "version"
          ],
          "title": "OpenPackingException",
          "type": "object"
        }
      },
      "summary": "Read one open packing exception, as the supervisor's card loads it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f0f987dd8645e05e31e435577018b8e40c92967bf235b52c8899b7f3a4622727",
      "x-quark-response-schema-hash": "sha256:0b6fff1a77b38e15a1e1ef8c5c10586851001a9706365d54d76fe20704feb268",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "packing_exception_resolve",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PackingExceptionResolution": {
                "oneOf": [
                  {
                    "description": "The goods were found, or the report was a mistake (wms-app 115).",
                    "enum": [
                      "NoDiscrepancy"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "The stock was corrected by a count or an adjustment, outside packing — packing corrects no stock (P-15, P-16).",
                    "enum": [
                      "CorrectedByAccounting"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A `PACK_SOURCE_SHORT` on a package under verification: the missing picked goods were written off the package to Lost and the picks shorted (slice E, part 2; `packing_exception_resolve_short` alone records it, with its rows in `packing_exception_short`).",
                    "enum": [
                      "WrittenOffToLost"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "A `PACK_UNEXPECTED_ITEM`: the item was set aside into a location the supervisor named, the fact recorded in `packing_excess` and a count of that location requested — no balance written (P-16; slice E, part 2; `packing_exception_resolve_unexpected` alone records it).",
                    "enum": [
                      "SetAsideForCount"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "exception_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`packing_exception.version` as the supervisor saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "note": {
                "description": "What the supervisor writes about it; blank is none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution": {
                "$ref": "#/definitions/PackingExceptionResolution"
              }
            },
            "required": [
              "exception_id",
              "expected_version",
              "idempotency_key",
              "resolution"
            ],
            "title": "ResolvePackingException",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackingExceptionResolution": {
              "oneOf": [
                {
                  "description": "The goods were found, or the report was a mistake (wms-app 115).",
                  "enum": [
                    "NoDiscrepancy"
                  ],
                  "type": "string"
                },
                {
                  "description": "The stock was corrected by a count or an adjustment, outside packing — packing corrects no stock (P-15, P-16).",
                  "enum": [
                    "CorrectedByAccounting"
                  ],
                  "type": "string"
                },
                {
                  "description": "A `PACK_SOURCE_SHORT` on a package under verification: the missing picked goods were written off the package to Lost and the picks shorted (slice E, part 2; `packing_exception_resolve_short` alone records it, with its rows in `packing_exception_short`).",
                  "enum": [
                    "WrittenOffToLost"
                  ],
                  "type": "string"
                },
                {
                  "description": "A `PACK_UNEXPECTED_ITEM`: the item was set aside into a location the supervisor named, the fact recorded in `packing_excess` and a count of that location requested — no balance written (P-16; slice E, part 2; `packing_exception_resolve_unexpected` alone records it).",
                  "enum": [
                    "SetAsideForCount"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingExceptionStatus": {
              "enum": [
                "Open",
                "Resolved"
              ],
              "type": "string"
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_status": {
              "$ref": "#/definitions/PackingJobStatus"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_packed": {
              "description": "The resolution was the last thing that held the order (spec §14).",
              "type": "boolean"
            },
            "resolution": {
              "$ref": "#/definitions/PackingExceptionResolution"
            },
            "status": {
              "$ref": "#/definitions/PackingExceptionStatus"
            },
            "version": {
              "description": "The version after the resolution.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "exception_id",
            "job_status",
            "order_id",
            "order_packed",
            "resolution",
            "status",
            "version"
          ],
          "title": "ResolvePackingExceptionResult",
          "type": "object"
        }
      },
      "summary": "Resolve an open packing exception after investigation; the order packs if nothing else holds it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:da982ed1926e663e0be234b52739e6bf3a98e14f3e7b8e63cde99bf28c0bc10b",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:7cb83bc450c6703b134a16e1672dc07236936947eea21a276b67527c6a9a22a6",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_exception",
          "id_field": "exception_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "packing_exception_resolve_short",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "exception_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`packing_exception.version` as the supervisor saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot": {
                "default": "",
                "type": "string"
              },
              "note": {
                "description": "What the supervisor writes about it; blank is none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "description": "The item found missing: owner, SKU and lot — the lot left out is the stock without one (`\"\"`), as the web card sends a blank field …",
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "description": "… and how much of it, in base units.",
                "format": "double",
                "type": "number"
              },
              "reason_code": {
                "default": "PACK_SHORT",
                "description": "The published short reason whose policy the remediation runs.",
                "type": "string"
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "exception_id",
              "expected_version",
              "idempotency_key",
              "owner_id",
              "qty",
              "sku_code"
            ],
            "title": "ResolvePackingSourceShort",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackageShortedPick": {
              "description": "One pick the write-off shorted.",
              "properties": {
                "pick_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "remediation_id": {
                  "description": "The discrepancy event the remediation runs from.",
                  "format": "int64",
                  "type": "integer"
                },
                "shorted_pick_id": {
                  "description": "`pick_id` when the whole pick was shorted; the split-off part otherwise.",
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "pick_id",
                "qty",
                "remediation_id",
                "shorted_pick_id"
              ],
              "type": "object"
            },
            "PackingCartonStatus": {
              "oneOf": [
                {
                  "enum": [
                    "Open",
                    "Closed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up while open; its container is free for another carton.",
                  "enum": [
                    "Voided"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingExceptionResolution": {
              "oneOf": [
                {
                  "description": "The goods were found, or the report was a mistake (wms-app 115).",
                  "enum": [
                    "NoDiscrepancy"
                  ],
                  "type": "string"
                },
                {
                  "description": "The stock was corrected by a count or an adjustment, outside packing — packing corrects no stock (P-15, P-16).",
                  "enum": [
                    "CorrectedByAccounting"
                  ],
                  "type": "string"
                },
                {
                  "description": "A `PACK_SOURCE_SHORT` on a package under verification: the missing picked goods were written off the package to Lost and the picks shorted (slice E, part 2; `packing_exception_resolve_short` alone records it, with its rows in `packing_exception_short`).",
                  "enum": [
                    "WrittenOffToLost"
                  ],
                  "type": "string"
                },
                {
                  "description": "A `PACK_UNEXPECTED_ITEM`: the item was set aside into a location the supervisor named, the fact recorded in `packing_excess` and a count of that location requested — no balance written (P-16; slice E, part 2; `packing_exception_resolve_unexpected` alone records it).",
                  "enum": [
                    "SetAsideForCount"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingExceptionStatus": {
              "enum": [
                "Open",
                "Resolved"
              ],
              "type": "string"
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingObligationStatus": {
              "oneOf": [
                {
                  "description": "Still owed.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Done: `Verify` — its package closed (back to `Open` on a controlled reopen); `Repack` — the source completed, monotonically (§11.3).",
                  "enum": [
                    "Satisfied"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "carton_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/PackingCartonStatus"
                }
              ],
              "description": "`Open`; `Voided` when the short emptied it."
            },
            "carton_version": {
              "description": "The package's version after the write-off: what it holds changed.",
              "format": "int32",
              "type": "integer"
            },
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "job_status": {
              "$ref": "#/definitions/PackingJobStatus"
            },
            "lost_location": {
              "type": "string"
            },
            "moved_qty": {
              "description": "How much left the package.",
              "format": "double",
              "type": "number"
            },
            "obligation_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/PackingObligationStatus"
                }
              ],
              "description": "`Satisfied` when the short emptied the package; as it was otherwise."
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_packed": {
              "description": "The resolution was the last thing that held the order (spec §14).",
              "type": "boolean"
            },
            "resolution": {
              "$ref": "#/definitions/PackingExceptionResolution"
            },
            "shorted": {
              "description": "The picks shorted, in content order.",
              "items": {
                "$ref": "#/definitions/PackageShortedPick"
              },
              "type": "array"
            },
            "status": {
              "$ref": "#/definitions/PackingExceptionStatus"
            },
            "unit_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/FlowUnitStatus"
                }
              ],
              "description": "`Consumed` when the short emptied the package (its goods went to Lost); `Pending` otherwise."
            },
            "version": {
              "description": "The exception's version after the resolution.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "carton_id",
            "carton_status",
            "carton_version",
            "exception_id",
            "job_status",
            "lost_location",
            "moved_qty",
            "obligation_status",
            "order_id",
            "order_packed",
            "resolution",
            "shorted",
            "status",
            "unit_status",
            "version"
          ],
          "title": "ResolvePackingSourceShortResult",
          "type": "object"
        }
      },
      "summary": "Write a package's missing goods off to Lost and resolve its PACK_SOURCE_SHORT.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3f9a4bf66e5ff5cf1646b9283af3324e8b65c1f1eec17343096cbe0d8a6870b0",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:57abc834d7e673c0d9aefe910165f991888915e813cd24fe294605db4d46ef7e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_exception",
          "id_field": "exception_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "packing_exception_resolve_unexpected",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "exception_id": {
                "format": "int64",
                "type": "integer"
              },
              "expected_version": {
                "description": "`packing_exception.version` as the supervisor saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot": {
                "description": "… the lot, when the supervisor can tell it; blank is none …",
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "description": "What the supervisor writes about it; blank is none.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "description": "The item found: owner, SKU …",
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "description": "… and how much of it, in base units.",
                "format": "double",
                "type": "number"
              },
              "set_aside_location": {
                "description": "The location the packer sets the item aside into: the one counted.",
                "type": "string"
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "exception_id",
              "expected_version",
              "idempotency_key",
              "owner_id",
              "qty",
              "set_aside_location",
              "sku_code"
            ],
            "title": "ResolvePackingUnexpectedItem",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PackingExceptionResolution": {
              "oneOf": [
                {
                  "description": "The goods were found, or the report was a mistake (wms-app 115).",
                  "enum": [
                    "NoDiscrepancy"
                  ],
                  "type": "string"
                },
                {
                  "description": "The stock was corrected by a count or an adjustment, outside packing — packing corrects no stock (P-15, P-16).",
                  "enum": [
                    "CorrectedByAccounting"
                  ],
                  "type": "string"
                },
                {
                  "description": "A `PACK_SOURCE_SHORT` on a package under verification: the missing picked goods were written off the package to Lost and the picks shorted (slice E, part 2; `packing_exception_resolve_short` alone records it, with its rows in `packing_exception_short`).",
                  "enum": [
                    "WrittenOffToLost"
                  ],
                  "type": "string"
                },
                {
                  "description": "A `PACK_UNEXPECTED_ITEM`: the item was set aside into a location the supervisor named, the fact recorded in `packing_excess` and a count of that location requested — no balance written (P-16; slice E, part 2; `packing_exception_resolve_unexpected` alone records it).",
                  "enum": [
                    "SetAsideForCount"
                  ],
                  "type": "string"
                }
              ]
            },
            "PackingExceptionStatus": {
              "enum": [
                "Open",
                "Resolved"
              ],
              "type": "string"
            },
            "PackingJobStatus": {
              "oneOf": [
                {
                  "description": "Packing goes on.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Every obligation satisfied, every carton closed, no blocking exception (§14); a controlled reopen takes it back to `Open`.",
                  "enum": [
                    "Packed"
                  ],
                  "type": "string"
                },
                {
                  "description": "Given up before any physical execution (§9.3).",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "carton_id": {
              "format": "int64",
              "type": "integer"
            },
            "count_event_id": {
              "description": "The outbox event that asks for the count.",
              "format": "int64",
              "type": "integer"
            },
            "exception_id": {
              "format": "int64",
              "type": "integer"
            },
            "excess_id": {
              "description": "The `packing_excess` fact.",
              "format": "int64",
              "type": "integer"
            },
            "job_status": {
              "$ref": "#/definitions/PackingJobStatus"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_packed": {
              "description": "The resolution was the last thing that held the order (spec §14).",
              "type": "boolean"
            },
            "resolution": {
              "$ref": "#/definitions/PackingExceptionResolution"
            },
            "set_aside_location": {
              "type": "string"
            },
            "status": {
              "$ref": "#/definitions/PackingExceptionStatus"
            },
            "version": {
              "description": "The exception's version after the resolution.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "carton_id",
            "count_event_id",
            "exception_id",
            "excess_id",
            "job_status",
            "order_id",
            "order_packed",
            "resolution",
            "set_aside_location",
            "status",
            "version"
          ],
          "title": "ResolvePackingUnexpectedItemResult",
          "type": "object"
        }
      },
      "summary": "Set a packing carton's unexpected item aside for a count and resolve its PACK_UNEXPECTED_ITEM.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "packing",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:912f8fa733a1b8709b19a2ded84c97bbf3a722c369ccd496a9427968bab21be3",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:27a2d0e522c083d80447ebd138a87359aa846a38344246de02f918cbb076431e",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "packing_exception",
          "id_field": "exception_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "station_excess_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              }
            },
            "required": [
              "station_location"
            ],
            "title": "StationGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationExcess": {
              "properties": {
                "count_id": {
                  "description": "The request receipt, not a claim that inventory has been adjusted.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "operation_id": {
                  "format": "uuid",
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "reported_by": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "station_location": {
                  "type": "string"
                },
                "tote_code": {
                  "type": "string"
                },
                "tote_container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "uom": {
                  "type": "string"
                },
                "wave_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "operation_id",
                "owner_id",
                "qty",
                "reported_by",
                "sku_code",
                "station_location",
                "tote_code",
                "tote_container_id",
                "uom",
                "wave_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/StationExcess"
          },
          "title": "Array_of_StationExcess",
          "type": "array"
        }
      },
      "summary": "Read station excess facts and their inventory-count request receipts.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:530a0aefeaa63323e1ef9b5e42dc7ed9dd8a8e8418c4466cb08b3f9a555aa729",
      "x-quark-response-schema-hash": "sha256:d6b52797e7d79826978b98fe008d972ce4adc5884ff6632ba6d39d973c1d56f5",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_excess_context",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Codes read before an operator records excess. Resolving codes is a query, never a receipt, count request or permission to write a report.",
            "properties": {
              "owner_code": {
                "type": "string"
              },
              "sku_code": {
                "type": "string"
              },
              "station_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              },
              "wave_code": {
                "type": "string"
              }
            },
            "required": [
              "owner_code",
              "sku_code",
              "station_location",
              "tote_code",
              "wave_code"
            ],
            "title": "StationExcessContextInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/StationExcessContext"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "StationExcessContext": {
              "properties": {
                "owner_code": {
                  "type": "string"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "station_location": {
                  "type": "string"
                },
                "tote_code": {
                  "type": "string"
                },
                "uom": {
                  "type": "string"
                },
                "wave_code": {
                  "type": "string"
                },
                "wave_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "owner_code",
                "owner_id",
                "sku_code",
                "station_location",
                "tote_code",
                "uom",
                "wave_code",
                "wave_id"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_StationExcessContext"
        }
      },
      "summary": "Resolve excess report codes within a distribution station.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:0a571745d102b23d9dbe044bd38baa862f9f68d7ca3fd9a301da34bc4d886cef",
      "x-quark-response-schema-hash": "sha256:1708841cc1402486e996dba877fb999519cb2e90b211cbe06b0e7160541872ba",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_remainder_order",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A supervisor reads the order by its number, in the named station tote. The returned version is the decision's version, not an auto-retry token.",
            "properties": {
              "order_number": {
                "type": "string"
              },
              "station_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "order_number",
              "station_location",
              "tote_code"
            ],
            "title": "StationRemainderOrderInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "$ref": "#/definitions/StationRemainderOrder"
            },
            {
              "type": "null"
            }
          ],
          "definitions": {
            "StationRemainderOrder": {
              "properties": {
                "awaiting_qty": {
                  "format": "double",
                  "type": "number"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "station_location": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "tote_code": {
                  "type": "string"
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "awaiting_qty",
                "order_id",
                "order_number",
                "station_location",
                "status",
                "tote_code",
                "version"
              ],
              "type": "object"
            }
          },
          "title": "Nullable_StationRemainderOrder"
        }
      },
      "summary": "Read a station tote order before a supervisor decides to withdraw it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:eac3ff3b90c706b6d4e07d507673a80b387d8e88fb603943a9767d1b208a11c2",
      "x-quark-response-schema-hash": "sha256:44d0c0c8d689d7c7073a5f149a6c97ef1bc21cdedde902a671f58fdd158afcb8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_tote_short",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "owner_id": {
                "default": null,
                "description": "Omitted: the physical declaration covers this code for every owner.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason_code": {
                "default": "STATION_SHORT",
                "type": "string"
              },
              "sku_code": {
                "default": null,
                "description": "No quantity: every remaining pick of this item, across all lots.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "station_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "station_location",
              "tote_code"
            ],
            "title": "ShortStationTote",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationShortedPick": {
              "properties": {
                "pick_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "remediation_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "shorted_pick_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "pick_id",
                "qty",
                "remediation_id",
                "shorted_pick_id"
              ],
              "type": "object"
            }
          },
          "properties": {
            "lost_location": {
              "type": "string"
            },
            "picks": {
              "items": {
                "$ref": "#/definitions/StationShortedPick"
              },
              "type": "array"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "station_location": {
              "type": "string"
            },
            "tote_code": {
              "type": "string"
            }
          },
          "required": [
            "lost_location",
            "picks",
            "qty",
            "station_location",
            "tote_code"
          ],
          "title": "StationToteShorted",
          "type": "object"
        }
      },
      "summary": "Declare all remaining units of an item absent or damaged in a station tote.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:aef55ab26ffac998dee16653d78794536651311cfbb0a3b2f198e34a2a5604ce",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:98edc529eab4b3636822e1b3021d37a6bc923490c3bbceb7423e08b742f912b2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_excess_report",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "sku_code": {
                "type": "string"
              },
              "station_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              },
              "wave_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "owner_id",
              "qty",
              "sku_code",
              "station_location",
              "tote_code",
              "wave_id"
            ],
            "title": "ReportStationExcess",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "count_id": {
              "description": "The request receipt, not a claim that inventory has been adjusted.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "operation_id": {
              "format": "uuid",
              "type": "string"
            },
            "owner_id": {
              "format": "int64",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "reported_by": {
              "format": "int64",
              "type": "integer"
            },
            "sku_code": {
              "type": "string"
            },
            "station_location": {
              "type": "string"
            },
            "tote_code": {
              "type": "string"
            },
            "tote_container_id": {
              "format": "int64",
              "type": "integer"
            },
            "uom": {
              "type": "string"
            },
            "wave_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "id",
            "operation_id",
            "owner_id",
            "qty",
            "reported_by",
            "sku_code",
            "station_location",
            "tote_code",
            "tote_container_id",
            "uom",
            "wave_id"
          ],
          "title": "StationExcess",
          "type": "object"
        }
      },
      "summary": "Report station excess now; request counting after the wall becomes free.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8dd6658e43f29fdec3d33b85d98e6453cc620b07ca3756e36c235c00831c64d7",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:005bad4bcecb127c74607a70e71b9938bc4db0cb1244427bb316d32fa6cd09ff",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_tote_lost",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "owner_id": {
                "default": null,
                "description": "Omitted: the physical declaration covers this code for every owner.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason_code": {
                "default": "STATION_SHORT",
                "type": "string"
              },
              "sku_code": {
                "default": null,
                "description": "No quantity: every remaining pick of this item, across all lots.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "station_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "station_location",
              "tote_code"
            ],
            "title": "ShortStationTote",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationShortedPick": {
              "properties": {
                "pick_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "remediation_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "shorted_pick_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "pick_id",
                "qty",
                "remediation_id",
                "shorted_pick_id"
              ],
              "type": "object"
            }
          },
          "properties": {
            "lost_location": {
              "type": "string"
            },
            "picks": {
              "items": {
                "$ref": "#/definitions/StationShortedPick"
              },
              "type": "array"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "station_location": {
              "type": "string"
            },
            "tote_code": {
              "type": "string"
            }
          },
          "required": [
            "lost_location",
            "picks",
            "qty",
            "station_location",
            "tote_code"
          ],
          "title": "StationToteShorted",
          "type": "object"
        }
      },
      "summary": "Declare a whole tote lost before reaching the station (supervisor).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:aef55ab26ffac998dee16653d78794536651311cfbb0a3b2f198e34a2a5604ce",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:98edc529eab4b3636822e1b3021d37a6bc923490c3bbceb7423e08b742f912b2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_excess_count",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "station_location": {
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "station_location"
            ],
            "title": "CountStationExcess",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "count_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "deferred": {
              "type": "boolean"
            },
            "open_positions": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "pending_facts": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "return_blocked_until_count_complete": {
              "description": "The UI warns of this consequence before a supervisor forces a count.",
              "type": "boolean"
            },
            "station_location": {
              "type": "string"
            },
            "task_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "waiting_for_count_id": {
              "description": "An existing partial count must end before a full-location request can start.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "deferred",
            "open_positions",
            "pending_facts",
            "return_blocked_until_count_complete",
            "station_location"
          ],
          "title": "StationExcessCount",
          "type": "object"
        }
      },
      "summary": "Count station excess now (supervisor): returning remainder will stop until counting ends.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7249708aa8be0805b2fd66683b1ad6d8cf3822bd4b79688b9c9a199cb60ac53e",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f9b882d3057d91995a7c9ca4d2c288d2a1c3c0cd452de9393f146214b8cb816d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_order_withdraw",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_order_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "type": "string"
              },
              "station_location": {
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "expected_order_version",
              "idempotency_key",
              "order_id",
              "reason",
              "station_location",
              "tote_code"
            ],
            "title": "WithdrawStationOrder",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "new_order_version": {
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "position_freed": {
              "type": "boolean"
            },
            "ready_to_return_qty": {
              "format": "double",
              "type": "number"
            },
            "returned_pick_ids": {
              "items": {
                "format": "int64",
                "type": "integer"
              },
              "type": "array"
            },
            "station_location": {
              "type": "string"
            },
            "tote_code": {
              "type": "string"
            }
          },
          "required": [
            "new_order_version",
            "order_id",
            "position_freed",
            "ready_to_return_qty",
            "returned_pick_ids",
            "station_location",
            "tote_code"
          ],
          "title": "StationOrderWithdrawn",
          "type": "object"
        }
      },
      "summary": "Withdraw an unshipped station order and free its tote remainder for return.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f9c69b8551850eaae8705c54c88b545c6bfdc419efca54df78ee0082b075f1d0",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a929db8a122449594657aaf1e4a41c7d82259dc4a5b849db72462e123a12024d",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "shipment_order",
          "id_field": "order_id",
          "version_field": "expected_order_version"
        }
      ]
    },
    {
      "name": "station_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              }
            },
            "required": [
              "station_location"
            ],
            "title": "StationGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationPositionView": {
              "description": "One position as the station screen shows it: with its order and wave codes and its box's code (plain read).",
              "properties": {
                "box_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "box_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "complete": {
                  "description": "The position is complete — \"take the box off\" (R-17): its order's wave member is `Released` and nothing more is coming.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "picks_in_box": {
                  "description": "The picks placed in the position's box.",
                  "format": "int64",
                  "type": "integer"
                },
                "picks_still_coming": {
                  "description": "The order's picks bound for this station still to come (R-17).",
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "wave_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "complete",
                "id",
                "picks_in_box",
                "picks_still_coming",
                "position_no",
                "station_location"
              ],
              "type": "object"
            }
          },
          "description": "A distribution station as its screen shows it: every position with the order and wave holding it. A query.",
          "properties": {
            "free": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "positions": {
              "items": {
                "$ref": "#/definitions/StationPositionView"
              },
              "type": "array"
            },
            "station_location": {
              "type": "string"
            },
            "total": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "free",
            "positions",
            "station_location",
            "total"
          ],
          "title": "StationDetails",
          "type": "object"
        }
      },
      "summary": "Read a distribution station's positions with the order and wave holding each.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:530a0aefeaa63323e1ef9b5e42dc7ed9dd8a8e8418c4466cb08b3f9a555aa729",
      "x-quark-response-schema-hash": "sha256:555b2c6b84d219209e1df45ee0a3d670648785d810aba197c38e38d85de638bb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationSummary": {
              "description": "A location that may be a distribution station — every `Sort` location — with its positions counted, as the stations screen lists them (plain read). A `Sort` location with no positions is a station not set up yet.",
              "properties": {
                "boxes": {
                  "format": "int64",
                  "type": "integer"
                },
                "free": {
                  "format": "int64",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "total": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "boxes",
                "free",
                "station_location",
                "total"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/StationSummary"
          },
          "title": "Array_of_StationSummary",
          "type": "array"
        }
      },
      "summary": "List the locations that may be distribution stations, with their positions counted.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:4eacd45db9b39962b65233789164681a5ead7c8b8c9fc6d7e53e08a7d936486e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_card_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "station_location",
          "required": true,
          "schema": {
            "description": "The station's location code.",
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A location that may be a distribution station — every `Sort` location — with its positions counted, as the stations screen lists them (plain read). A `Sort` location with no positions is a station not set up yet.",
          "properties": {
            "boxes": {
              "format": "int64",
              "type": "integer"
            },
            "free": {
              "format": "int64",
              "type": "integer"
            },
            "station_location": {
              "type": "string"
            },
            "total": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "boxes",
            "free",
            "station_location",
            "total"
          ],
          "title": "StationSummary",
          "type": "object"
        }
      },
      "summary": "Read one distribution station's position counts, as its card loads them.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e97f7063fb83d994ba40bdaab9ec8e630a5ec92cf205c42e90d486e09955aed6",
      "x-quark-response-schema-hash": "sha256:5a906c363cebf2f9af9e09fe5e4ee458c01ec6fa73a240dbe8d616ee73761ab7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_position_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationPositionView": {
              "description": "One position as the station screen shows it: with its order and wave codes and its box's code (plain read).",
              "properties": {
                "box_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "box_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "complete": {
                  "description": "The position is complete — \"take the box off\" (R-17): its order's wave member is `Released` and nothing more is coming.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "picks_in_box": {
                  "description": "The picks placed in the position's box.",
                  "format": "int64",
                  "type": "integer"
                },
                "picks_still_coming": {
                  "description": "The order's picks bound for this station still to come (R-17).",
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "wave_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "complete",
                "id",
                "picks_in_box",
                "picks_still_coming",
                "position_no",
                "station_location"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/StationPositionView"
          },
          "title": "Array_of_StationPositionView",
          "type": "array"
        }
      },
      "summary": "List one distribution station's positions with the order, wave and box of each.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:81bff55409fb188893d14518a613021fa433eb4ff593815307e230b23c37f477",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_place_suggest",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What the placement screen asks after the tote and the item are scanned.",
            "properties": {
              "lot": {
                "default": null,
                "description": "The lot, when scanned; narrows the suggestion to it.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku_code": {
                "type": "string"
              },
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              },
              "tote_code": {
                "type": "string"
              }
            },
            "required": [
              "sku_code",
              "station_location",
              "tote_code"
            ],
            "title": "PlacementSuggestInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Which position wants the item from the tote, and how much (R-10, R-11): the lowest-numbered one, its box when it has one, the quantity offered. `position_no: None` — the tote holds the item awaiting placement, but for no order on a position of this station. A tote that holds none of it is refused (`STATION_ITEM_NOT_IN_TOTE`).",
          "properties": {
            "box_code": {
              "description": "The position's box, when one is on it; none — the screen asks for an empty box first (D-6).",
              "type": [
                "string",
                "null"
              ]
            },
            "lots": {
              "description": "The lots the position's goods are in, in this tote; more than one — the screen asks for the lot.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "need": {
              "description": "The quantity offered: what the position wants from this tote.",
              "format": "double",
              "type": "number"
            },
            "order_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "position_no": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "sku_code": {
              "type": "string"
            },
            "station_location": {
              "type": "string"
            },
            "tote_awaiting": {
              "description": "What of the item awaits placement in the tote, every order.",
              "format": "double",
              "type": "number"
            },
            "tote_code": {
              "type": "string"
            }
          },
          "required": [
            "lots",
            "need",
            "sku_code",
            "station_location",
            "tote_awaiting",
            "tote_code"
          ],
          "title": "PlacementSuggestion",
          "type": "object"
        }
      },
      "summary": "Suggest the station position that wants an item from a tote, and how much.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:8dd6bc1eaeeeac3cc52b6154b4008812b02198bd983ef3d50a690da0d1e63a8e",
      "x-quark-response-schema-hash": "sha256:4fe3175e7e68181e6bb05bc6f7a4ad77cc6b9f46c3d360c046a5bf4169771d45",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_configure",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "positions": {
                "description": "How many positions the station has, numbered `1..=positions`.",
                "format": "int32",
                "type": "integer"
              },
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "positions",
              "station_location"
            ],
            "title": "ConfigureStation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationPositionView": {
              "description": "One position as the station screen shows it: with its order and wave codes and its box's code (plain read).",
              "properties": {
                "box_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "box_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "complete": {
                  "description": "The position is complete — \"take the box off\" (R-17): its order's wave member is `Released` and nothing more is coming.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "picks_in_box": {
                  "description": "The picks placed in the position's box.",
                  "format": "int64",
                  "type": "integer"
                },
                "picks_still_coming": {
                  "description": "The order's picks bound for this station still to come (R-17).",
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "wave_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "complete",
                "id",
                "picks_in_box",
                "picks_still_coming",
                "position_no",
                "station_location"
              ],
              "type": "object"
            }
          },
          "description": "A distribution station as its screen shows it: every position with the order and wave holding it. A query.",
          "properties": {
            "free": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "positions": {
              "items": {
                "$ref": "#/definitions/StationPositionView"
              },
              "type": "array"
            },
            "station_location": {
              "type": "string"
            },
            "total": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "free",
            "positions",
            "station_location",
            "total"
          ],
          "title": "StationDetails",
          "type": "object"
        }
      },
      "summary": "Give a distribution station its number of positions.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:63e7accae68379a42be91a3afe5222c3591d98de5d6e1135d0f26aaffa1ffed2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:555b2c6b84d219209e1df45ee0a3d670648785d810aba197c38e38d85de638bb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_box_bind",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "box_code": {
                "description": "The scanned box's code.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "position_no": {
                "description": "The position's number at the station.",
                "format": "int32",
                "type": "integer"
              },
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              }
            },
            "required": [
              "box_code",
              "idempotency_key",
              "position_no",
              "station_location"
            ],
            "title": "BindStationBox",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "StationPositionView": {
              "description": "One position as the station screen shows it: with its order and wave codes and its box's code (plain read).",
              "properties": {
                "box_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "box_container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "complete": {
                  "description": "The position is complete — \"take the box off\" (R-17): its order's wave member is `Released` and nothing more is coming.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "picks_in_box": {
                  "description": "The picks placed in the position's box.",
                  "format": "int64",
                  "type": "integer"
                },
                "picks_still_coming": {
                  "description": "The order's picks bound for this station still to come (R-17).",
                  "format": "int64",
                  "type": "integer"
                },
                "position_no": {
                  "format": "int32",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "wave_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "complete",
                "id",
                "picks_in_box",
                "picks_still_coming",
                "position_no",
                "station_location"
              ],
              "type": "object"
            }
          },
          "description": "The position with its box, as the station screen shows it.",
          "properties": {
            "newly_bound": {
              "description": "`false` when the box was already this position's.",
              "type": "boolean"
            },
            "position": {
              "$ref": "#/definitions/StationPositionView"
            },
            "station_location": {
              "type": "string"
            }
          },
          "required": [
            "newly_bound",
            "position",
            "station_location"
          ],
          "title": "StationBoxBound",
          "type": "object"
        }
      },
      "summary": "Put an empty box on a distribution station's position.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7d6163fd4f1f836eec770e69d86405269304ea1fc155e5fd4f42d599be872ced",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:560e797c702a2444473cd165db69fe0e61c87adb7bf15dc81245f9a4cefe58e7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_box_deliver",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "box_code": {
                "description": "The scanned box's code.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "to_location": {
                "description": "The scanned location: the pack station the box goes to.",
                "type": "string"
              }
            },
            "required": [
              "box_code",
              "idempotency_key",
              "to_location"
            ],
            "title": "DeliverStationBox",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "box_code": {
              "type": "string"
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "moved": {
              "description": "`false` when the box already stood there (nothing written).",
              "type": "boolean"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "to_location": {
              "type": "string"
            },
            "unit_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "box_code",
            "moved",
            "order_id",
            "to_location",
            "unit_id"
          ],
          "title": "StationBoxDelivered",
          "type": "object"
        }
      },
      "summary": "Carry a station position's closed box to the pack station it waits for.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7cd528433a2ff68fe84a8f159aacb9d37cd6799ae3e6fec95556ca58b095be97",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:f66178b291d3738da2b43d175aa5e39db35c631a3e682970087e73bec582bb54",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_place",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "box_code": {
                "description": "The scanned box of the position the goods go to.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "lot": {
                "default": null,
                "description": "The lot, when the operator scanned it; needed only when the tote holds the item for the position's order in several.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "qty": {
                "format": "double",
                "type": "number"
              },
              "sku_code": {
                "type": "string"
              },
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              },
              "tote_code": {
                "description": "The tote the goods come from.",
                "type": "string"
              }
            },
            "required": [
              "box_code",
              "idempotency_key",
              "qty",
              "sku_code",
              "station_location",
              "tote_code"
            ],
            "title": "PlaceAtStation",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PlacedPickView": {
              "description": "One pick the placement took.",
              "properties": {
                "order_line_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "placed_pick_id": {
                  "description": "The pick now in the box: `pick_id` when it went whole, the split-off pick otherwise.",
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "remaining_qty": {
                  "description": "What `pick_id` still awaits in the tote.",
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "order_line_id",
                "pick_id",
                "placed_pick_id",
                "qty",
                "remaining_qty"
              ],
              "type": "object"
            }
          },
          "description": "What the placement did, as the station screen says it.",
          "properties": {
            "box_code": {
              "type": "string"
            },
            "lot": {
              "type": "string"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "picks": {
              "items": {
                "$ref": "#/definitions/PlacedPickView"
              },
              "type": "array"
            },
            "position_need_left": {
              "description": "What the position still wants of the item from this tote.",
              "format": "double",
              "type": "number"
            },
            "position_no": {
              "format": "int32",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": "number"
            },
            "sku_code": {
              "type": "string"
            },
            "station_location": {
              "type": "string"
            },
            "tote_code": {
              "type": "string"
            }
          },
          "required": [
            "box_code",
            "lot",
            "order_id",
            "picks",
            "position_need_left",
            "position_no",
            "qty",
            "sku_code",
            "station_location",
            "tote_code"
          ],
          "title": "StationPlaced",
          "type": "object"
        }
      },
      "summary": "Place goods from a tote into a distribution station position's box.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b014e36a9bd21adbdae7ff5a724c24b1d428ec0fa2ef82540f5dde4f39d5c662",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:ee40762c4078363500851cfc6c75cf2cec6cb2c1eced5ee6b85aa18472b0bb79",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_box_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "box_code": {
                "description": "The scanned box's code.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              }
            },
            "required": [
              "box_code",
              "idempotency_key",
              "station_location"
            ],
            "title": "CloseStationBox",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What the close did, as the station screen says it.",
          "properties": {
            "box_code": {
              "type": "string"
            },
            "destination": {
              "description": "Where the box goes next (the pack station), when it was handed over.",
              "type": [
                "string",
                "null"
              ]
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "picks": {
              "description": "The picks that left in the box (0: an empty box stayed on the freed position).",
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "position_freed": {
              "description": "The position is free for the next wave (R-20); `false` after a full box, whose position waits for a new one.",
              "type": "boolean"
            },
            "position_no": {
              "format": "int32",
              "type": "integer"
            },
            "station_location": {
              "type": "string"
            },
            "unit_id": {
              "description": "The router unit the box became, when its area names a next step.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "box_code",
            "order_id",
            "picks",
            "position_freed",
            "position_no",
            "station_location"
          ],
          "title": "StationBoxClosed",
          "type": "object"
        }
      },
      "summary": "Close a distribution station position's box once nothing more is coming to it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:548bf01cd30a3ca20e338741087e45c0d50b3a16b273a01d201052d2c365aac2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:5685d07ebf89b8ff5d506e137b52c26f5a24503154ce7ce340653adee4b9870b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "station_box_close_full",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "box_code": {
                "description": "The scanned box's code.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "station_location": {
                "description": "The station's location code (type `Sort`).",
                "type": "string"
              }
            },
            "required": [
              "box_code",
              "idempotency_key",
              "station_location"
            ],
            "title": "CloseStationBox",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What the close did, as the station screen says it.",
          "properties": {
            "box_code": {
              "type": "string"
            },
            "destination": {
              "description": "Where the box goes next (the pack station), when it was handed over.",
              "type": [
                "string",
                "null"
              ]
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "picks": {
              "description": "The picks that left in the box (0: an empty box stayed on the freed position).",
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "position_freed": {
              "description": "The position is free for the next wave (R-20); `false` after a full box, whose position waits for a new one.",
              "type": "boolean"
            },
            "position_no": {
              "format": "int32",
              "type": "integer"
            },
            "station_location": {
              "type": "string"
            },
            "unit_id": {
              "description": "The router unit the box became, when its area names a next step.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "box_code",
            "order_id",
            "picks",
            "position_freed",
            "position_no",
            "station_location"
          ],
          "title": "StationBoxClosed",
          "type": "object"
        }
      },
      "summary": "Close a distribution station position's full box; the position waits for a new one.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "station",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:548bf01cd30a3ca20e338741087e45c0d50b3a16b273a01d201052d2c365aac2",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:5685d07ebf89b8ff5d506e137b52c26f5a24503154ce7ce340653adee4b9870b",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_queue_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "station": {
                "description": "The consolidation station's location code.",
                "type": "string"
              }
            },
            "required": [
              "station"
            ],
            "title": "ConsolidationQueueListInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ConsolidationBox": {
              "description": "A box on a station's consolidation list (`consolidation_queue_list`) or on a pallet (`consolidation_target_get`).",
              "properties": {
                "container_code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "description": "The route the box goes on (its assignment); `None` without one.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "owner_id": {
                  "description": "The owner of the box's container.",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The consolidation station the box waits at (its unit's destination).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_id": {
                  "description": "The pallet the box stands on, when it is a target's.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_code",
                "container_id",
                "order_id",
                "order_number",
                "owner_id",
                "unit_id",
                "unit_version"
              ],
              "type": "object"
            },
            "ConsolidationPallet": {
              "description": "An open pallet of a station, with how many boxes stand on it.",
              "properties": {
                "boxes": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_id": {
                  "description": "The one order of a pallet with no route; `None` for a routed one.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "description": "The orders of the boxes on the pallet, comma-separated (H2: a routed pallet may carry several).",
                  "type": "string"
                },
                "owner_id": {
                  "description": "The owner every box on the pallet belongs to.",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ConsolidationTargetStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "target_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "boxes",
                "order_number",
                "owner_id",
                "pallet_code",
                "status",
                "target_id",
                "target_version"
              ],
              "type": "object"
            },
            "ConsolidationTargetStatus": {
              "oneOf": [
                {
                  "description": "Boxes are put on and taken off.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed explicitly (D-29): the pallet is a unit of its own; only a supervisor reopens it.",
                  "enum": [
                    "Closed"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "What a consolidation station has: the boxes waiting there (on a pallet or not yet) and its open pallets.",
          "properties": {
            "boxes": {
              "items": {
                "$ref": "#/definitions/ConsolidationBox"
              },
              "type": "array"
            },
            "pallets": {
              "items": {
                "$ref": "#/definitions/ConsolidationPallet"
              },
              "type": "array"
            },
            "station_location": {
              "type": "string"
            }
          },
          "required": [
            "boxes",
            "pallets",
            "station_location"
          ],
          "title": "ConsolidationQueue",
          "type": "object"
        }
      },
      "summary": "List the boxes waiting at a consolidation station and its open pallets.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:befe588aa6a2ac325d60000d0c006190bc8873bd9dd9e4eb68a2b066b73f3638",
      "x-quark-response-schema-hash": "sha256:789ad40de96fde3beb122246608aa1743f8df73c8293740087af6d38b476290d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_unit_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_code": {
                "description": "The box's label, as scanned.",
                "type": "string"
              },
              "station": {
                "description": "The consolidation station's location code.",
                "type": "string"
              }
            },
            "required": [
              "container_code",
              "station"
            ],
            "title": "ConsolidationUnitGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A scanned box: its order and route, and where it goes — the pallet it is on, or an open pallet of its route and owner at the station (of its order, for a pallet with no route), if any.",
          "properties": {
            "container_code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": "integer"
            },
            "dispatch_id": {
              "description": "The route the box goes on (its assignment); `None` without one.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "type": "string"
            },
            "owner_id": {
              "description": "The owner of the box's container.",
              "format": "int64",
              "type": "integer"
            },
            "pallet_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "station_location": {
              "description": "The consolidation station the box waits at (its unit's destination).",
              "type": [
                "string",
                "null"
              ]
            },
            "stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "suggested_pallet_code": {
              "description": "An open pallet the box may go on at the station (when it is on none yet): same route and owner — and order, for a pallet with no route.",
              "type": [
                "string",
                "null"
              ]
            },
            "target_id": {
              "description": "The pallet the box stands on, when it is a target's.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "unit_id": {
              "format": "int64",
              "type": "integer"
            },
            "unit_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "container_code",
            "container_id",
            "order_id",
            "order_number",
            "owner_id",
            "unit_id",
            "unit_version"
          ],
          "title": "ConsolidationUnitView",
          "type": "object"
        }
      },
      "summary": "Read a box waiting for consolidation: its order, route and the pallet it goes on.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d4fba0d7e959a6f2c1028a8c27bc92d05ececa8b3ffca630b6c9d71f06e6eeda",
      "x-quark-response-schema-hash": "sha256:99efe88c719e63c39ed3ac05e25dd386d03d7ce38518c240468d7c6076f65f71",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_target_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "pallet_code": {
                "default": null,
                "description": "…or the pallet's label, as a terminal scans it.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "target_id": {
                "default": null,
                "description": "The pallet's target, as a list named it…",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "ConsolidationTargetGetInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ConsolidationBox": {
              "description": "A box on a station's consolidation list (`consolidation_queue_list`) or on a pallet (`consolidation_target_get`).",
              "properties": {
                "container_code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "description": "The route the box goes on (its assignment); `None` without one.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "owner_id": {
                  "description": "The owner of the box's container.",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The consolidation station the box waits at (its unit's destination).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_id": {
                  "description": "The pallet the box stands on, when it is a target's.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_code",
                "container_id",
                "order_id",
                "order_number",
                "owner_id",
                "unit_id",
                "unit_version"
              ],
              "type": "object"
            },
            "ConsolidationPallet": {
              "description": "An open pallet of a station, with how many boxes stand on it.",
              "properties": {
                "boxes": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_id": {
                  "description": "The one order of a pallet with no route; `None` for a routed one.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_number": {
                  "description": "The orders of the boxes on the pallet, comma-separated (H2: a routed pallet may carry several).",
                  "type": "string"
                },
                "owner_id": {
                  "description": "The owner every box on the pallet belongs to.",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_code": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ConsolidationTargetStatus"
                },
                "stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "target_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "boxes",
                "order_number",
                "owner_id",
                "pallet_code",
                "status",
                "target_id",
                "target_version"
              ],
              "type": "object"
            },
            "ConsolidationTargetStatus": {
              "oneOf": [
                {
                  "description": "Boxes are put on and taken off.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed explicitly (D-29): the pallet is a unit of its own; only a supervisor reopens it.",
                  "enum": [
                    "Closed"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "One pallet and the boxes on it.",
          "properties": {
            "boxes": {
              "items": {
                "$ref": "#/definitions/ConsolidationBox"
              },
              "type": "array"
            },
            "pallet": {
              "$ref": "#/definitions/ConsolidationPallet"
            }
          },
          "required": [
            "boxes",
            "pallet"
          ],
          "title": "ConsolidationTargetView",
          "type": "object"
        }
      },
      "summary": "Read a consolidation pallet and the boxes on it.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:88d6ff03520f80dfee1fd0fdac09d83b01316201d82e9951e6bf12aac85ea94f",
      "x-quark-response-schema-hash": "sha256:cfaf88b7bddb83e716fa871e587f35594f3fd5289bfc8681aafc4ba09242cc5f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_station_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ConsolidationStationSummary": {
              "description": "A consolidation location on the supervisor's board: the work areas that name it and what stands there — boxes waiting for a pallet, open pallets, closed pallets not yet taken away.",
              "properties": {
                "boxes_waiting": {
                  "description": "Boxes waiting at the station that stand on no pallet yet.",
                  "format": "int64",
                  "type": "integer"
                },
                "closed_pallets": {
                  "description": "Closed pallets whose container still stands at the station.",
                  "format": "int64",
                  "type": "integer"
                },
                "open_pallets": {
                  "format": "int64",
                  "type": "integer"
                },
                "station_location": {
                  "type": "string"
                },
                "work_areas": {
                  "description": "The work areas whose consolidation station this is, comma-separated; `None` when no area names it (no box is sent there).",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "boxes_waiting",
                "closed_pallets",
                "open_pallets",
                "station_location"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ConsolidationStationSummary"
          },
          "title": "Array_of_ConsolidationStationSummary",
          "type": "array"
        }
      },
      "summary": "List the consolidation stations with their waiting boxes and pallets.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7dcdffea481e5056c1e86f841ef6facd404aa64a16db2c761eaa22bd951c082c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_station_card_get",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "station_location",
          "required": true,
          "schema": {
            "description": "The consolidation station's location code.",
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A consolidation location on the supervisor's board: the work areas that name it and what stands there — boxes waiting for a pallet, open pallets, closed pallets not yet taken away.",
          "properties": {
            "boxes_waiting": {
              "description": "Boxes waiting at the station that stand on no pallet yet.",
              "format": "int64",
              "type": "integer"
            },
            "closed_pallets": {
              "description": "Closed pallets whose container still stands at the station.",
              "format": "int64",
              "type": "integer"
            },
            "open_pallets": {
              "format": "int64",
              "type": "integer"
            },
            "station_location": {
              "type": "string"
            },
            "work_areas": {
              "description": "The work areas whose consolidation station this is, comma-separated; `None` when no area names it (no box is sent there).",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "boxes_waiting",
            "closed_pallets",
            "open_pallets",
            "station_location"
          ],
          "title": "ConsolidationStationSummary",
          "type": "object"
        }
      },
      "summary": "Read one consolidation station's counts, as its card loads them.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:33735c350774c347090d167dc37e2c527bec5b7de9a86bd54cc4af3bada2062f",
      "x-quark-response-schema-hash": "sha256:5b5c74ba68a8c8fa7983ebce19a4ee51e9dd517e47d6bfb9d370958bb6bedcfb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_board_pallet_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ConsolidationBoardPallet": {
              "description": "A pallet on the supervisor's board: open, or closed and still standing at the station — with its order, route and `target_version`, the version a close or a reopen is decided on.",
              "properties": {
                "boxes": {
                  "format": "int64",
                  "type": "integer"
                },
                "closed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dispatch_code": {
                  "description": "The route: the dispatch's code and the stop's sequence and destination; `None` while the boxes have no assignment.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "order_number": {
                  "description": "The orders of the boxes on the pallet, comma-separated.",
                  "type": "string"
                },
                "pallet_code": {
                  "type": "string"
                },
                "station_location": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/definitions/ConsolidationTargetStatus"
                },
                "stop_destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stop_sequence": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "target_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "boxes",
                "order_number",
                "pallet_code",
                "station_location",
                "status",
                "target_id",
                "target_version"
              ],
              "type": "object"
            },
            "ConsolidationTargetStatus": {
              "oneOf": [
                {
                  "description": "Boxes are put on and taken off.",
                  "enum": [
                    "Open"
                  ],
                  "type": "string"
                },
                {
                  "description": "Closed explicitly (D-29): the pallet is a unit of its own; only a supervisor reopens it.",
                  "enum": [
                    "Closed"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/ConsolidationBoardPallet"
          },
          "title": "Array_of_ConsolidationBoardPallet",
          "type": "array"
        }
      },
      "summary": "List a consolidation station's open pallets and the closed ones still standing there.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:400a8a04ebaeb25300642daa0d7ab464fa7ab9d06aa5790ba3327feb036fea1d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_board_box_list",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ConsolidationBox": {
              "description": "A box on a station's consolidation list (`consolidation_queue_list`) or on a pallet (`consolidation_target_get`).",
              "properties": {
                "container_code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "dispatch_id": {
                  "description": "The route the box goes on (its assignment); `None` without one.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "owner_id": {
                  "description": "The owner of the box's container.",
                  "format": "int64",
                  "type": "integer"
                },
                "pallet_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "station_location": {
                  "description": "The consolidation station the box waits at (its unit's destination).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stop_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "target_id": {
                  "description": "The pallet the box stands on, when it is a target's.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unit_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "unit_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "container_code",
                "container_id",
                "order_id",
                "order_number",
                "owner_id",
                "unit_id",
                "unit_version"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ConsolidationBox"
          },
          "title": "Array_of_ConsolidationBox",
          "type": "array"
        }
      },
      "summary": "List the boxes waiting at a consolidation station, on a pallet or not yet.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:afb71ec8564521f3bd58b0b056645fdd195bac1910861bc3e7799fce8aaf0253",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_session_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "station_location": {
                "description": "The consolidation station, as scanned.",
                "type": "string"
              }
            },
            "required": [
              "idempotency_key",
              "station_location"
            ],
            "title": "OpenConsolidationSession",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ConsolidationPalletView": {
              "description": "An open pallet as a screen lists it.",
              "properties": {
                "boxes": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "type": "string"
                },
                "pallet_code": {
                  "type": "string"
                },
                "target_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "target_version": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "required": [
                "boxes",
                "order_number",
                "pallet_code",
                "target_id",
                "target_version"
              ],
              "type": "object"
            }
          },
          "properties": {
            "open_pallets": {
              "description": "The station's open pallets, oldest first.",
              "items": {
                "$ref": "#/definitions/ConsolidationPalletView"
              },
              "type": "array"
            },
            "session_id": {
              "format": "int64",
              "type": "integer"
            },
            "station_location": {
              "type": "string"
            }
          },
          "required": [
            "open_pallets",
            "session_id",
            "station_location"
          ],
          "title": "OpenConsolidationSessionResult",
          "type": "object"
        }
      },
      "summary": "Open (or resume) the caller's session at a consolidation station.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7ffaf9faeb32a3c13dcec032d02fe1764f8bfb021b47d4bd4779f77bf7f5f45a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:db72b3087eb80fbb23f41b4eb6d8ea73db38fbac7cbf443259e11f43264f6151",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_session_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "session_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "session_id"
            ],
            "title": "CloseConsolidationSession",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "closed": {
              "description": "`false` when the session was closed already.",
              "type": "boolean"
            },
            "session_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "closed",
            "session_id"
          ],
          "title": "CloseConsolidationSessionResult",
          "type": "object"
        }
      },
      "summary": "Close the caller's consolidation session.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f4558d0494dcf5e53356065c253124fb6b66cacdb288b3ef3f3bb20e3e73ac11",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:cf702ef6fbc968154ef44beccb44a5daee46a5f1b4ec27a5636ea58d7e75397a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_add",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_code": {
                "description": "The box's label, as scanned.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "pallet_code": {
                "description": "The pallet's label, as scanned.",
                "type": "string"
              },
              "session_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "container_code",
              "idempotency_key",
              "pallet_code",
              "session_id"
            ],
            "title": "ConsolidationAdd",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AutoCloseReason": {
              "description": "Why a pallet closed itself.",
              "oneOf": [
                {
                  "description": "No box of the pallet's key is still coming: every one is on it.",
                  "enum": [
                    "AllCollected"
                  ],
                  "type": "string"
                },
                {
                  "description": "Its weight reached its pallet type's maximum gross weight.",
                  "enum": [
                    "WeightLimit"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "already_on": {
              "description": "The box stood on this pallet already: nothing was written.",
              "type": "boolean"
            },
            "auto_closed": {
              "anyOf": [
                {
                  "$ref": "#/definitions/AutoCloseReason"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The pallet closed itself with this box, and why (auto-close, owner 2026-10-23); `None`: it is still open."
            },
            "boxes": {
              "description": "Boxes on the pallet now.",
              "format": "int64",
              "type": "integer"
            },
            "container_code": {
              "type": "string"
            },
            "dispatch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "order_id": {
              "description": "The box's order.",
              "format": "int64",
              "type": "integer"
            },
            "pallet_code": {
              "type": "string"
            },
            "pallet_unit_id": {
              "description": "The closed pallet's router unit, when it closed itself.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "stop_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "target_id": {
              "format": "int64",
              "type": "integer"
            },
            "target_version": {
              "description": "What `consolidation_target_close` sends back as `expected_version`.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "already_on",
            "boxes",
            "container_code",
            "order_id",
            "pallet_code",
            "target_id",
            "target_version"
          ],
          "title": "ConsolidationAddResult",
          "type": "object"
        }
      },
      "summary": "Put a packed box onto an outbound pallet at the consolidation station.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:53cda598b511ac23864ab5ab610bf22c179ba361febc8ad196384551b32873b8",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:1e0316d3f8dc50ba2f71f7191ffbb3294d80543e667ceae2d11244a7b198d570",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_remove",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "container_code": {
                "description": "The box's label, as scanned.",
                "type": "string"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "session_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "container_code",
              "idempotency_key",
              "session_id"
            ],
            "title": "ConsolidationRemove",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "boxes": {
              "description": "Boxes left on the pallet.",
              "format": "int64",
              "type": "integer"
            },
            "container_code": {
              "type": "string"
            },
            "pallet_code": {
              "type": "string"
            },
            "target_id": {
              "format": "int64",
              "type": "integer"
            },
            "target_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "boxes",
            "container_code",
            "pallet_code",
            "target_id",
            "target_version"
          ],
          "title": "ConsolidationRemoveResult",
          "type": "object"
        }
      },
      "summary": "Take a box off an open consolidation pallet.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:56c892f9e3171fae94ec60f9e15ac35e911fd62f2f861ae5008773b2dbf9a91a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:1fd3931c7a02247609e7760fa1bc35073363f2ff05097b284b048e436db89139",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "consolidation_target_close",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "description": "`consolidation_target.version` as the operator saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "target_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "idempotency_key",
              "target_id"
            ],
            "title": "CloseConsolidationTarget",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "FlowUnitStatus": {
              "oneOf": [
                {
                  "description": "Waits for `next_capability`.",
                  "enum": [
                    "Pending"
                  ],
                  "type": "string"
                },
                {
                  "description": "The normal flow is finished; `next_capability` is `None`.",
                  "enum": [
                    "Completed"
                  ],
                  "type": "string"
                },
                {
                  "description": "The physical subject was used by Repack or left via receipt-backed GI. A shipped subject has None next and the actual Ship capability marker.",
                  "enum": [
                    "Consumed"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "boxes": {
              "format": "int64",
              "type": "integer"
            },
            "pallet_code": {
              "type": "string"
            },
            "pallet_unit_id": {
              "description": "The pallet's router unit, `Completed`: what Stage takes.",
              "format": "int64",
              "type": "integer"
            },
            "pallet_unit_status": {
              "$ref": "#/definitions/FlowUnitStatus"
            },
            "target_id": {
              "format": "int64",
              "type": "integer"
            },
            "target_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "boxes",
            "pallet_code",
            "pallet_unit_id",
            "pallet_unit_status",
            "target_id",
            "target_version"
          ],
          "title": "CloseConsolidationTargetResult",
          "type": "object"
        }
      },
      "summary": "Close a consolidation pallet: it becomes an outbound unit of its own.",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2413da3e6659f2f69f6d94dcaec3b437211f71c489a22c931d2dc16e6dfde043",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:66bb10638735662c95a9269f2c88f0159a473b5586b6b24131887c2a5992716a",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "consolidation_target",
          "id_field": "target_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "consolidation_target_reopen",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "expected_version": {
                "description": "`consolidation_target.version` as the supervisor saw it.",
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "target_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_version",
              "idempotency_key",
              "target_id"
            ],
            "title": "ReopenConsolidationTarget",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "boxes": {
              "description": "Boxes waiting on the pallet again.",
              "format": "int64",
              "type": "integer"
            },
            "pallet_code": {
              "type": "string"
            },
            "target_id": {
              "format": "int64",
              "type": "integer"
            },
            "target_version": {
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "boxes",
            "pallet_code",
            "target_id",
            "target_version"
          ],
          "title": "ReopenConsolidationTargetResult",
          "type": "object"
        }
      },
      "summary": "Reopen a closed consolidation pallet (supervisor).",
      "tags": [
        {
          "name": "outbound"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "outbound",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "consolidation",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:01e5ff57a7b9f0d177cdfde39110553400a7980f6f0d60da26ec103b85a73110",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:b65746331a26d98d76b9373de3c0140f87f6441e81091a21cfef24444330c8fc",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "consolidation_target",
          "id_field": "target_id",
          "version_field": "expected_version"
        }
      ]
    },
    {
      "name": "create_work_area",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A field left `None` is left out of the INSERT, so the column takes its DEFAULT (`''`, `1`, `true` — wms-app 315).",
            "properties": {
              "allow_task_release": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "consolidation_station_location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_concurrent_tasks": {
                "format": "int16",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "pack_station_location": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "WorkAreaForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_task_release": {
              "description": "May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "consolidation_station_location": {
              "description": "The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.",
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "max_concurrent_tasks": {
              "description": "Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.",
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pack_station_location": {
              "description": "The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).",
              "type": [
                "string",
                "null"
              ]
            },
            "picking_policy_code": {
              "description": "Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_task_release",
            "code",
            "description",
            "id",
            "max_concurrent_tasks",
            "mod_when",
            "mod_who"
          ],
          "title": "WorkArea",
          "type": "object"
        }
      },
      "summary": "Create a work area, optionally naming its pack station (a Pack location).",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1ce7512a624fa0309e940646024079e4e9f18718098c647586684f20ceac5620",
      "x-quark-response-schema-hash": "sha256:553e66a10b476060bd7ba0a1ec245377409acce532b6eb1059797dce3c94217d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_work_area_zone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "putawayzone": {
                "type": "string"
              },
              "work_area_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "putawayzone",
              "work_area_id"
            ],
            "title": "WorkAreaZoneForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone",
            "work_area_id"
          ],
          "title": "WorkAreaZone",
          "type": "object"
        }
      },
      "summary": "Create a new work_area_zone — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:344f540cbaee4decf1dca79d33548d760ec8361730b3f2ac7e169ae1b395ff0f",
      "x-quark-response-schema-hash": "sha256:7752f677e1fb6e820adbbb990188d4bf3675fc19acd5cf2063aeeffcaa800ee1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_work_area",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_task_release": {
              "description": "May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "consolidation_station_location": {
              "description": "The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.",
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "max_concurrent_tasks": {
              "description": "Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.",
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pack_station_location": {
              "description": "The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).",
              "type": [
                "string",
                "null"
              ]
            },
            "picking_policy_code": {
              "description": "Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_task_release",
            "code",
            "description",
            "id",
            "max_concurrent_tasks",
            "mod_when",
            "mod_who"
          ],
          "title": "WorkArea",
          "type": "object"
        }
      },
      "summary": "Get a work_area by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:553e66a10b476060bd7ba0a1ec245377409acce532b6eb1059797dce3c94217d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_work_area_zone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone",
            "work_area_id"
          ],
          "title": "WorkAreaZone",
          "type": "object"
        }
      },
      "summary": "Get a work_area_zone by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:7752f677e1fb6e820adbbb990188d4bf3675fc19acd5cf2063aeeffcaa800ee1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_work_area",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WorkArea": {
              "description": "<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "allow_task_release": {
                  "description": "May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.",
                  "type": "boolean"
                },
                "code": {
                  "type": "string"
                },
                "consolidation_station_location": {
                  "description": "The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "max_concurrent_tasks": {
                  "description": "Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.",
                  "format": "int16",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "pack_station_location": {
                  "description": "The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "picking_policy_code": {
                  "description": "Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "allow_task_release",
                "code",
                "description",
                "id",
                "max_concurrent_tasks",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/WorkArea"
          },
          "title": "Array_of_WorkArea",
          "type": "array"
        }
      },
      "summary": "List work_area — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9864ee56620a48611c927d53f4e423ac11aff1d5435015b4668a5f91417c8f38",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_work_area_zone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "WorkAreaZone": {
              "description": "One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone": {
                  "type": "string"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "putawayzone",
                "work_area_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/WorkAreaZone"
          },
          "title": "Array_of_WorkAreaZone",
          "type": "array"
        }
      },
      "summary": "List work_area_zone — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:2b6a4646ebe67c0717893e523872c40eb1304d205230ff98ff6140cc3f73b82f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_work_area",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "allow_task_release": {
                "type": "boolean"
              },
              "consolidation_station_location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": "string"
              },
              "max_concurrent_tasks": {
                "format": "int16",
                "type": "integer"
              },
              "pack_station_location": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "WorkAreaUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_task_release": {
              "description": "May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "consolidation_station_location": {
              "description": "The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.",
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "max_concurrent_tasks": {
              "description": "Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.",
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pack_station_location": {
              "description": "The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).",
              "type": [
                "string",
                "null"
              ]
            },
            "picking_policy_code": {
              "description": "Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_task_release",
            "code",
            "description",
            "id",
            "max_concurrent_tasks",
            "mod_when",
            "mod_who"
          ],
          "title": "WorkArea",
          "type": "object"
        }
      },
      "summary": "Update work-area behavior and its pack station without changing its stable code.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:263e6842b7222b3247ddff31ed049b8e2e36309016ad0fd62e21d7215482cfc0",
      "x-quark-response-schema-hash": "sha256:553e66a10b476060bd7ba0a1ec245377409acce532b6eb1059797dce3c94217d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_work_area_zone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "putawayzone": {
                "type": "string"
              }
            },
            "title": "WorkAreaZoneUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone",
            "work_area_id"
          ],
          "title": "WorkAreaZone",
          "type": "object"
        }
      },
      "summary": "Move a work-area association to another zone; null/work-area changes are rejected.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:990ed08610245e7a8c2c7d5ad987df02f075172a01b5e74876f7df2ea189be92",
      "x-quark-response-schema-hash": "sha256:7752f677e1fb6e820adbbb990188d4bf3675fc19acd5cf2063aeeffcaa800ee1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_work_area",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Work area</Strong> — a named set of putaway zones where an operator is allowed to work (task-manager pass 2, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md`).\n\nIt is the unit task distribution will filter by: an operator's rights are a grid of `task type × work area`, and a task reaches its area through `task.from_location → location.putawayzone → work_area_zone`. Renamed from `facility` (owner decision 2026-08-27); the columns that make it an area — the concurrent-task limit, \"may hand a task back\" — arrived in step 2 (wms-app 315), and the rules that read them come in step 6.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "allow_task_release": {
              "description": "May an operator hand a task back here (Infor \"Sign Off Allowed\"). Read by `TaskService::skip_task_in_area` since step 6 — it gates BOTH doors, the hand-back and the refusal; without a named area the warehouse default (`TASK_ALLOW_RELEASE_DEFAULT`) rules instead.",
              "type": "boolean"
            },
            "code": {
              "type": "string"
            },
            "consolidation_station_location": {
              "description": "The area's consolidation station (consolidation H1; wms-app 20261021191021): the `Consolidation` location where its packed units are put onto outbound pallets. `None` — packed units are `Completed` as before.",
              "type": [
                "string",
                "null"
              ]
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "max_concurrent_tasks": {
              "description": "Tasks one operator may hold at once inside this area — only when the terminal names the area (spec §4.1). Read by `TaskService::claim_one_in_area` since step 6; without a named area the warehouse default (`TASK_MAX_CONCURRENT_DEFAULT`) rules instead.",
              "format": "int16",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "pack_station_location": {
              "description": "The area's pack station (wms-app 065; post-pick spec О-1, D-55): the `Pack` location its carriers are delivered to when their units go to packing. `None` — no station: picking delivers as before. Only a `Pack` location (wms-app 079).",
              "type": [
                "string",
                "null"
              ]
            },
            "picking_policy_code": {
              "description": "Code of the picking policy this area works by (its published revision); `None` = `DISCRETE`. Read side only — assignment goes through `PickingPolicyBmc::assign_to_work_area` (wms-app 042).",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "allow_task_release",
            "code",
            "description",
            "id",
            "max_concurrent_tasks",
            "mod_when",
            "mod_who"
          ],
          "title": "WorkArea",
          "type": "object"
        }
      },
      "summary": "Delete a work_area by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:553e66a10b476060bd7ba0a1ec245377409acce532b6eb1059797dce3c94217d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_work_area_zone",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone of a work area. Many-to-many: a zone may belong to several areas (`UNIQUE (work_area_id, putawayzone)`, not unique by zone).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone",
            "work_area_id"
          ],
          "title": "WorkAreaZone",
          "type": "object"
        }
      },
      "summary": "Delete a work_area_zone by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:7752f677e1fb6e820adbbb990188d4bf3675fc19acd5cf2063aeeffcaa800ee1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_work_area",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count work_area — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "work_area",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "A field left `None` is left out of the INSERT, so the column takes its DEFAULT (`''`, `0`, `0`, `true` — wms-app 320).",
            "properties": {
              "code": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "max_weight": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "weight_reduction_per_level": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "code"
            ],
            "title": "EquipmentProfileForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_weight": {
              "description": "What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.",
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "weight_reduction_per_level": {
              "description": "Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "id",
            "is_active",
            "max_weight",
            "mod_when",
            "mod_who",
            "weight_reduction_per_level"
          ],
          "title": "EquipmentProfile",
          "type": "object"
        }
      },
      "summary": "Create a new equipment_profile — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4542e954b17c74f98b4f433a5a471386c6e7cb5d92ee0801e29c1e62624ef43c",
      "x-quark-response-schema-hash": "sha256:16f73953508034a81b682c711eb89c69560733b275e878df833eae14c3027b7d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_equipment_profile_zone_exclusion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "equipment_profile_id": {
                "format": "int64",
                "type": "integer"
              },
              "putawayzone": {
                "type": "string"
              }
            },
            "required": [
              "equipment_profile_id",
              "putawayzone"
            ],
            "title": "EquipmentProfileZoneExclusionForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "equipment_profile_id",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone"
          ],
          "title": "EquipmentProfileZoneExclusion",
          "type": "object"
        }
      },
      "summary": "Create a new equipment_profile_zone_exclusion — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:3c0011bce673c4a9a824aafb7298c892ae1181d9fcc842a8ce15c7fadd7a27c3",
      "x-quark-response-schema-hash": "sha256:c912a71cd38597bd4ba52bea8273e7c149f57f5f9cce2d9b97c8ba4d5e3ca421",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_weight": {
              "description": "What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.",
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "weight_reduction_per_level": {
              "description": "Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "id",
            "is_active",
            "max_weight",
            "mod_when",
            "mod_who",
            "weight_reduction_per_level"
          ],
          "title": "EquipmentProfile",
          "type": "object"
        }
      },
      "summary": "Get a equipment_profile by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:16f73953508034a81b682c711eb89c69560733b275e878df833eae14c3027b7d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_equipment_profile_zone_exclusion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "equipment_profile_id",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone"
          ],
          "title": "EquipmentProfileZoneExclusion",
          "type": "object"
        }
      },
      "summary": "Get a equipment_profile_zone_exclusion by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c912a71cd38597bd4ba52bea8273e7c149f57f5f9cce2d9b97c8ba4d5e3ca421",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EquipmentProfile": {
              "description": "<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "max_weight": {
                  "description": "What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.",
                  "format": "double",
                  "type": "number"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "weight_reduction_per_level": {
                  "description": "Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.",
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "description",
                "id",
                "is_active",
                "max_weight",
                "mod_when",
                "mod_who",
                "weight_reduction_per_level"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/EquipmentProfile"
          },
          "title": "Array_of_EquipmentProfile",
          "type": "array"
        }
      },
      "summary": "List equipment_profile — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:3214c02e1049ec2a1eb2fa03908be78f75736a4e593b917bf896c0e17170eafc",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_equipment_profile_zone_exclusion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EquipmentProfileZoneExclusion": {
              "description": "One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "equipment_profile_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "putawayzone": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "equipment_profile_id",
                "id",
                "mod_when",
                "mod_who",
                "putawayzone"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/EquipmentProfileZoneExclusion"
          },
          "title": "Array_of_EquipmentProfileZoneExclusion",
          "type": "array"
        }
      },
      "summary": "List equipment_profile_zone_exclusion — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:c33ebcd9577a482bda00e9b58fe01b3d93c008b9107f1075c5c952e36328a89f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": "string"
              },
              "is_active": {
                "type": "boolean"
              },
              "max_weight": {
                "format": "double",
                "type": "number"
              },
              "weight_reduction_per_level": {
                "format": "double",
                "type": "number"
              }
            },
            "title": "EquipmentProfileUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_weight": {
              "description": "What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.",
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "weight_reduction_per_level": {
              "description": "Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "id",
            "is_active",
            "max_weight",
            "mod_when",
            "mod_who",
            "weight_reduction_per_level"
          ],
          "title": "EquipmentProfile",
          "type": "object"
        }
      },
      "summary": "Update equipment limits without changing the profile's stable code.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:89301cf50566e1aa2d3cb720e0f62caa1cf2c48ccb8dcd25facb782cd4f43b7b",
      "x-quark-response-schema-hash": "sha256:16f73953508034a81b682c711eb89c69560733b275e878df833eae14c3027b7d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_equipment_profile_zone_exclusion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "putawayzone": {
                "type": "string"
              }
            },
            "title": "EquipmentProfileZoneExclusionUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "equipment_profile_id",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone"
          ],
          "title": "EquipmentProfileZoneExclusion",
          "type": "object"
        }
      },
      "summary": "Move an equipment-profile exclusion to another zone; null/profile changes are rejected.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:822d413e2341459eb8edecff5c33cafaaa2f622ee96d99f675d543f9330ff010",
      "x-quark-response-schema-hash": "sha256:c912a71cd38597bd4ba52bea8273e7c149f57f5f9cce2d9b97c8ba4d5e3ca421",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "<Strong>Equipment profile</Strong> — the machine an operator drives, how much it lifts, and (through [`EquipmentProfileZoneExclusion`]) the putaway zones it cannot enter (task-manager pass 2, step 3, `docs/superpowers/specs/2026-08-27-work-areas-operator-profile-design.md` §2.3). An operator points here through `operator.equipment_profile_id`; no profile means on foot.\n\nStep 5 narrows an operator's zones by its exclusions; its weights limit which tasks dispatch hands them ([`LiftCapacity`]).",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_weight": {
              "description": "What the machine lifts at ground level; `0` = no limit, the putaway engine's convention for every capacity column.",
              "format": "double",
              "type": "number"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "weight_reduction_per_level": {
              "description": "Lost per location level: up there the machine lifts `max_weight - weight_reduction_per_level * location.level`.",
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "description",
            "id",
            "is_active",
            "max_weight",
            "mod_when",
            "mod_who",
            "weight_reduction_per_level"
          ],
          "title": "EquipmentProfile",
          "type": "object"
        }
      },
      "summary": "Delete a equipment_profile by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:16f73953508034a81b682c711eb89c69560733b275e878df833eae14c3027b7d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_equipment_profile_zone_exclusion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "One putaway zone the profile's machine may NOT enter. Exclusions, not permissions (spec §2.4): a zone nobody listed is open to the whole fleet.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "equipment_profile_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "putawayzone": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "equipment_profile_id",
            "id",
            "mod_when",
            "mod_who",
            "putawayzone"
          ],
          "title": "EquipmentProfileZoneExclusion",
          "type": "object"
        }
      },
      "summary": "Delete a equipment_profile_zone_exclusion by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c912a71cd38597bd4ba52bea8273e7c149f57f5f9cce2d9b97c8ba4d5e3ca421",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple equipment_profile by IDs — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_equipment_profile_zone_exclusion",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple equipment_profile_zone_exclusion by IDs — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_equipment_profile",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count equipment_profile — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "equipment_profile",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_operator",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "equipment_profile_id": {
              "description": "The machine this operator drives (`equipment_profile`, wms-app 320); `None` = on foot. Set by hand — `sync_from_enterprise` writes only the three columns it projects and never touches this one.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "description": "Equals `enterprise.user.id` — see the module doc comment.",
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "synced_at": {
              "type": "string"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "synced_at",
            "username"
          ],
          "title": "Operator",
          "type": "object"
        }
      },
      "summary": "Get a operator by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:07cf47cad1b574d0b9d50041767b504a9fb8b169dcd36aaaeb625db1be102e55",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_operator",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Operator": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "equipment_profile_id": {
                  "description": "The machine this operator drives (`equipment_profile`, wms-app 320); `None` = on foot. Set by hand — `sync_from_enterprise` writes only the three columns it projects and never touches this one.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "full_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Equals `enterprise.user.id` — see the module doc comment.",
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "synced_at": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "is_active",
                "mod_when",
                "mod_who",
                "synced_at",
                "username"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/Operator"
          },
          "title": "Array_of_Operator",
          "type": "array"
        }
      },
      "summary": "List operator — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:db97547618977d2a6fa8c2dc96f8992ba6fea3450e54f125cc0cba6c690aa970",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_operator",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count operator — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_operator",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "What a PERSON may change on an operator: the equipment profile, nothing else. `username`, `full_name` and `is_active` belong to the sync job (`sync_from_enterprise`), which would overwrite a hand edit on its next pass — so they are not fields here, and no payload can reach them.",
            "properties": {
              "equipment_profile_id": {
                "description": "`None` leaves it alone; an explicit JSON `null` clears it (on foot) — see [`OPERATOR_CLEARABLE_COLUMNS`].",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "title": "OperatorForUpdate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "equipment_profile_id": {
              "description": "The machine this operator drives (`equipment_profile`, wms-app 320); `None` = on foot. Set by hand — `sync_from_enterprise` writes only the three columns it projects and never touches this one.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "full_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "description": "Equals `enterprise.user.id` — see the module doc comment.",
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "synced_at": {
              "type": "string"
            },
            "username": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "synced_at",
            "username"
          ],
          "title": "Operator",
          "type": "object"
        }
      },
      "summary": "Update an operator's equipment profile; an explicit JSON null clears it (the operator is on foot). Login, name and active come from the users sync and are not writable here.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c1c22f01b61991eaec0b7db1db9555fdcd63d706425e3a5dcb5d181669e2d02e",
      "x-quark-response-schema-hash": "sha256:07cf47cad1b574d0b9d50041767b504a9fb8b169dcd36aaaeb625db1be102e55",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "sync_operators",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "`sync_operators` takes nothing: the warehouse is the request context's.",
            "title": "SyncOperatorsInput",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "What one Sync press did to this warehouse's operator list.",
          "properties": {
            "deactivated": {
              "description": "Operators whose user lost RF login, went inactive or left the warehouse — deactivated, never deleted (`task.assignee` refers to them).",
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            },
            "upserted": {
              "description": "Operators created, or refreshed from a user whose login, name or active state had changed.",
              "format": "uint64",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "deactivated",
            "upserted"
          ],
          "title": "SyncOperatorsResult",
          "type": "object"
        }
      },
      "summary": "Sync this warehouse's operators from its users now (the same projection the 5-minute background sync runs). The warehouse is the request context's.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:31e01f9cf44855006059b9ec16365e76800cefaf948908d83b2e00e116e2cbc5",
      "x-quark-requires-idempotency": false,
      "x-quark-response-schema-hash": "sha256:8c201e3f688b0b267ca34527857b8357fc862be75ca93d79d3cfbcbe2d6c1a24",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "TaskType": {
                "oneOf": [
                  {
                    "enum": [
                      "Pick",
                      "Putaway",
                      "Replenish",
                      "Move"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                    "enum": [
                      "Count"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "properties": {
              "operator_id": {
                "format": "int64",
                "type": "integer"
              },
              "pick_execution_enabled": {
                "default": null,
                "description": "The Pick rollout gate, as the grant is created. `None` leaves the column to its default (off). It must be accepted HERE, not only on update: the permission screen offers the checkbox on New, and a create struct without the field let serde drop a ticked box silently — the grant was stored with Pick Execution off while the screen said it was saved.",
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "task_type": {
                "$ref": "#/definitions/TaskType"
              },
              "work_area_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "operator_id",
              "task_type",
              "work_area_id"
            ],
            "title": "OperatorTaskPermissionForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "operator_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_execution_enabled": {
              "description": "Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.",
              "type": "boolean"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "operator_id",
            "pick_execution_enabled",
            "task_type",
            "work_area_id"
          ],
          "title": "OperatorTaskPermission",
          "type": "object"
        }
      },
      "summary": "Create a new operator_task_permission — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:27f7b77cae23300c4c02b8ebcfc9e3e65dbd4745a0fdcd9d8c2f878a2058f832",
      "x-quark-response-schema-hash": "sha256:5b1e03b79b550b61d122a8e2c854a10c6e4b09ec3ad239526b22fdb151e575c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "operator_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_execution_enabled": {
              "description": "Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.",
              "type": "boolean"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "operator_id",
            "pick_execution_enabled",
            "task_type",
            "work_area_id"
          ],
          "title": "OperatorTaskPermission",
          "type": "object"
        }
      },
      "summary": "Get a operator_task_permission by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5b1e03b79b550b61d122a8e2c854a10c6e4b09ec3ad239526b22fdb151e575c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OperatorTaskPermission": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "operator_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "pick_execution_enabled": {
                  "description": "Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.",
                  "type": "boolean"
                },
                "task_type": {
                  "$ref": "#/definitions/TaskType"
                },
                "work_area_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "mod_when",
                "mod_who",
                "operator_id",
                "pick_execution_enabled",
                "task_type",
                "work_area_id"
              ],
              "type": "object"
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/OperatorTaskPermission"
          },
          "title": "Array_of_OperatorTaskPermission",
          "type": "array"
        }
      },
      "summary": "List operator_task_permission — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:0bdf865211b0e9d42b8eeb34429fd641044b78af22e35df129039a7457f1a8a1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count operator_task_permission — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "`operator_id` is the immutable owner of the permission row. Task type and work area remain editable, but neither can be cleared.",
            "properties": {
              "pick_execution_enabled": {
                "type": "boolean"
              },
              "task_type": {
                "oneOf": [
                  {
                    "enum": [
                      "Pick",
                      "Putaway",
                      "Replenish",
                      "Move"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                    "enum": [
                      "Count"
                    ],
                    "type": "string"
                  }
                ]
              },
              "work_area_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "title": "OperatorTaskPermissionUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "operator_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_execution_enabled": {
              "description": "Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.",
              "type": "boolean"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "operator_id",
            "pick_execution_enabled",
            "task_type",
            "work_area_id"
          ],
          "title": "OperatorTaskPermission",
          "type": "object"
        }
      },
      "summary": "Update a task permission's type, work area, or dedicated Pick rollout flag; null and operator changes are rejected.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:9873c6245ecd972f6f1959e75ba791abecfcb6d714f8b0906ad4c6a59da6b212",
      "x-quark-response-schema-hash": "sha256:5b1e03b79b550b61d122a8e2c854a10c6e4b09ec3ad239526b22fdb151e575c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "operator_id": {
              "format": "int64",
              "type": "integer"
            },
            "pick_execution_enabled": {
              "description": "Rollout gate for the dedicated source-owned Pick RF flow. The row is still the generic permission; this flag only controls new Pick issue.",
              "type": "boolean"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "work_area_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "mod_when",
            "mod_who",
            "operator_id",
            "pick_execution_enabled",
            "task_type",
            "work_area_id"
          ],
          "title": "OperatorTaskPermission",
          "type": "object"
        }
      },
      "summary": "Delete a operator_task_permission by ID — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5b1e03b79b550b61d122a8e2c854a10c6e4b09ec3ad239526b22fdb151e575c8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_operator_task_permission",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple operator_task_permission by IDs — CRUD.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "operator",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_task",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Get a task by id.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "task",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_task",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Task": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "batch_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "claimed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "ended_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "escalated_at": {
                  "default": null,
                  "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "heartbeat_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lease_expires_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_done": {
                  "format": "double",
                  "type": "number"
                },
                "refused_count": {
                  "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
                  "format": "int32",
                  "type": "integer"
                },
                "return_kind": {
                  "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skip_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "source_type": {
                  "type": "string"
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/TaskStatus"
                },
                "task_type": {
                  "$ref": "#/definitions/TaskType"
                },
                "to_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "weight": {
                  "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "workstation_completed_by": {
                  "default": null,
                  "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "priority",
                "qty_done",
                "refused_count",
                "source_id",
                "source_type",
                "status",
                "task_type",
                "version"
              ],
              "type": "object"
            },
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/Task"
          },
          "title": "Array_of_Task",
          "type": "array"
        }
      },
      "summary": "List tasks, optionally filtered.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "task",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:33de95e105cf870d9dc744ba3aec3ca8501b9b428b6d0f0dea1cc19e7da92575",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_task",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count tasks, optionally filtered.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "task",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_claim",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "TaskType": {
                "oneOf": [
                  {
                    "enum": [
                      "Pick",
                      "Putaway",
                      "Replenish",
                      "Move"
                    ],
                    "type": "string"
                  },
                  {
                    "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                    "enum": [
                      "Count"
                    ],
                    "type": "string"
                  }
                ]
              }
            },
            "description": "`task_claim` wire command. No `assignee` field — see above.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_type": {
                "$ref": "#/definitions/TaskType"
              },
              "work_area_id": {
                "default": null,
                "description": "The work area the terminal is set to, when it names one (spec §4.1): only that area's tasks are handed out. Absent — the MVP's call, still lawful — means \"across every work area I hold this right in\". Optional on the wire, so no existing caller breaks.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "task_type"
            ],
            "title": "ClaimTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "Task": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "assignee": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "batch_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "claimed_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "ended_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "escalated_at": {
                  "default": null,
                  "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "heartbeat_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lease_expires_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "priority": {
                  "format": "int16",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "qty_done": {
                  "format": "double",
                  "type": "number"
                },
                "refused_count": {
                  "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
                  "format": "int32",
                  "type": "integer"
                },
                "return_kind": {
                  "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "short_reason_note": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skip_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skipped_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "source_type": {
                  "type": "string"
                },
                "started_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/definitions/TaskStatus"
                },
                "task_type": {
                  "$ref": "#/definitions/TaskType"
                },
                "to_location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "format": "int32",
                  "type": "integer"
                },
                "wave_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "weight": {
                  "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "workstation_completed_by": {
                  "default": null,
                  "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "created_at",
                "id",
                "mod_when",
                "mod_who",
                "priority",
                "qty_done",
                "refused_count",
                "source_id",
                "source_type",
                "status",
                "task_type",
                "version"
              ],
              "type": "object"
            },
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "`task: None` is a normal answer (pool empty for this type), not an error — mirrors `claim_one`'s own `Result<Option<Task>, TaskError>`.",
          "properties": {
            "task": {
              "anyOf": [
                {
                  "$ref": "#/definitions/Task"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "title": "ClaimTaskResult",
          "type": "object"
        }
      },
      "summary": "Claim work: your own unfinished task if you have one, else one from the pool.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:18182aa8480cb8e5d63e92af5bf0f0075b046bf09def91fcb38001afe5b4bf1e",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:29ff432e9623f83a9ef027eed50a13d75291e46ec7af0a1a30d85ee49ce32e25",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_heartbeat",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire command. Retrying one request replays its first result; a subsequent heartbeat uses a new key and therefore extends the lease again.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "task_id"
            ],
            "title": "HeartbeatTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Renew the holder's live task lease without reporting quantity progress.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:216096718f12fbfba5550dd0a06d53a6c386cf02044d51e29c87533ad755474f",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_report_progress",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "`task_report_progress` wire command.",
            "properties": {
              "delta": {
                "format": "double",
                "type": "number"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "delta",
              "idempotency_key",
              "task_id"
            ],
            "title": "ReportTaskProgress",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Report progress (qty done) on a claimed task.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f03b20b6a23823c5dc5a6fdd2be06b4d07069f7a364fe24d4c179c6ab742b421",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_finish",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "`task_finish` wire command.",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "short_reason": {
                "default": null,
                "description": "Only persisted when `finish_task` decides the task is `Shorted` — a reason posted for a task that turns out `Completed` is silently dropped, mirroring `finish_task`'s own contract (the terminal status is the aggregate's call, not the caller's).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "task_id"
            ],
            "title": "FinishTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Finish a claimed task (Completed or Shorted, decided by qty done).",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fd2a794c2826e257d2a01caa0b8de1c0b500bb294fd41da6eb4b5a899cf9fa53",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_skip",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "`task_skip` wire command.",
            "oneOf": [
              {
                "description": "Оператор ОТКАЗАЛСЯ: «эту паллету я уже поставил, дай другую».\n\nЗадача уходит в пул с отметкой и на время остывания не выдаётся НИКОМУ — иначе следующий запрос вернул бы её ему же, и он оказался бы в цикле.",
                "properties": {
                  "kind": {
                    "enum": [
                      "Refused"
                    ],
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "reason"
                ],
                "type": "object"
              },
              {
                "description": "Оператор СДАЛ задачу: перерыв, конец смены.\n\nОн ни от чего не отказывался, поэтому ни причины, ни отметки: строка возвращается в пул чистой и доступна любому немедленно. Прятать её на десять минут значило бы наказывать склад за чужой обед — и именно так это и работало, пока возврат был один на оба случая.",
                "properties": {
                  "kind": {
                    "enum": [
                      "HandedBack"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "kind"
                ],
                "type": "object"
              }
            ],
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "work_area_id": {
                "default": null,
                "description": "Участок, на который настроен терминал (шаг 6): из него берётся `allow_task_release`. Необязателен — прежний вызов законен и значит «вне объявленного участка», ровно как у `ClaimTask`.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "idempotency_key",
              "task_id"
            ],
            "title": "SkipTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Give a claimed task back: refuse it (cools down) or hand it back (available at once).",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fd56d76f2286df9df43351c2c55846d78c63de7dd3356cecdd9b34234106ad25",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_reassign",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "`task_reassign` wire command — one of two `stateful_command`s in this crate (`task_force_release`, below, is the other).\n\n`expected_task_version` lives in `data` (this struct), not `meta.expected_version`: ADR-058's typed-OCC convention colocates the version with the entity it guards (`.claude/rules/api-versioning-and-idempotency.md`), and the default `payload_for_hash` already strips every `expected_*_version` field from the idempotency hash, so a retry after a version refresh still dedupes.",
            "properties": {
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              },
              "to": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_task_version",
              "idempotency_key",
              "task_id",
              "to"
            ],
            "title": "ReassignTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Supervisor reassigns a task to another operator.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4afc31e91380c8fad606305c4ed11d3d7da4659f613916659c0163ffbc1370b9",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "task_force_release",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "`task_force_release` wire command — the supervisor band's counterpart to `ReassignTask`. `expected_task_version` lives in `data` (this struct), same ADR-058 convention as `ReassignTask` above.",
            "properties": {
              "expected_task_version": {
                "format": "int32",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "expected_task_version",
              "idempotency_key",
              "reason",
              "task_id"
            ],
            "title": "ForceReleaseTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "TaskStatus": {
              "oneOf": [
                {
                  "enum": [
                    "InProgress",
                    "Completed",
                    "Shorted"
                  ],
                  "type": "string"
                },
                {
                  "description": "Sitting in the dispatch pool. Dispatch claims it; source-owned manual Pick completion may also finish it together with physical inventory.",
                  "enum": [
                    "Created"
                  ],
                  "type": "string"
                },
                {
                  "description": "Handed to an operator by `claim_next`. Only the methods in [`TaskBmc`]'s \"dispatch write surface\" move a task out of it — there is no generic `update` on this BMC, by the rule stated there.",
                  "enum": [
                    "Assigned"
                  ],
                  "type": "string"
                },
                {
                  "description": "**Declared, and written by nothing.** Its one writer was `TaskBmc::cancel_in_work`, deleted on 2026-09-04 when the owner ruled that a task whose pick is removed is removed too, whatever state it is in (see `TaskBmc::delete_for_removed_source`). The variant stays because spec §9 declares a status set up front — do not go hunting for the code that writes it.",
                  "enum": [
                    "Cancelled"
                  ],
                  "type": "string"
                }
              ]
            },
            "TaskType": {
              "oneOf": [
                {
                  "enum": [
                    "Pick",
                    "Putaway",
                    "Replenish",
                    "Move"
                  ],
                  "type": "string"
                },
                {
                  "description": "One location of an inventory count, one attempt (source `inventory_count_task`, wms-app 062). No quantity: the count is blind.",
                  "enum": [
                    "Count"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "assignee": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "batch_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "claimed_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "container_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "created_at": {
              "type": "string"
            },
            "ended_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "escalated_at": {
              "default": null,
              "description": "Когда задача ушла супервайзеру: отказов набралось до порога `TASK_SKIP_ESCALATE_AFTER`. Пока стоит — выдача её не отдаёт никому.",
              "type": [
                "string",
                "null"
              ]
            },
            "from_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "heartbeat_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "lease_expires_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "priority": {
              "format": "int16",
              "type": "integer"
            },
            "qty": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "qty_done": {
              "format": "double",
              "type": "number"
            },
            "refused_count": {
              "description": "Сколько раз от задачи ОТКАЗАЛИСЬ (сдача в счёт не идёт). Растёт в [`TaskBmc::release_to_pool`], обнуляется только переназначением супервайзером ([`TaskBmc::reassign_cas`]) — миграция 307.",
              "format": "int32",
              "type": "integer"
            },
            "return_kind": {
              "description": "КАК задача в последний раз вернулась в пул: `Refused` (отказ оператора), `HandedBack` (сдача), `Seized` (изъял супервайзер), `Expired` (истекла аренда). `skip_reason` пишут все трое, у кого есть причина, и без этого поля доска выдавала бы причину изъятия за причину отказа (миграция 308). Снимается вместе с `skip_reason`, когда задачу снова берут.",
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "short_reason_note": {
              "type": [
                "string",
                "null"
              ]
            },
            "skip_reason": {
              "type": [
                "string",
                "null"
              ]
            },
            "skipped_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "sku_code": {
              "type": [
                "string",
                "null"
              ]
            },
            "source_id": {
              "format": "int64",
              "type": "integer"
            },
            "source_type": {
              "type": "string"
            },
            "started_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "$ref": "#/definitions/TaskStatus"
            },
            "task_type": {
              "$ref": "#/definitions/TaskType"
            },
            "to_location": {
              "type": [
                "string",
                "null"
              ]
            },
            "uom": {
              "type": [
                "string",
                "null"
              ]
            },
            "version": {
              "format": "int32",
              "type": "integer"
            },
            "wave_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "weight": {
              "description": "Вес запаса задачи на момент её создания — единственная формула веса (`pack::StockWeights`), скопированная, как и `qty` (wms-app 340).\n\n`None` — взвесить было нечем (`PhysicalMetric::Unknown`): ни у базовой строки упаковки, ни у карточки товара веса нет. Такая задача проходит любой предел грузоподъёмности — проверка, которой нечего сравнивать, не имеет права отказывать (wms-app 341, спека физических измерений §9.2). Ноль больше не значит «неизвестно»: он сравнивается как число.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "workstation_completed_by": {
              "default": null,
              "description": "Real web executor of source-owned workstation Pick completion. A pooled task can finish without pretending it had an RF assignment.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "created_at",
            "id",
            "mod_when",
            "mod_who",
            "priority",
            "qty_done",
            "refused_count",
            "source_id",
            "source_type",
            "status",
            "task_type",
            "version"
          ],
          "title": "Task",
          "type": "object"
        }
      },
      "summary": "Supervisor forcibly returns someone else's claimed task, or an escalated pooled one, to the pool.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateful_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6d65256969f725b0252720eb8a11ecce6c715be511e4184eadb9190a7cb77c2a",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:179fdf25d8ebb6908fddba1f9e80a443f1198202ca1bdc0cde4ef866865ee6fb",
      "x-quark-transaction-readiness": "replace_only",
      "x-quark-versioned-entities": [
        {
          "entity": "task",
          "id_field": "task_id",
          "version_field": "expected_task_version"
        }
      ]
    },
    {
      "name": "task_delete",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "order_id": {
                "format": "int64",
                "type": "integer"
              },
              "task_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "idempotency_key",
              "order_id",
              "task_id"
            ],
            "title": "DeleteTask",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            }
          },
          "properties": {
            "launch_cleared": {
              "description": "Удалена последняя задача заказа, и запуск снят: снова выдать работу — «Release». Тот же флаг и тот же смысл, что у `CancelOrderAllocationResult::launch_cleared`.",
              "type": "boolean"
            },
            "line_status": {
              "$ref": "#/definitions/OrderLineStatus"
            },
            "new_version": {
              "description": "Версия шапки после команды. Эхо прежней, пока шапку не трогали; сдвигается, когда удаление последней задачи сняло запуск (`launch_cleared`) — это запись в шапку от команды пользователя.",
              "format": "int32",
              "type": "integer"
            },
            "order_id": {
              "format": "int64",
              "type": "integer"
            },
            "order_number": {
              "description": "Номер заказа — для сообщения на экране: супервайзер знает заказ по номеру, а не по id.",
              "type": "string"
            },
            "order_status": {
              "allOf": [
                {
                  "$ref": "#/definitions/OrderStatus"
                }
              ],
              "description": "Статус заказа ПОСЛЕ пересчёта в этой же транзакции — экрану не с чего гадать (тот же контракт, что у `DeletePickDetailResult`)."
            },
            "pick_detail_id": {
              "format": "int64",
              "type": "integer"
            },
            "task_id": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "launch_cleared",
            "line_status",
            "new_version",
            "order_id",
            "order_number",
            "order_status",
            "pick_detail_id",
            "task_id"
          ],
          "title": "DeleteTaskResult",
          "type": "object"
        }
      },
      "summary": "Delete a task nobody has claimed; its pick stays reserved.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cb37e201ba8953f090e944539392a0120568f25c62f708714c96891301a4b5ae",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:77f961b8b4b361a4feea11056ef3b19c71e7582c1067436db6a245ccc1ce12a2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "task_delete_many",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              },
              "task_ids": {
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "idempotency_key",
              "task_ids"
            ],
            "title": "DeleteTasks",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "DeleteTaskResult": {
              "properties": {
                "launch_cleared": {
                  "description": "Удалена последняя задача заказа, и запуск снят: снова выдать работу — «Release». Тот же флаг и тот же смысл, что у `CancelOrderAllocationResult::launch_cleared`.",
                  "type": "boolean"
                },
                "line_status": {
                  "$ref": "#/definitions/OrderLineStatus"
                },
                "new_version": {
                  "description": "Версия шапки после команды. Эхо прежней, пока шапку не трогали; сдвигается, когда удаление последней задачи сняло запуск (`launch_cleared`) — это запись в шапку от команды пользователя.",
                  "format": "int32",
                  "type": "integer"
                },
                "order_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "order_number": {
                  "description": "Номер заказа — для сообщения на экране: супервайзер знает заказ по номеру, а не по id.",
                  "type": "string"
                },
                "order_status": {
                  "allOf": [
                    {
                      "$ref": "#/definitions/OrderStatus"
                    }
                  ],
                  "description": "Статус заказа ПОСЛЕ пересчёта в этой же транзакции — экрану не с чего гадать (тот же контракт, что у `DeletePickDetailResult`)."
                },
                "pick_detail_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "launch_cleared",
                "line_status",
                "new_version",
                "order_id",
                "order_number",
                "order_status",
                "pick_detail_id",
                "task_id"
              ],
              "type": "object"
            },
            "OrderLineStatus": {
              "description": "The line's status ladder (migration 285, spec 2026-08-19 §1.2). A line with no reservations is `NotAllocated` — including after an unallocate — so the status honestly answers \"is there stock under this line?\". Variant order matches the Postgres enum's own order, which IS the ladder.\n\nDerived, like the header's: `wms_outbound::domain::shipment_order:: derive_line_status` recomputes it from the counters inside every mutating transaction. The `Released` rung is measured by picks handed to a task (`pick_detail.status = 'Released'`) — `wms_tasks::service::generate:: generate_tasks_for_picks` (task 7) is that writer. On a LAUNCHED order it dispatches, in the SAME transaction, every live pick of the order that does not carry a task yet — not just the ones the current `release` / `Allocate` pass reserved itself, which would forever skip a pick that a pre-launch `Allocate` (spec §3.1) had already reserved before the gate let dispatch happen. So this rung is reached routinely, not merely a future special case of the picking phase.",
              "enum": [
                "NotAllocated",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "OrderStatus": {
              "description": "The header's status ladder (migration 285, spec 2026-08-19 §1.1): `New → Allocated → Released → Picked → Closed`, every working rung with a `Partially` form, `Cancelled` reachable until things are picked. Variant order matches the Postgres enum's own order, which IS the ladder.\n\nStatus is a DERIVED column: the truth lives in the lines' counters and the header's markers (`released_at`/`cancelled_at`/`closed_at`); `wms_outbound::domain::shipment_order::derive_order_status` recomputes it inside every mutating transaction.",
              "enum": [
                "New",
                "PartiallyAllocated",
                "Allocated",
                "PartiallyReleased",
                "Released",
                "PartiallyPicked",
                "Picked",
                "PartiallyShipped",
                "Shipped",
                "Closed",
                "Cancelled"
              ],
              "type": "string"
            },
            "TaskNotDeleted": {
              "properties": {
                "reason": {
                  "type": "string"
                },
                "task_id": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "reason",
                "task_id"
              ],
              "type": "object"
            }
          },
          "properties": {
            "deleted": {
              "description": "Удалённые — в порядке, в каком их прислали, по одному ответу `DeleteTask` на задачу (с заказом, статусами и `launch_cleared`).",
              "items": {
                "$ref": "#/definitions/DeleteTaskResult"
              },
              "type": "array"
            },
            "refused": {
              "description": "Не удалённые — с причиной словами команды.",
              "items": {
                "$ref": "#/definitions/TaskNotDeleted"
              },
              "type": "array"
            }
          },
          "required": [
            "deleted",
            "refused"
          ],
          "title": "DeleteTasksResult",
          "type": "object"
        }
      },
      "summary": "Delete several unclaimed tasks at once; claimed ones are skipped and named.",
      "tags": [
        {
          "name": "tasks"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "tasks",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "task_commands",
      "x-quark-module-class": "domain_command",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f314c37a24095d9f3f0a02fec601bdb6c90c676e21ae058a7fd2c6ab72d1c432",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:a99aa3236f8ff9d328604c5b3a9ae4baaf91ae4cf9d003c25624ec395769af85",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The wire shape of \"create a report\", which still carries a `name`: the report wizard asks its author for one, and that author has no idea labels exist. [`ReportDefinitionBmc::create`] turns it into the report's label.\n\nNo `Fields` derive, unlike the other `ForCreate` structs in this crate: `name` is not a column, so this shape cannot be handed to sea-query at all. [`ReportDefinitionForInsert`] is what gets written.",
            "properties": {
              "category": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "config_json": true,
              "created_via": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "module_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "description": "What the author called the report. Becomes the label's `default_text` — the English source — because that is the only slot a brand-new label has. If the author typed Russian, English now holds Russian for that one report until somebody edits it; the alternative is refusing to create a report until an English name exists, which no wizard asks for.",
                "type": "string"
              },
              "parameters": true,
              "template_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "template_kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tier": {
                "type": "string"
              },
              "version_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "category",
              "code",
              "name",
              "tier"
            ],
            "title": "ReportDefinitionForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "created_via": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "label_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "module_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "parameters": true,
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "template_kind": {
              "type": [
                "string",
                "null"
              ]
            },
            "tier": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "config_json",
            "created_via",
            "id",
            "is_active",
            "label_id",
            "mod_when",
            "mod_who",
            "parameters",
            "tier",
            "version_status"
          ],
          "title": "ReportDefinition",
          "type": "object"
        }
      },
      "summary": "Create a new report_definition — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:963463a94a5bf8255397685cb11f1340640c384485fe04acde2bc908f3eefce6",
      "x-quark-response-schema-hash": "sha256:88b14c4e2667dc27a86f3dd542017e025b91a333f9e5dbc72b7bfc12da54dce7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "created_via": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "label_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "module_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "parameters": true,
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "template_kind": {
              "type": [
                "string",
                "null"
              ]
            },
            "tier": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "config_json",
            "created_via",
            "id",
            "is_active",
            "label_id",
            "mod_when",
            "mod_who",
            "parameters",
            "tier",
            "version_status"
          ],
          "title": "ReportDefinition",
          "type": "object"
        }
      },
      "summary": "Get a report_definition by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:88b14c4e2667dc27a86f3dd542017e025b91a333f9e5dbc72b7bfc12da54dce7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReportDefinition": {
              "description": "A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "category": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "config_json": true,
                "created_via": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "label_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "module_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "parameters": true,
                "template_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "template_kind": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tier": {
                  "type": "string"
                },
                "version_status": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "category",
                "code",
                "config_json",
                "created_via",
                "id",
                "is_active",
                "label_id",
                "mod_when",
                "mod_who",
                "parameters",
                "tier",
                "version_status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReportDefinition"
          },
          "title": "Array_of_ReportDefinition",
          "type": "array"
        }
      },
      "summary": "List report_definition — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:f2a00a5228d2d900e4812d120a2a88eab7953a66b858f3f6cc53862be440910e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "category": {
                "type": "string"
              },
              "config_json": true,
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "module_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "parameters": true,
              "template_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "template_kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tier": {
                "type": "string"
              },
              "version_status": {
                "type": "string"
              }
            },
            "title": "ReportDefinitionUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "created_via": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "label_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "module_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "parameters": true,
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "template_kind": {
              "type": [
                "string",
                "null"
              ]
            },
            "tier": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "config_json",
            "created_via",
            "id",
            "is_active",
            "label_id",
            "mod_when",
            "mod_who",
            "parameters",
            "tier",
            "version_status"
          ],
          "title": "ReportDefinition",
          "type": "object"
        }
      },
      "summary": "Update a report definition; identity/provenance are immutable and nullable links are explicit.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1371798748cdaa36275a6bfb4bc765d9f8a247e5f995a726406a00698766cddf",
      "x-quark-response-schema-hash": "sha256:88b14c4e2667dc27a86f3dd542017e025b91a333f9e5dbc72b7bfc12da54dce7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "A report in the catalogue.\n\nThe user-visible name is NOT here: it is `label_id`, resolved per reader through [`LabelBmc::text`] or, for the album, in that read model's own query so it can sort by what it shows. Migration 242 replaced the Russian `name` column and its unread `name_localized` JSONB with this one FK.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "created_via": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "label_id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "module_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "parameters": true,
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "template_kind": {
              "type": [
                "string",
                "null"
              ]
            },
            "tier": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "config_json",
            "created_via",
            "id",
            "is_active",
            "label_id",
            "mod_when",
            "mod_who",
            "parameters",
            "tier",
            "version_status"
          ],
          "title": "ReportDefinition",
          "type": "object"
        }
      },
      "summary": "Delete a report_definition by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:88b14c4e2667dc27a86f3dd542017e025b91a333f9e5dbc72b7bfc12da54dce7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple report_definition by IDs — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_report_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count report_definition — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "generate_report_data",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Parameters for report generation.",
            "properties": {
              "params": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "report_definition_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "report_definition_id"
            ],
            "title": "GenerateReportParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReportRenderOptions": {
              "properties": {
                "orientation": {
                  "type": "string"
                },
                "paper": {
                  "type": "string"
                }
              },
              "required": [
                "orientation",
                "paper"
              ],
              "type": "object"
            }
          },
          "description": "Result of report data preparation — ready to send to renderer.",
          "properties": {
            "data": true,
            "options": {
              "$ref": "#/definitions/ReportRenderOptions"
            },
            "output_format": {
              "type": "string"
            },
            "template_kind": {
              "type": "string"
            },
            "template_source": {
              "type": "string"
            }
          },
          "required": [
            "data",
            "options",
            "output_format",
            "template_kind",
            "template_source"
          ],
          "title": "ReportRenderData",
          "type": "object"
        }
      },
      "summary": "Generate report render data",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a5fbf6362a5804d7c37aa440223c236ec8f1891d48cb8e0a1e5e532e4b1cb3e8",
      "x-quark-response-schema-hash": "sha256:a4d2044b025c18db1a42c350ce1c587791e7b06bbf9499d217dbf1d61bbce530",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "print_report",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Parameters for report generation.",
            "properties": {
              "params": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "report_definition_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "report_definition_id"
            ],
            "title": "GenerateReportParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "PDF bytes result from renderer.",
          "properties": {
            "bytes": {
              "items": {
                "format": "uint8",
                "minimum": 0.0,
                "type": "integer"
              },
              "type": "array"
            },
            "content_type": {
              "type": "string"
            },
            "filename": {
              "type": "string"
            }
          },
          "required": [
            "bytes",
            "content_type",
            "filename"
          ],
          "title": "ReportPdfResult",
          "type": "object"
        }
      },
      "summary": "Generate report PDF",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a5fbf6362a5804d7c37aa440223c236ec8f1891d48cb8e0a1e5e532e4b1cb3e8",
      "x-quark-response-schema-hash": "sha256:0c5e31282346e9a659e4518075a6f1622e809897592e29f2fe8e5cced2ffa5c6",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "test_dataset",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Parameters for testing a single dataset SQL query.",
            "properties": {
              "limit": {
                "default": 20,
                "format": "int64",
                "type": "integer"
              },
              "param_values": {
                "default": [],
                "description": "Значения для `$1, $2, …` — список ПОЗИЦИОННЫЙ: элемент N это `$N+1`.\n\nЧитается своим десериализатором, потому что до него доезжает уже НОРМАЛИЗОВАННОЕ тело: `app-server/src/web/routes_rpc.rs` схлопывает каждую пустую строку в теле запроса в `null`. Политика верная и общая — оператор, пропустивший необязательное поле, не должен создавать контейнер с пустым `code`, — но здесь она встречается с полем, где пустое значение ЗАКОННО: параметр отчёта, который человек не заполнил, это пустая строка, а не отсутствие элемента. Выбросить элемент нельзя тем более: список позиционный, и пропажа сдвинула бы все следующие `$N`.\n\nСм. [`param_values_from_wire`].",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "sql": {
                "type": "string"
              }
            },
            "required": [
              "sql"
            ],
            "title": "TestDatasetParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Result of a dataset test — sample rows.",
          "properties": {
            "row_count": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "rows": {
              "items": true,
              "type": "array"
            }
          },
          "required": [
            "row_count",
            "rows"
          ],
          "title": "TestDatasetResult",
          "type": "object"
        }
      },
      "summary": "Test dataset SQL query",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:fc0858d3767468c934b11beb1ef955602afc874253b9982838a5c7adb5b34768",
      "x-quark-response-schema-hash": "sha256:c593dfb60408a0f322e88f73364318541c796e116209546d4083f458d86ee6ea",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_report_album",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReportAlbumRow": {
              "properties": {
                "category": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_favorite": {
                  "type": "boolean"
                },
                "last_run_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "description": "The report's name in the locale the album was asked for, already resolved: a translation if there is one, the English `default_text` otherwise. The album screen renders this string as-is.",
                  "type": "string"
                },
                "origin": {
                  "description": "`industry` for seeded/migrated definitions, `custom` for ones built here.",
                  "type": "string"
                },
                "parameters": true,
                "regulation": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "runs_12m": {
                  "format": "int64",
                  "type": "integer"
                },
                "runs_monthly": {
                  "description": "Exactly `SPARKLINE_MONTHS` integers, oldest month first."
                },
                "template_kind": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tier": {
                  "type": "string"
                }
              },
              "required": [
                "category",
                "code",
                "id",
                "is_favorite",
                "name",
                "origin",
                "parameters",
                "runs_12m",
                "runs_monthly",
                "tier"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReportAlbumRow"
          },
          "title": "Array_of_ReportAlbumRow",
          "type": "array"
        }
      },
      "summary": "List reports for the album screen",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9e60f344ca366b16ab510b659924480fc5da15c30b8745b9307785fa26ce8d6c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_report_album",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_favorite": {
              "type": "boolean"
            },
            "last_run_at": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "description": "The report's name in the locale the album was asked for, already resolved: a translation if there is one, the English `default_text` otherwise. The album screen renders this string as-is.",
              "type": "string"
            },
            "origin": {
              "description": "`industry` for seeded/migrated definitions, `custom` for ones built here.",
              "type": "string"
            },
            "parameters": true,
            "regulation": {
              "type": [
                "string",
                "null"
              ]
            },
            "runs_12m": {
              "format": "int64",
              "type": "integer"
            },
            "runs_monthly": {
              "description": "Exactly `SPARKLINE_MONTHS` integers, oldest month first."
            },
            "template_kind": {
              "type": [
                "string",
                "null"
              ]
            },
            "tier": {
              "type": "string"
            }
          },
          "required": [
            "category",
            "code",
            "id",
            "is_favorite",
            "name",
            "origin",
            "parameters",
            "runs_12m",
            "runs_monthly",
            "tier"
          ],
          "title": "ReportAlbumRow",
          "type": "object"
        }
      },
      "summary": "Get one report for the album/wizard",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:20bd76069ef2b1e75253a05294228deca398865d5bfe70baee24ff30dcdca80d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "set_report_favorite",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "meta",
          "required": false,
          "schema": {
            "properties": {
              "acknowledged_overrides": {
                "items": {
                  "oneOf": [
                    {
                      "description": "Bare override code (receipt / dimensionless).",
                      "type": "integer"
                    },
                    {
                      "description": "Move override pair (dimension code + hold-code subject).",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "type": "array"
              },
              "expected_version": {
                "format": "int64",
                "type": "integer"
              },
              "idempotency_key": {
                "format": "uuid",
                "type": "string"
              }
            },
            "type": "object"
          },
          "summary": "Control-plane envelope (idempotency_key, expected_version, acknowledged_overrides — bare integer codes for receipt, or {code, subject} override pairs for move). Optional fields per ADR-058 D-3 semantic gating."
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Wire shape for `set_report_favorite`. `favorite` is the end state the caller wants, not a flip — that is what makes the command idempotent.",
            "properties": {
              "favorite": {
                "description": "The end state the caller wants, not a flip.",
                "type": "boolean"
              },
              "report_definition_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "favorite",
              "report_definition_id"
            ],
            "title": "SetFavoriteData",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "favorite": {
              "type": "boolean"
            }
          },
          "required": [
            "favorite"
          ],
          "title": "SetFavoriteResult",
          "type": "object"
        }
      },
      "summary": "Star or unstar a report for the calling user",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "report_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:74f495f2c3f5e97c4b7184d7fa29749f9fc9a0f93a232689a92448efef182b41",
      "x-quark-requires-idempotency": true,
      "x-quark-response-schema-hash": "sha256:c279abe52e620d98bf46527272eebc87a99d8403031265cb6d8b90f047f095ab",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "locale_default": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "orientation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "paper": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "type": "string"
              },
              "version_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "kind",
              "name",
              "source"
            ],
            "title": "ReportTemplateForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "kind": {
              "type": "string"
            },
            "locale_default": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "orientation": {
              "type": [
                "string",
                "null"
              ]
            },
            "paper": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "kind",
            "mod_when",
            "mod_who",
            "name",
            "source",
            "version_status"
          ],
          "title": "ReportTemplate",
          "type": "object"
        }
      },
      "summary": "Create a new report_template — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:55934253ca6538578867b78b53d20060d653450fc16614faa3e5b07652fbcc68",
      "x-quark-response-schema-hash": "sha256:66041bae56bc1bc721d383157765ecce5ab9dddc33d9805220475ed05fc4df60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "kind": {
              "type": "string"
            },
            "locale_default": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "orientation": {
              "type": [
                "string",
                "null"
              ]
            },
            "paper": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "kind",
            "mod_when",
            "mod_who",
            "name",
            "source",
            "version_status"
          ],
          "title": "ReportTemplate",
          "type": "object"
        }
      },
      "summary": "Get a report_template by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:66041bae56bc1bc721d383157765ecce5ab9dddc33d9805220475ed05fc4df60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ReportTemplate": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "kind": {
                  "type": "string"
                },
                "locale_default": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "orientation": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "paper": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": "string"
                },
                "version_status": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "kind",
                "mod_when",
                "mod_who",
                "name",
                "source",
                "version_status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ReportTemplate"
          },
          "title": "Array_of_ReportTemplate",
          "type": "array"
        }
      },
      "summary": "List report_template — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:c6860d8a2dbf6f8f88a0cf1a07b83bc600081d89d4f3e4e6a332f2c02bc333b0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "kind": {
                "type": "string"
              },
              "locale_default": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "orientation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "paper": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "type": "string"
              },
              "version_status": {
                "type": "string"
              }
            },
            "title": "ReportTemplateUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "kind": {
              "type": "string"
            },
            "locale_default": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "orientation": {
              "type": [
                "string",
                "null"
              ]
            },
            "paper": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "kind",
            "mod_when",
            "mod_who",
            "name",
            "source",
            "version_status"
          ],
          "title": "ReportTemplate",
          "type": "object"
        }
      },
      "summary": "Update a report template without changing its stable code.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a3df205989828a788f175567909aec5ef38adde865c31a8ee45948972fb78924",
      "x-quark-response-schema-hash": "sha256:66041bae56bc1bc721d383157765ecce5ab9dddc33d9805220475ed05fc4df60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "kind": {
              "type": "string"
            },
            "locale_default": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "orientation": {
              "type": [
                "string",
                "null"
              ]
            },
            "paper": {
              "type": [
                "string",
                "null"
              ]
            },
            "source": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "kind",
            "mod_when",
            "mod_who",
            "name",
            "source",
            "version_status"
          ],
          "title": "ReportTemplate",
          "type": "object"
        }
      },
      "summary": "Delete a report_template by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:66041bae56bc1bc721d383157765ecce5ab9dddc33d9805220475ed05fc4df60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple report_template by IDs — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_report_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count report_template — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "report_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "category": {
                "type": "string"
              },
              "code": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dpi": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "height_mm": {
                "format": "double",
                "type": "number"
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "template_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "width_mm": {
                "format": "double",
                "type": "number"
              }
            },
            "required": [
              "category",
              "code",
              "height_mm",
              "name",
              "width_mm"
            ],
            "title": "LabelDefinitionForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "dpi": {
              "format": "int32",
              "type": "integer"
            },
            "height_mm": {
              "format": "double",
              "type": "number"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "width_mm": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "dpi",
            "height_mm",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "name",
            "width_mm"
          ],
          "title": "LabelDefinition",
          "type": "object"
        }
      },
      "summary": "Create a new label_definition — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:7f689b8982048d4365ed4bbb09f54855220459c2dacc315f37d1aced54338f4c",
      "x-quark-response-schema-hash": "sha256:392897804ffdb9d944f77ab23ddf6d49fa7e05c8e990f42023b8d8c3c8fab6d1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "dpi": {
              "format": "int32",
              "type": "integer"
            },
            "height_mm": {
              "format": "double",
              "type": "number"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "width_mm": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "dpi",
            "height_mm",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "name",
            "width_mm"
          ],
          "title": "LabelDefinition",
          "type": "object"
        }
      },
      "summary": "Get a label_definition by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:392897804ffdb9d944f77ab23ddf6d49fa7e05c8e990f42023b8d8c3c8fab6d1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LabelDefinition": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "category": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dpi": {
                  "format": "int32",
                  "type": "integer"
                },
                "height_mm": {
                  "format": "double",
                  "type": "number"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "template_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "width_mm": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "category",
                "code",
                "dpi",
                "height_mm",
                "id",
                "is_active",
                "mod_when",
                "mod_who",
                "name",
                "width_mm"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LabelDefinition"
          },
          "title": "Array_of_LabelDefinition",
          "type": "array"
        }
      },
      "summary": "List label_definition — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7876d94675f0fed5265b39b74124bf9ce60d96d471d7e3bdec9f929172276b60",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "category": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dpi": {
                "format": "int32",
                "type": "integer"
              },
              "height_mm": {
                "format": "double",
                "type": "number"
              },
              "is_active": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "template_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "width_mm": {
                "format": "double",
                "type": "number"
              }
            },
            "title": "LabelDefinitionUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "dpi": {
              "format": "int32",
              "type": "integer"
            },
            "height_mm": {
              "format": "double",
              "type": "number"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "width_mm": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "dpi",
            "height_mm",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "name",
            "width_mm"
          ],
          "title": "LabelDefinition",
          "type": "object"
        }
      },
      "summary": "Update a label definition; stable code is immutable and nullable links are explicit.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5fa34333d7bd224f35123cad99df5490961b1d90c3bc48d65423803830d6d7a5",
      "x-quark-response-schema-hash": "sha256:392897804ffdb9d944f77ab23ddf6d49fa7e05c8e990f42023b8d8c3c8fab6d1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "dpi": {
              "format": "int32",
              "type": "integer"
            },
            "height_mm": {
              "format": "double",
              "type": "number"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "template_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "width_mm": {
              "format": "double",
              "type": "number"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "dpi",
            "height_mm",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "name",
            "width_mm"
          ],
          "title": "LabelDefinition",
          "type": "object"
        }
      },
      "summary": "Delete a label_definition by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:392897804ffdb9d944f77ab23ddf6d49fa7e05c8e990f42023b8d8c3c8fab6d1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple label_definition by IDs — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_label_definition",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count label_definition — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "generate_label_data",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "data": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "label_code": {
                "type": "string"
              }
            },
            "required": [
              "data",
              "label_code"
            ],
            "title": "GenerateLabelParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "config": true,
            "data": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "label_name": {
              "type": "string"
            },
            "output_format": {
              "type": "string"
            },
            "renderer_url": {
              "description": "The label renderer URL for this deployment. Left empty by the pure data-resolution service; the RPC handler fills it from the `LABEL_RENDERER_URL` system setting (F43 — one source of truth, so the on-screen preview renders against the same renderer as the printer path instead of the web-ui's own env var).",
              "type": "string"
            }
          },
          "required": [
            "config",
            "data",
            "label_name",
            "output_format",
            "renderer_url"
          ],
          "title": "LabelRenderData",
          "type": "object"
        }
      },
      "summary": "Generate label render data",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c5471a2682e73c50a9d47108204b18c8e3076908c01cbb8eab3b53953d9da5cb",
      "x-quark-response-schema-hash": "sha256:a2b6624f38341be2ee44faf13219c9bad3c7d7a8ae6b593ec5d10df41e3a0b25",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "print_label",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "data": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "label_code": {
                "type": "string"
              }
            },
            "required": [
              "data",
              "label_code"
            ],
            "title": "GenerateLabelParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "ZPL bytes result from renderer.",
          "properties": {
            "label_name": {
              "type": "string"
            },
            "zpl_bytes": {
              "items": {
                "format": "uint8",
                "minimum": 0.0,
                "type": "integer"
              },
              "type": "array"
            }
          },
          "required": [
            "label_name",
            "zpl_bytes"
          ],
          "title": "LabelPrintResult",
          "type": "object"
        }
      },
      "summary": "Generate label ZPL for printing",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c5471a2682e73c50a9d47108204b18c8e3076908c01cbb8eab3b53953d9da5cb",
      "x-quark-response-schema-hash": "sha256:01910506fff004dbb7dd661ace7075b906adeb26d1ec33e3b04edc5d627f64f3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "send_label_to_printer",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "Parameters for sending a label directly to a printer.",
            "properties": {
              "data": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "label_code": {
                "type": "string"
              },
              "printer_host": {
                "type": "string"
              },
              "printer_port": {
                "default": 9100,
                "format": "uint16",
                "minimum": 0.0,
                "type": "integer"
              }
            },
            "required": [
              "data",
              "label_code",
              "printer_host"
            ],
            "title": "SendLabelParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Result of sending a label to a printer.",
          "properties": {
            "bytes_sent": {
              "format": "uint",
              "minimum": 0.0,
              "type": "integer"
            },
            "label_name": {
              "type": "string"
            }
          },
          "required": [
            "bytes_sent",
            "label_name"
          ],
          "title": "LabelSendResult",
          "type": "object"
        }
      },
      "summary": "Print label directly to Zebra printer",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "label_definition",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e49a79cee6043d63a7dfd4b548745c177348668ecb0e0a664187a3b0403fabf",
      "x-quark-response-schema-hash": "sha256:f3348e094fb18bcb311c6dcf1fb9f4bd0d7fad838e33c7d891478f965c5cb4cb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "config_json": true,
              "name": {
                "type": "string"
              },
              "version_status": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "name"
            ],
            "title": "LabelTemplateForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "config_json",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "version_status"
          ],
          "title": "LabelTemplate",
          "type": "object"
        }
      },
      "summary": "Create a new label_template — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f704d7e4a817574586ebfefe059e57bf54f0de10d52c891cf3cd4dc715a84d08",
      "x-quark-response-schema-hash": "sha256:c9f5442b0bd4d10e15f9e4907832b05b00f96feaa5517142f900632cab64bcdf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "config_json",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "version_status"
          ],
          "title": "LabelTemplate",
          "type": "object"
        }
      },
      "summary": "Get a label_template by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c9f5442b0bd4d10e15f9e4907832b05b00f96feaa5517142f900632cab64bcdf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "LabelTemplate": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "config_json": true,
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "version_status": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "config_json",
                "id",
                "mod_when",
                "mod_who",
                "name",
                "version_status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/LabelTemplate"
          },
          "title": "Array_of_LabelTemplate",
          "type": "array"
        }
      },
      "summary": "List label_template — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:a458ae28f16f60ece7939937cb92bfbe958f672103b8610c3ea5d779d1292b95",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "config_json": true,
              "name": {
                "type": "string"
              },
              "version_status": {
                "type": "string"
              }
            },
            "title": "LabelTemplateUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "config_json",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "version_status"
          ],
          "title": "LabelTemplate",
          "type": "object"
        }
      },
      "summary": "Update a label template without changing its stable code.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5d6729fb7c3940bbdc5c790ab48d513fc8cca57b105087eaf1f621ea1d8d3d99",
      "x-quark-response-schema-hash": "sha256:c9f5442b0bd4d10e15f9e4907832b05b00f96feaa5517142f900632cab64bcdf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "config_json": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "version_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "config_json",
            "id",
            "mod_when",
            "mod_who",
            "name",
            "version_status"
          ],
          "title": "LabelTemplate",
          "type": "object"
        }
      },
      "summary": "Delete a label_template by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:c9f5442b0bd4d10e15f9e4907832b05b00f96feaa5517142f900632cab64bcdf",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple label_template by IDs — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_label_template",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count label_template — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "label_template",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "is_default": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "label_definition_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "printer_host": {
                "type": "string"
              },
              "printer_model": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "printer_port": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "zone_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "name",
              "printer_host"
            ],
            "title": "PrinterConfigurationForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "label_definition_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "printer_host": {
              "type": "string"
            },
            "printer_model": {
              "type": [
                "string",
                "null"
              ]
            },
            "printer_port": {
              "format": "int32",
              "type": "integer"
            },
            "zone_code": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "name",
            "printer_host",
            "printer_port"
          ],
          "title": "PrinterConfiguration",
          "type": "object"
        }
      },
      "summary": "Create a new printer_configuration — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1acd0353f437ed1efad322ed93eb7fda90e6bbcea1f5579f096136802c6071f5",
      "x-quark-response-schema-hash": "sha256:493bc12a32ea317ebc3cfeaaacc9f612441fcb40e7d6cb45f6962cc07fc01c99",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "label_definition_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "printer_host": {
              "type": "string"
            },
            "printer_model": {
              "type": [
                "string",
                "null"
              ]
            },
            "printer_port": {
              "format": "int32",
              "type": "integer"
            },
            "zone_code": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "name",
            "printer_host",
            "printer_port"
          ],
          "title": "PrinterConfiguration",
          "type": "object"
        }
      },
      "summary": "Get a printer_configuration by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:493bc12a32ea317ebc3cfeaaacc9f612441fcb40e7d6cb45f6962cc07fc01c99",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PrinterConfiguration": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_default": {
                  "type": "boolean"
                },
                "label_definition_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "printer_host": {
                  "type": "string"
                },
                "printer_model": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "printer_port": {
                  "format": "int32",
                  "type": "integer"
                },
                "zone_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "is_active",
                "is_default",
                "mod_when",
                "mod_who",
                "name",
                "printer_host",
                "printer_port"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/PrinterConfiguration"
          },
          "title": "Array_of_PrinterConfiguration",
          "type": "array"
        }
      },
      "summary": "List printer_configuration — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:b239951e9bc9eaa883bc9c675ac466a8097487e9abb9bc0e1bee383ac61acd1c",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "is_default": {
                "type": "boolean"
              },
              "label_definition_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "printer_host": {
                "type": "string"
              },
              "printer_model": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "printer_port": {
                "format": "int32",
                "type": "integer"
              },
              "zone_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "PrinterConfigurationUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "label_definition_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "printer_host": {
              "type": "string"
            },
            "printer_model": {
              "type": [
                "string",
                "null"
              ]
            },
            "printer_port": {
              "format": "int32",
              "type": "integer"
            },
            "zone_code": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "name",
            "printer_host",
            "printer_port"
          ],
          "title": "PrinterConfiguration",
          "type": "object"
        }
      },
      "summary": "Update printer configuration with explicit nullable-field semantics.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f7651a8c8e9d8dc24ca7e35c283ad7d29c64ebc1c723a83597f7c78abde1bd68",
      "x-quark-response-schema-hash": "sha256:493bc12a32ea317ebc3cfeaaacc9f612441fcb40e7d6cb45f6962cc07fc01c99",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_default": {
              "type": "boolean"
            },
            "label_definition_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "printer_host": {
              "type": "string"
            },
            "printer_model": {
              "type": [
                "string",
                "null"
              ]
            },
            "printer_port": {
              "format": "int32",
              "type": "integer"
            },
            "zone_code": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_active",
            "is_default",
            "mod_when",
            "mod_who",
            "name",
            "printer_host",
            "printer_port"
          ],
          "title": "PrinterConfiguration",
          "type": "object"
        }
      },
      "summary": "Delete a printer_configuration by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:493bc12a32ea317ebc3cfeaaacc9f612441fcb40e7d6cb45f6962cc07fc01c99",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple printer_configuration by IDs — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_printer_configuration",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count printer_configuration — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_configuration",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "PrinterScope": {
                "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
                "enum": [
                  "User",
                  "Zone",
                  "Owner",
                  "Warehouse"
                ],
                "type": "string"
              }
            },
            "properties": {
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "printer_id": {
                "format": "int64",
                "type": "integer"
              },
              "priority": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scope_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scope_type": {
                "$ref": "#/definitions/PrinterScope"
              }
            },
            "required": [
              "printer_id",
              "scope_type"
            ],
            "title": "PrinterAssignmentForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PrinterScope": {
              "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
              "enum": [
                "User",
                "Zone",
                "Owner",
                "Warehouse"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "printer_id": {
              "format": "int64",
              "type": "integer"
            },
            "priority": {
              "format": "int32",
              "type": "integer"
            },
            "scope_id": {
              "description": "`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "scope_type": {
              "$ref": "#/definitions/PrinterScope"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "printer_id",
            "priority",
            "scope_type"
          ],
          "title": "PrinterAssignment",
          "type": "object"
        }
      },
      "summary": "Create a new printer_assignment — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:24a4e7e16a5038eff2d667c9764865782ccf5388af365f424505e31433627005",
      "x-quark-response-schema-hash": "sha256:547ed6ba674ff753af8c4373fdd3525b66fbb60a6756fec799de8ae6283a1f54",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PrinterScope": {
              "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
              "enum": [
                "User",
                "Zone",
                "Owner",
                "Warehouse"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "printer_id": {
              "format": "int64",
              "type": "integer"
            },
            "priority": {
              "format": "int32",
              "type": "integer"
            },
            "scope_id": {
              "description": "`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "scope_type": {
              "$ref": "#/definitions/PrinterScope"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "printer_id",
            "priority",
            "scope_type"
          ],
          "title": "PrinterAssignment",
          "type": "object"
        }
      },
      "summary": "Get a printer_assignment by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:547ed6ba674ff753af8c4373fdd3525b66fbb60a6756fec799de8ae6283a1f54",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PrinterAssignment": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "printer_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "priority": {
                  "format": "int32",
                  "type": "integer"
                },
                "scope_id": {
                  "description": "`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.",
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "scope_type": {
                  "$ref": "#/definitions/PrinterScope"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "is_active",
                "mod_when",
                "mod_who",
                "printer_id",
                "priority",
                "scope_type"
              ],
              "type": "object"
            },
            "PrinterScope": {
              "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
              "enum": [
                "User",
                "Zone",
                "Owner",
                "Warehouse"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/PrinterAssignment"
          },
          "title": "Array_of_PrinterAssignment",
          "type": "array"
        }
      },
      "summary": "List printer_assignment — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9573fa014318d8777d31e3283d25afb8e9c75d006a7ea812efb1d92f6faa57e7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "is_active": {
                "type": "boolean"
              },
              "printer_id": {
                "format": "int64",
                "type": "integer"
              },
              "priority": {
                "format": "int32",
                "type": "integer"
              },
              "scope_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "scope_type": {
                "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
                "enum": [
                  "User",
                  "Zone",
                  "Owner",
                  "Warehouse"
                ],
                "type": "string"
              }
            },
            "title": "PrinterAssignmentUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PrinterScope": {
              "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
              "enum": [
                "User",
                "Zone",
                "Owner",
                "Warehouse"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "printer_id": {
              "format": "int64",
              "type": "integer"
            },
            "priority": {
              "format": "int32",
              "type": "integer"
            },
            "scope_id": {
              "description": "`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "scope_type": {
              "$ref": "#/definitions/PrinterScope"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "printer_id",
            "priority",
            "scope_type"
          ],
          "title": "PrinterAssignment",
          "type": "object"
        }
      },
      "summary": "Update a printer-routing rule; a warehouse scope explicitly clears scope_id.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e4a1a09c6c9fe660e6eb7953d79978e7a70dfcab31f4295eee3501b0e1be16d3",
      "x-quark-response-schema-hash": "sha256:547ed6ba674ff753af8c4373fdd3525b66fbb60a6756fec799de8ae6283a1f54",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "PrinterScope": {
              "description": "Per migration 085. Lookup priority: explicit (in command) → User → Zone → Owner → Warehouse default.",
              "enum": [
                "User",
                "Zone",
                "Owner",
                "Warehouse"
              ],
              "type": "string"
            }
          },
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "printer_id": {
              "format": "int64",
              "type": "integer"
            },
            "priority": {
              "format": "int32",
              "type": "integer"
            },
            "scope_id": {
              "description": "`user_id` | `zone_id` | `owner_id` | NULL for Warehouse default.",
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "scope_type": {
              "$ref": "#/definitions/PrinterScope"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "id",
            "is_active",
            "mod_when",
            "mod_who",
            "printer_id",
            "priority",
            "scope_type"
          ],
          "title": "PrinterAssignment",
          "type": "object"
        }
      },
      "summary": "Delete a printer_assignment by ID — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:547ed6ba674ff753af8c4373fdd3525b66fbb60a6756fec799de8ae6283a1f54",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_many_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "ids",
          "required": true,
          "schema": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "summary": "Record IDs"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Delete multiple printer_assignment by IDs — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c7d8319c9a77e375d85cb72cb34a3ad6555016a4b8aa1339894e435ad8ef4177",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_printer_assignment",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count printer_assignment — CRUD.",
      "tags": [
        {
          "name": "reporting"
        }
      ],
      "x-quark-context": "reporting",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "printer_assignments",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_screen_def",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ScreenDefRecord": {
              "description": "Screen definition record (screen_id + opaque JSON blob)",
              "properties": {
                "definition": true,
                "screen_id": {
                  "type": "string"
                }
              },
              "required": [
                "definition",
                "screen_id"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ScreenDefRecord"
          },
          "title": "Array_of_ScreenDefRecord",
          "type": "array"
        }
      },
      "summary": "List all screen definitions for the current warehouse",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "screen_def",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:f4ea98f888cdde30dc6a8c6fd0707023d1cef03d728df807b04fabd2c90dadd9",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_screen_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "screen_id",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Screen definition record (screen_id + opaque JSON blob)",
          "properties": {
            "definition": true,
            "screen_id": {
              "type": "string"
            }
          },
          "required": [
            "definition",
            "screen_id"
          ],
          "title": "ScreenDefRecord",
          "type": "object"
        }
      },
      "summary": "Get a single screen definition by ID",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "screen_def",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:feda9bf2cdfd81be09fa4bd0b7e04a54c92b9dc07feb54083ba3a0098882c03f",
      "x-quark-response-schema-hash": "sha256:7e0f282bc5b6492105c269bc9ba22286e2972c9baaf47697b22859051af0b931",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_screen_defs",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "screen_ids",
          "required": true,
          "schema": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "additionalProperties": true,
          "title": "Map_of_Nullable_AnyValue",
          "type": "object"
        }
      },
      "summary": "Batch-fetch screen definitions by IDs",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "screen_def",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:1164bee7cdfab3c8793471e996df43cae57a86268b5e9a8d2e8068348cd915c6",
      "x-quark-response-schema-hash": "sha256:17cf5001b1f7c7e05663a7d86ce6d268f0a696485eaabcb53f7b9532402a85ba",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "save_all_screen_defs",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "screens",
          "required": true,
          "schema": {
            "definitions": {
              "ScreenDefForSave": {
                "description": "Input for saving screens",
                "properties": {
                  "definition": true,
                  "screen_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "definition",
                  "screen_id"
                ],
                "type": "object"
              }
            },
            "items": {
              "$ref": "#/definitions/ScreenDefForSave"
            },
            "type": "array"
          },
          "summary": null
        },
        {
          "name": "tree",
          "required": true,
          "schema": true,
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Atomically replace all screen definitions and save tree",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "screen_def",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:cb4aa7b2aa437263e91fa9d5b301fa6241cba77269bee604d64460aad6e25b7a",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_screen_tree",
      "paramStructure": "by-name",
      "params": [],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "Nullable_AnyValue"
        }
      },
      "summary": "Get the designer tree structure",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "screen_def",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:c8a1ac469a826ea3547ac220c7bbfdcd6b58080d4ec596ff2a0149c5ccb9b699",
      "x-quark-response-schema-hash": "sha256:16c396bd1358a3b446c09c6e510803f4f4060a2cf957ccb3c99e917608edec2e",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "fetch_screen",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "environment": {
                "default": "default",
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "if_none_match": {
                "default": null,
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "id"
            ],
            "title": "FetchScreenParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "anyOf": [
            {
              "properties": {
                "not_modified": {
                  "type": "boolean"
                },
                "revision": {
                  "format": "int64",
                  "type": "integer"
                },
                "screen": true,
                "ttl": {
                  "format": "uint32",
                  "minimum": 0.0,
                  "type": "integer"
                }
              },
              "required": [
                "not_modified",
                "revision",
                "screen",
                "ttl"
              ],
              "type": "object"
            },
            {
              "properties": {
                "not_modified": {
                  "type": "boolean"
                },
                "revision": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "not_modified",
                "revision"
              ],
              "type": "object"
            }
          ],
          "title": "FetchScreenResponse"
        }
      },
      "summary": "Fetch one ScreenFile JSON v2 by id (with optional ifNoneMatch ETag check).",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "metadata",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:81d14578738f5b8c98fca86d5dade59557806d2c4729d479ac884807894015ab",
      "x-quark-response-schema-hash": "sha256:ab7592609fbccbe743231a76371aca81e7378f389d0fffe75bb3a93bea4a3786",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "fetch_reachable_from",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "environment": {
                "default": "default",
                "type": "string"
              },
              "root_id": {
                "type": "string"
              }
            },
            "required": [
              "root_id"
            ],
            "title": "FetchReachableFromParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "revisions": {
              "additionalProperties": {
                "format": "int64",
                "type": "integer"
              },
              "type": "object"
            },
            "screens": {
              "additionalProperties": true,
              "type": "object"
            },
            "ttl": {
              "format": "uint32",
              "minimum": 0.0,
              "type": "integer"
            }
          },
          "required": [
            "revisions",
            "screens",
            "ttl"
          ],
          "title": "FetchReachableFromResponse",
          "type": "object"
        }
      },
      "summary": "Bundle: every ScreenFile transitively reachable from rootId via metadata graph.",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "metadata",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:6094e32660c42065eed3c9db329ab2b9af5494a2553d03521bd6503668c8895f",
      "x-quark-response-schema-hash": "sha256:f40c76983c31b1cb76fab0c511c47665dc9032600f07af9927464238a505e69f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_screens",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "category": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "environment": {
                "default": "default",
                "type": "string"
              }
            },
            "title": "ListScreensParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ScreenSummaryResponse": {
              "properties": {
                "category": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "revision": {
                  "format": "int64",
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "revision",
                "title",
                "type"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/ScreenSummaryResponse"
          },
          "title": "Array_of_ScreenSummaryResponse",
          "type": "array"
        }
      },
      "summary": "List screens active in environment (id/title/type/category/revision; no body).",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "metadata",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:d4fe050e5fb38e3daaa4a41543527fd1ab0fa8de278fc1a5395d1c45fac13360",
      "x-quark-response-schema-hash": "sha256:5118d741c7e1ddeaa776877f24af50069d67a7e468189bebac31a872f30677b1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_revision",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "environment": {
                "default": "default",
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "title": "GetRevisionParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "revision": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "revision"
          ],
          "title": "GetRevisionResponse",
          "type": "object"
        }
      },
      "summary": "Cheap revision-only check (no body) for a given screen + environment.",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "metadata",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "disabled",
      "x-quark-request-schema-hash": "sha256:b98a5e1488c87ebc45ad4be14566d5ff267797b03972c065fec3c3776ab4d5c3",
      "x-quark-response-schema-hash": "sha256:a583c00efbabe68a4966aa5171dd9852d278d60e2b1a1cd9862845a953917201",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "save_screen",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "body": true,
              "comment": {
                "default": null,
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "body",
              "id"
            ],
            "title": "SaveScreenParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "id": {
              "type": "string"
            },
            "revision": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "id",
            "revision"
          ],
          "title": "SaveScreenResponse",
          "type": "object"
        }
      },
      "summary": "Validate body and append a new ScreenFile revision (does NOT activate).",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "metadata",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4ff23bce27fae52070692e01e2de70eb1fed0b1e0e62b0372cf10cbcf89b0435",
      "x-quark-response-schema-hash": "sha256:724aa56137014744363d3313c95bb9c39b6d9bfe90bf85b5fdd439f6d6a0bfc3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "activate_revision",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "environment": {
                "default": "default",
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "revision": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "revision"
            ],
            "title": "ActivateRevisionParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "environment": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "previous_revision": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "revision": {
              "format": "int64",
              "type": "integer"
            }
          },
          "required": [
            "environment",
            "id",
            "revision"
          ],
          "title": "ActivateRevisionResponse",
          "type": "object"
        }
      },
      "summary": "Set an existing revision as the active one for (id, environment); returns the previous.",
      "tags": [
        {
          "name": "rf"
        }
      ],
      "x-quark-context": "rf",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "metadata",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6119cb7b2a4e6d5c2654ff43e6a110a08ad1c760648fddc00d67808354245c25",
      "x-quark-response-schema-hash": "sha256:46da691ace0bc584c9138a4b20a2b5dec711d61d82080de946eeed583ba45184",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_available_stock",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AvailableStock": {
              "description": "Aggregated stock per SKU for a given owner.",
              "properties": {
                "allocated_qty": {
                  "format": "double",
                  "type": "number"
                },
                "available_qty": {
                  "format": "double",
                  "type": "number"
                },
                "location_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "total_qty": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "allocated_qty",
                "available_qty",
                "location_count",
                "sku_code",
                "total_qty"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AvailableStock"
          },
          "title": "Array_of_AvailableStock",
          "type": "array"
        }
      },
      "summary": "Inventory: get available stock",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:5f55b8dd0e811c0e76e71d0dcd762ddd58b909a8a811610fc51f4fa07cd3a8e0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_all_stock",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AllStock": {
              "description": "Stock item for feed export (includes zero-qty SKUs).",
              "properties": {
                "allocated_qty": {
                  "format": "double",
                  "type": "number"
                },
                "available_qty": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "total_qty": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "allocated_qty",
                "available_qty",
                "sku_code",
                "total_qty"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AllStock"
          },
          "title": "Array_of_AllStock",
          "type": "array"
        }
      },
      "summary": "Inventory: get all stock",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:678b8c07a645d9d402bb87e7b1918df000047c21e18d4aaa278fd7a3dad1cc36",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "sync_stock_log",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Inventory: sync stock log",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerType": {
              "oneOf": [
                {
                  "enum": [
                    "Pallet",
                    "Case",
                    "Tote",
                    "Generic"
                  ],
                  "type": "string"
                },
                {
                  "description": "Коробка отгрузки, созданная картонизацией. Физика берётся не из мастера типов, а из строки политики, по которой её создали (`cartonization_policy_detail_id`).",
                  "enum": [
                    "Carton"
                  ],
                  "type": "string"
                }
              ]
            },
            "InventoryBalanceAtp": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "atp": {
                  "description": "Computed: Available-to-promise = `GREATEST(qty − allocated − picked − on_hold, 0)`.",
                  "format": "double",
                  "type": "number"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "container_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/ContainerType"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Display (migration 178): `container.container_type` (Pallet/Case/…) — drives the type-glyph badge on the Container column, paired with `lpn`. Native enum (sqlx::Type); serializes to its label (\"Pallet\"/…) so the grid renderer reads the type string."
                },
                "hold_detail": {
                  "description": "VIRTUAL: reason + scope of the matching hold, e.g. `'Damaged · Location'`; `''` when the row is not held.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_status": {
                  "description": "VIRTUAL: `'On hold'` when an active hold matches this row's lot / loc / lpn, else `''` (empty → the grid renders no chip). Derived live, never stored.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "Display (migration 178): `container.code` (LPN) for `container_id`; `None` for loose stock. Lets the grid filter the Container column by text and the Hard-Move drill-in show the real LPN instead of \"loose stock\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_name": {
                  "description": "Display (migration 178): `owners.company` for `owner_id` (vs the raw `#id`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "qty_expected": {
                  "description": "Computed: Σ open-ASN remaining (`qty_expected − qty_received`) for this sku+owner.",
                  "format": "double",
                  "type": "number"
                },
                "qty_on_hold": {
                  "description": "Computed: `qty` when an active hold matches this row's lot / loc / lpn, else `0`.",
                  "format": "double",
                  "type": "number"
                },
                "qty_picked": {
                  "format": "double",
                  "type": "number"
                },
                "serial_tracked": {
                  "default": false,
                  "description": "Whether this row's SKU is configured for end-to-end serial capture. NOT a view column — the view knows nothing about serial config. Filled in by `search_balances` after the query (`SkuSerialConfigBmc:: serial_tracked_skus`), so the RF Move screen can decide whether a PARTIAL move needs the units scanned. `#[field(skip)]` keeps it out of the sea-query projection; `#[sqlx(default)]` keeps `FromRow` from demanding a column that isn't selected — it comes back `false` and the enrichment step sets it.",
                  "type": "boolean"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_descr": {
                  "description": "Display (migration 178): `sku.descr` (item name) for `(sku_code, owner_id)`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "atp",
                "id",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "qty_allocated",
                "qty_expected",
                "qty_on_hold",
                "qty_picked",
                "sku_code",
                "uom"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceAtp"
          },
          "title": "Array_of_InventoryBalanceAtp",
          "type": "array"
        }
      },
      "summary": "List inventory_balance — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:de6eb7b87a2e5e2d5f5d253bb405be7834eb7875eade181e088df2af3abe4855",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_on_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerType": {
              "oneOf": [
                {
                  "enum": [
                    "Pallet",
                    "Case",
                    "Tote",
                    "Generic"
                  ],
                  "type": "string"
                },
                {
                  "description": "Коробка отгрузки, созданная картонизацией. Физика берётся не из мастера типов, а из строки политики, по которой её создали (`cartonization_policy_detail_id`).",
                  "enum": [
                    "Carton"
                  ],
                  "type": "string"
                }
              ]
            },
            "InventoryBalanceAtp": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "atp": {
                  "description": "Computed: Available-to-promise = `GREATEST(qty − allocated − picked − on_hold, 0)`.",
                  "format": "double",
                  "type": "number"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "container_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/ContainerType"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Display (migration 178): `container.container_type` (Pallet/Case/…) — drives the type-glyph badge on the Container column, paired with `lpn`. Native enum (sqlx::Type); serializes to its label (\"Pallet\"/…) so the grid renderer reads the type string."
                },
                "hold_detail": {
                  "description": "VIRTUAL: reason + scope of the matching hold, e.g. `'Damaged · Location'`; `''` when the row is not held.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_status": {
                  "description": "VIRTUAL: `'On hold'` when an active hold matches this row's lot / loc / lpn, else `''` (empty → the grid renders no chip). Derived live, never stored.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "Display (migration 178): `container.code` (LPN) for `container_id`; `None` for loose stock. Lets the grid filter the Container column by text and the Hard-Move drill-in show the real LPN instead of \"loose stock\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_name": {
                  "description": "Display (migration 178): `owners.company` for `owner_id` (vs the raw `#id`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "qty_expected": {
                  "description": "Computed: Σ open-ASN remaining (`qty_expected − qty_received`) for this sku+owner.",
                  "format": "double",
                  "type": "number"
                },
                "qty_on_hold": {
                  "description": "Computed: `qty` when an active hold matches this row's lot / loc / lpn, else `0`.",
                  "format": "double",
                  "type": "number"
                },
                "qty_picked": {
                  "format": "double",
                  "type": "number"
                },
                "serial_tracked": {
                  "default": false,
                  "description": "Whether this row's SKU is configured for end-to-end serial capture. NOT a view column — the view knows nothing about serial config. Filled in by `search_balances` after the query (`SkuSerialConfigBmc:: serial_tracked_skus`), so the RF Move screen can decide whether a PARTIAL move needs the units scanned. `#[field(skip)]` keeps it out of the sea-query projection; `#[sqlx(default)]` keeps `FromRow` from demanding a column that isn't selected — it comes back `false` and the enrichment step sets it.",
                  "type": "boolean"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_descr": {
                  "description": "Display (migration 178): `sku.descr` (item name) for `(sku_code, owner_id)`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "atp",
                "id",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "qty_allocated",
                "qty_expected",
                "qty_on_hold",
                "qty_picked",
                "sku_code",
                "uom"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceAtp"
          },
          "title": "Array_of_InventoryBalanceAtp",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_on_hold — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:de6eb7b87a2e5e2d5f5d253bb405be7834eb7875eade181e088df2af3abe4855",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_lot",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryBalanceLot": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "best_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "best_by_date_source": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LotDateSource"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "delivery_by_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "delivery_by_date_source": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LotDateSource"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expiration_date_source": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LotDateSource"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Where each date came from; `None` when the lot has no such date."
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "receipt_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "id",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "sku_code"
              ],
              "type": "object"
            },
            "LotDateSource": {
              "description": "Where a lot's date came from: typed in by a person, or worked out from the manufactured date and the SKU's day counts. Stored as `lot_date_source`; a lot without the date has no source.",
              "enum": [
                "Explicit",
                "Derived"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceLot"
          },
          "title": "Array_of_InventoryBalanceLot",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_lot — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:856241ce85f35c49099ba81438cabd15e8c34e04ddedb66aa0c2f8eb6477fe81",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance_on_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance_on_hold — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance_lot",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance_lot — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryHold": {
              "description": "Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "auto_release_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "comments": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "date_off": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "date_on": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hours_to_hold": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_hold_on": {
                  "type": "boolean"
                },
                "loc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lot": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "$ref": "#/definitions/InventoryStatusHold"
                },
                "who_off": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "who_on": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "id",
                "is_hold_on",
                "mod_when",
                "mod_who",
                "status"
              ],
              "type": "object"
            },
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryHold"
          },
          "title": "Array_of_InventoryHold",
          "type": "array"
        }
      },
      "summary": "List inventory_hold — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:f94caa2bbe89909e21949aa3a693b6a34d88645706f0256df80649c73048fdfb",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_hold — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_inventory_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_release_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "comments": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_off": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "date_on": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "hours_to_hold": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_hold_on": {
              "type": "boolean"
            },
            "loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/InventoryStatusHold"
            },
            "who_off": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "who_on": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_hold_on",
            "mod_when",
            "mod_who",
            "status"
          ],
          "title": "InventoryHold",
          "type": "object"
        }
      },
      "summary": "Get a inventory_hold by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:412f4381d721f32a906f4078aa87977e6b26adf7bedbd6aa82d29c0df6291cf0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_inventory_hold",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "auto_release_date": {
                "description": "Omitted keeps the schedule, null removes it, and an RFC 3339 value schedules release at that absolute instant.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "comments": {
                "description": "Omitted = invalid no-op, null = clear, string = replace.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "UpdateInventoryHoldFields",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryStatusHold": {
              "description": "Mirror of the PostgreSQL `inv_hold_code` enum (15 values after migration 142).\n\nMigration 142 renamed and extended the DB enum: - `QCRec` → `QcQuarantine` (semantic clarity: not just \"at receive\") - `Return` → `CustomerReturn` (disambiguate from `Rtv`) - Added: `Rtv`, `Destroy`, `QcRequired`, `NewItem`, `NotHold`",
              "oneOf": [
                {
                  "enum": [
                    "None",
                    "Ok",
                    "PIHold",
                    "QcRequired",
                    "NewItem",
                    "NotHold",
                    "QcQuarantine",
                    "Customs",
                    "CustomerReturn",
                    "Expired",
                    "Damaged",
                    "Rtv",
                    "Destroy",
                    "Lost",
                    "Other"
                  ],
                  "type": "string"
                },
                {
                  "description": "Administrative location block — hard, non-overridable. Carries the legacy `location.status='Hold'` block preserved by migration 194 (F8). A varchar-only `inventory_hold.code` value; it is never written to the `inv_hold_code` DB enum column (`inventory_hold.status`), so it needs no DB-enum `ALTER`.",
                  "enum": [
                    "LocBlocked"
                  ],
                  "type": "string"
                }
              ]
            }
          },
          "description": "Represents a hold placed on inventory, supporting lot, location, or LPN-based holds.\n\nThis struct is designed for detailed tracking and auditing of inventory holds in a warehouse management system. It supports flexible hold types (lot, location, LPN), status management, and full audit trails.\n\n# Fields - `id`: Unique identifier for the hold record. - `code`: Business code for the hold (may be used for grouping or referencing). - `lot`: Optional lot number, if the hold is placed at the lot level. - `loc`: Optional location code, if the hold is placed at the location level. - `lpn`: Optional License Plate Number, if the hold is placed on a movable unit. - `is_hold_on`: `true` if the hold is currently active, `false` if released. - `status`: The current status of the hold (custom enum). - `date_on`: Timestamp when the hold was placed. - `who_on`: User ID or actor who placed the hold. - `date_off`: Timestamp when the hold was released (if applicable). - `who_off`: User ID or actor who released the hold (if applicable). - `comments`: Optional comments or notes about the hold. - `hours_to_hold`: Optional planned duration (in hours) for the hold. - `auto_release_date`: Optional date when the hold should be automatically released. - `add_who`: User ID who created the record. - `add_when`: Timestamp when the record was created. - `mod_who`: User ID who last modified the record. - `mod_when`: Timestamp when the record was last modified.\n\n# Serialization - Uses RFC3339 datetime format for all timestamps. - Designed for use with Serde and SQLx for seamless database and API integration.\n\n# Example ``` let hold = InventoryHold { id: 1, code: \"HOLD-2025-001\".to_string(), lot: Some(\"LOT-123\".to_string()), loc: None, lpn: None, is_hold_on: true, status: InventoryStatusHold::Active, date_on: OffsetDateTime::now_utc(), who_on: 42, date_off: OffsetDateTime::now_utc(), who_off: 0, comments: Some(\"Quality check pending\".to_string()), hours_to_hold: Some(24.0), auto_release_date: OffsetDateTime::now_utc(), add_who: 42, add_when: OffsetDateTime::now_utc(), mod_who: 42, mod_when: OffsetDateTime::now_utc(), }; ```",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "auto_release_date": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "code": {
              "type": "string"
            },
            "comments": {
              "type": [
                "string",
                "null"
              ]
            },
            "date_off": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "date_on": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "hours_to_hold": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_hold_on": {
              "type": "boolean"
            },
            "loc": {
              "type": [
                "string",
                "null"
              ]
            },
            "lot": {
              "type": [
                "string",
                "null"
              ]
            },
            "lpn": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "status": {
              "$ref": "#/definitions/InventoryStatusHold"
            },
            "who_off": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "who_on": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "id",
            "is_hold_on",
            "mod_when",
            "mod_who",
            "status"
          ],
          "title": "InventoryHold",
          "type": "object"
        }
      },
      "summary": "Update inventory-hold comments and auto-release schedule",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d7f0babd739c28b0d34792433d563aa77f6db6d5d404e3defc43e9f24ad567c4",
      "x-quark-response-schema-hash": "sha256:412f4381d721f32a906f4078aa87977e6b26adf7bedbd6aa82d29c0df6291cf0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_by_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryBalanceBySku": {
              "properties": {
                "atp": {
                  "format": "double",
                  "type": "number"
                },
                "descr": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "locs": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "qty_expected": {
                  "format": "double",
                  "type": "number"
                },
                "qty_on_hold": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                }
              },
              "required": [
                "atp",
                "id",
                "locs",
                "owner_id",
                "qty",
                "qty_allocated",
                "qty_expected",
                "qty_on_hold",
                "sku_code"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceBySku"
          },
          "title": "Array_of_InventoryBalanceBySku",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_by_sku — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:aa5af0cbc9ec3255413a31b31150f33a5aa74893ccddab93ba3cc70790be69e0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_by_lot",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryBalanceByLot": {
              "properties": {
                "atp": {
                  "format": "double",
                  "type": "number"
                },
                "best_by_date_source": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LotDateSource"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "days_left": {
                  "description": "Expiration minus the warehouse day (`warehouse_today()`).",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "delivery_by_date_source": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LotDateSource"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "expiration_date_source": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/LotDateSource"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Where each date came from; `None` when the lot has no such date."
                },
                "expired": {
                  "description": "The lot expires today or earlier.",
                  "type": "boolean"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "locs": {
                  "format": "int64",
                  "type": "integer"
                },
                "lot": {
                  "type": "string"
                },
                "manufactured_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "atp",
                "expired",
                "id",
                "locs",
                "lot",
                "owner_id",
                "qty",
                "qty_allocated",
                "sku_code",
                "status"
              ],
              "type": "object"
            },
            "LotDateSource": {
              "description": "Where a lot's date came from: typed in by a person, or worked out from the manufactured date and the SKU's day counts. Stored as `lot_date_source`; a lot without the date has no source.",
              "enum": [
                "Explicit",
                "Derived"
              ],
              "type": "string"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceByLot"
          },
          "title": "Array_of_InventoryBalanceByLot",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_by_lot — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:90ac49ae201d6c024861cedcec9d8bd890850b2c89adcadf05652389e5115db2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_by_container",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryBalanceByContainer": {
              "properties": {
                "atp": {
                  "format": "double",
                  "type": "number"
                },
                "code": {
                  "type": "string"
                },
                "container_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "origin": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "parent_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "sku_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "atp",
                "code",
                "created",
                "id",
                "owner_id",
                "qty",
                "qty_allocated",
                "sku_count"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceByContainer"
          },
          "title": "Array_of_InventoryBalanceByContainer",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_by_container — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:9e453a9b190651817b106d1acdb00e979dd5018b5f2e3476a6403b806f89b09f",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance_by_sku",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance_by_sku — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance_by_lot",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance_by_lot — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_balance_by_container",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_balance_by_container — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_container_hierarchy",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerTreeItem": {
              "description": "One tree row as the pf_table tree renderer expects it: the by-container display fields (snake_case — form 236 reuses the flat By-Container columns) plus `hierarchyLevel` and `hierarchyPath` (camelCase — the keys the generic tree machinery reads). `hierarchyPath` is the chain of container codes from root to this node, inclusive; it drives lazy expand (`matches_group_keys`).",
              "properties": {
                "atp": {
                  "format": "double",
                  "type": "number"
                },
                "code": {
                  "type": "string"
                },
                "container_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created": {
                  "type": "string"
                },
                "group": {
                  "description": "True iff this container actually has child containers in the cut. Drives the tree expander — set explicitly so leaf containers don't show a (dead) chevron the way the depth heuristic would.",
                  "type": "boolean"
                },
                "hierarchyLevel": {
                  "format": "int32",
                  "type": "integer"
                },
                "hierarchyPath": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "origin": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "parent_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "sku_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "atp",
                "code",
                "created",
                "group",
                "hierarchyLevel",
                "hierarchyPath",
                "id",
                "owner_id",
                "qty",
                "qty_allocated",
                "sku_count"
              ],
              "type": "object"
            }
          },
          "description": "Response shape for the container-hierarchy RPC. The generic tree action only reads `.items`, mirroring `PackHierarchyResponse`.",
          "properties": {
            "items": {
              "items": {
                "$ref": "#/definitions/ContainerTreeItem"
              },
              "type": "array"
            }
          },
          "required": [
            "items"
          ],
          "title": "ContainerHierarchyResponse",
          "type": "object"
        }
      },
      "summary": "Get by-container balances as a hierarchy (tree) view",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:f1839f5121e066022c0cc299935414247f54c938baccd07cebb891c97a0be001",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_hold_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryHoldDetail": {
              "properties": {
                "auto_release_date": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "code": {
                  "type": "string"
                },
                "comments": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "date_on": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_hold_on": {
                  "type": "boolean"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "scope": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "target": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "who_on": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "id",
                "is_hold_on",
                "qty",
                "scope",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryHoldDetail"
          },
          "title": "Array_of_InventoryHoldDetail",
          "type": "array"
        }
      },
      "summary": "List inventory_hold_detail — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:e3c3bd840abb28dff5f25b1b55e489cf17ec12f4c140cc017e60f5744a0b08f1",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_hold_detail",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_hold_detail — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_serial_capture_episode_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "SerialCaptureEpisodeOpen": {
              "properties": {
                "age_minutes": {
                  "format": "int32",
                  "type": "integer"
                },
                "business_operation": {
                  "type": "string"
                },
                "business_ref_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "captured_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "expected_qty": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "idempotency_key": {
                  "type": "string"
                },
                "location": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "opened_at": {
                  "type": "string"
                },
                "operator_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "progress_pct": {
                  "format": "int32",
                  "type": "integer"
                },
                "sku_code": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "ttl_at": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "age_minutes",
                "business_operation",
                "captured_qty",
                "expected_qty",
                "id",
                "idempotency_key",
                "opened_at",
                "owner_id",
                "progress_pct",
                "sku_code",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/SerialCaptureEpisodeOpen"
          },
          "title": "Array_of_SerialCaptureEpisodeOpen",
          "type": "array"
        }
      },
      "summary": "List serial_capture_episode_open — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:d20bb9fb0ae057b8376ba58a4d888badcd459e8cc6cb26b7bcc4b07fc1d859d8",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_serial_capture_episode_open",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count serial_capture_episode_open — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_balance_kpi",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryBalanceKpi": {
              "properties": {
                "allocated": {
                  "format": "double",
                  "type": "number"
                },
                "atp": {
                  "format": "double",
                  "type": "number"
                },
                "expected": {
                  "format": "double",
                  "type": "number"
                },
                "hold_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "on_hold": {
                  "format": "double",
                  "type": "number"
                },
                "row_count": {
                  "format": "int64",
                  "type": "integer"
                },
                "total_qty": {
                  "format": "double",
                  "type": "number"
                }
              },
              "required": [
                "allocated",
                "atp",
                "expected",
                "hold_count",
                "id",
                "on_hold",
                "row_count",
                "total_qty"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceKpi"
          },
          "title": "Array_of_InventoryBalanceKpi",
          "type": "array"
        }
      },
      "summary": "List inventory_balance_kpi — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:eee21384fe15bd3f6d1314b0a6b8df2488801ad0a51a81e93cf90156aabcc992",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_inventory_pending_move_in_ui",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "InventoryPendingMoveInUi": {
              "description": "Строка экрана назначений: то же назначение, но с подтянутыми паллетой и товаром. Только чтение — вид.",
              "properties": {
                "container_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "cube": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "expires_at": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lpn": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "share_of": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "skus": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "weight": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "container_id",
                "expires_at",
                "id",
                "location",
                "source",
                "status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryPendingMoveInUi"
          },
          "title": "Array_of_InventoryPendingMoveInUi",
          "type": "array"
        }
      },
      "summary": "List inventory_pending_move_in_ui — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:164d08af5b9edefa3617211330873483a5171f9a951286b050738cb5fe9b0b47",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_inventory_pending_move_in_ui",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count inventory_pending_move_in_ui — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "SUPERVISOR",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "search_inventory_balances",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The six filters, exactly as the RF screen sends them.\n\nEvery field is optional and an empty or whitespace-only string means \"not filtering on this\" — the screen always sends all six keys, because a missing key makes rf-go's picker silently refuse to open (design spec §3.2).",
            "properties": {
              "loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lpn": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner": {
                "description": "Owner id (all digits) or a company-name fragment. One screen field, because an operator has one thing written on the paperwork.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "serial": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "InquiryFilters",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "ContainerType": {
              "oneOf": [
                {
                  "enum": [
                    "Pallet",
                    "Case",
                    "Tote",
                    "Generic"
                  ],
                  "type": "string"
                },
                {
                  "description": "Коробка отгрузки, созданная картонизацией. Физика берётся не из мастера типов, а из строки политики, по которой её создали (`cartonization_policy_detail_id`).",
                  "enum": [
                    "Carton"
                  ],
                  "type": "string"
                }
              ]
            },
            "InventoryBalanceAtp": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "atp": {
                  "description": "Computed: Available-to-promise = `GREATEST(qty − allocated − picked − on_hold, 0)`.",
                  "format": "double",
                  "type": "number"
                },
                "container_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "container_type": {
                  "anyOf": [
                    {
                      "$ref": "#/definitions/ContainerType"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Display (migration 178): `container.container_type` (Pallet/Case/…) — drives the type-glyph badge on the Container column, paired with `lpn`. Native enum (sqlx::Type); serializes to its label (\"Pallet\"/…) so the grid renderer reads the type string."
                },
                "hold_detail": {
                  "description": "VIRTUAL: reason + scope of the matching hold, e.g. `'Damaged · Location'`; `''` when the row is not held.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hold_status": {
                  "description": "VIRTUAL: `'On hold'` when an active hold matches this row's lot / loc / lpn, else `''` (empty → the grid renders no chip). Derived live, never stored.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "location": {
                  "type": "string"
                },
                "lot": {
                  "type": "string"
                },
                "lpn": {
                  "description": "Display (migration 178): `container.code` (LPN) for `container_id`; `None` for loose stock. Lets the grid filter the Container column by text and the Hard-Move drill-in show the real LPN instead of \"loose stock\".",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_name": {
                  "description": "Display (migration 178): `owners.company` for `owner_id` (vs the raw `#id`).",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pack_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "qty": {
                  "format": "double",
                  "type": "number"
                },
                "qty_allocated": {
                  "format": "double",
                  "type": "number"
                },
                "qty_expected": {
                  "description": "Computed: Σ open-ASN remaining (`qty_expected − qty_received`) for this sku+owner.",
                  "format": "double",
                  "type": "number"
                },
                "qty_on_hold": {
                  "description": "Computed: `qty` when an active hold matches this row's lot / loc / lpn, else `0`.",
                  "format": "double",
                  "type": "number"
                },
                "qty_picked": {
                  "format": "double",
                  "type": "number"
                },
                "serial_tracked": {
                  "default": false,
                  "description": "Whether this row's SKU is configured for end-to-end serial capture. NOT a view column — the view knows nothing about serial config. Filled in by `search_balances` after the query (`SkuSerialConfigBmc:: serial_tracked_skus`), so the RF Move screen can decide whether a PARTIAL move needs the units scanned. `#[field(skip)]` keeps it out of the sea-query projection; `#[sqlx(default)]` keeps `FromRow` from demanding a column that isn't selected — it comes back `false` and the enrichment step sets it.",
                  "type": "boolean"
                },
                "sku_code": {
                  "type": "string"
                },
                "sku_descr": {
                  "description": "Display (migration 178): `sku.descr` (item name) for `(sku_code, owner_id)`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "uom": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "atp",
                "id",
                "location",
                "lot",
                "mod_when",
                "mod_who",
                "owner_id",
                "pack_id",
                "qty",
                "qty_allocated",
                "qty_expected",
                "qty_on_hold",
                "qty_picked",
                "sku_code",
                "uom"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/InventoryBalanceAtp"
          },
          "title": "Array_of_InventoryBalanceAtp",
          "type": "array"
        }
      },
      "summary": "RF stock search by any of lot / location / LPN / serial / SKU / owner. At least one filter is required; refuses rather than truncates past 200 rows.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_search",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:2e563827b227d3f5ad9ede3dacb5761f822894bef1d7ddd70747d464fd3c2842",
      "x-quark-response-schema-hash": "sha256:de6eb7b87a2e5e2d5f5d253bb405be7834eb7875eade181e088df2af3abe4855",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_position_serials",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "description": "The picked position's identity, exactly as the RF card holds it.",
            "properties": {
              "container_id": {
                "description": "Set for a containerized position; `None` + `loc` for a loose one.",
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "loc": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "lot": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "owner_id": {
                "format": "int64",
                "type": "integer"
              },
              "sku_code": {
                "type": "string"
              }
            },
            "required": [
              "owner_id",
              "sku_code"
            ],
            "title": "PositionSerialQuery",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Wire shape: a flat list plus the honest \"there are more\" flag.",
          "properties": {
            "serials": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "truncated": {
              "description": "True when the position holds more units than were returned. The screen says so rather than letting the operator read a partial list as complete.",
              "type": "boolean"
            }
          },
          "required": [
            "serials",
            "truncated"
          ],
          "title": "PositionSerialsResult",
          "type": "object"
        }
      },
      "summary": "Serial numbers on one inventory position (container or loose location + sku/lot/owner). Truncates past 200 rather than refusing — an operator cannot narrow 'what is in this location'.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "inventory_search",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:be3e84fd5e8909af8cdb7a198f599801d344d9e118cf629e444b0e8cda7041ed",
      "x-quark-response-schema-hash": "sha256:b69cf3abc3d5066c6647cf4f500121eeeecd6cb5665085bd44277e7323af25c4",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_expected_sgtins",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: get expected SGTINs",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_shipment_sgtins",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: get shipment SGTINs",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_box_sgtins",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: get box SGTINs",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_withdrawal_codes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: get withdrawal codes",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_pharma_sgtins",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: get pharma SGTINs",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_kz_inbound_codes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: get ИС МПТ inbound codes",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "confirm_inbound",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: confirm inbound regulator acknowledgement",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "confirm_outbound",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: confirm outbound regulator acknowledgement",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "confirm_aggregation",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: confirm regulator aggregation acknowledgement",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "confirm_pharma_inbound",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: confirm МДЛП inbound acknowledgement",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "confirm_kz_inbound",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "params",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": true,
            "description": "Marking flow inputs differ per operation and evolve with regulator documents. Preserve the complete object at this transport boundary.",
            "title": "MarkingRequest",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "title": "AnyValue"
        }
      },
      "summary": "Marking: confirm ИС МПТ inbound acknowledgement",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "marking",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:ac529c2279a069ab18a542aefdd47eb562b921fe7dd83031c0584a1fe73964d2",
      "x-quark-response-schema-hash": "sha256:bda1d4271959d59c03840e9a07d399bce1c4c5b78605ce09afc1ab9371d00e6a",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_attribute_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AttrDataType": {
                "enum": [
                  "Text",
                  "Integer",
                  "Decimal",
                  "Boolean",
                  "Date"
                ],
                "type": "string"
              }
            },
            "properties": {
              "active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "data_type": {
                "anyOf": [
                  {
                    "$ref": "#/definitions/AttrDataType"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "`From<AttrDataType> for sea_query::Value` binds the label as text, and Postgres has no implicit text → `attr_data_type` cast (42804), so the value is cast in the INSERT itself — as every other enum column written through `Fields` is (`sku`, `user`, `task`, …).\n\nUntil the 2026-09-23 squash this one column was carried instead by a database-wide `CREATE CAST (text AS attr_data_type) … AS IMPLICIT` (archived migration 058). `pg_dump` does not emit casts, so the baseline dropped it and every `create` here began failing with 42804. The cast was never restored: it was a workaround for the missing attribute below, and an implicit cast would let any stray text land in the enum for the whole database."
              },
              "default_value": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_order": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "entity_type": {
                "type": "string"
              },
              "is_required": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "label": {
                "type": "string"
              },
              "owner_id": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "entity_type",
              "label"
            ],
            "title": "AttributeDefForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "data_type": {
              "$ref": "#/definitions/AttrDataType"
            },
            "default_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_order": {
              "format": "int32",
              "type": "integer"
            },
            "entity_type": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_required": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "data_type",
            "display_order",
            "entity_type",
            "id",
            "is_required",
            "label",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeDef",
          "type": "object"
        }
      },
      "summary": "Create a new attribute_def — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:abc7e2cd731ed84187e216d0770b5555c428df2aadc4bfd6e7b090856c3352bf",
      "x-quark-response-schema-hash": "sha256:fd58db5dc49d3be609faf0cffdbc9267f9f425e4db4d378704d20f830b770907",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_attribute_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "data_type": {
              "$ref": "#/definitions/AttrDataType"
            },
            "default_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_order": {
              "format": "int32",
              "type": "integer"
            },
            "entity_type": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_required": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "data_type",
            "display_order",
            "entity_type",
            "id",
            "is_required",
            "label",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeDef",
          "type": "object"
        }
      },
      "summary": "Get a attribute_def by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:fd58db5dc49d3be609faf0cffdbc9267f9f425e4db4d378704d20f830b770907",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_attribute_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            },
            "AttributeDef": {
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "data_type": {
                  "$ref": "#/definitions/AttrDataType"
                },
                "default_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_order": {
                  "format": "int32",
                  "type": "integer"
                },
                "entity_type": {
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_required": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "owner_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "active",
                "add_when",
                "add_who",
                "code",
                "data_type",
                "display_order",
                "entity_type",
                "id",
                "is_required",
                "label",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AttributeDef"
          },
          "title": "Array_of_AttributeDef",
          "type": "array"
        }
      },
      "summary": "List attribute_def — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7605551923ed064775270aeef2a17a749fa198133e36308593c700fbfa8ef12d",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_attribute_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count attribute_def — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_attribute_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "active": {
                "type": "boolean"
              },
              "data_type": {
                "enum": [
                  "Text",
                  "Integer",
                  "Decimal",
                  "Boolean",
                  "Date"
                ],
                "type": "string"
              },
              "default_value": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_order": {
                "format": "int32",
                "type": "integer"
              },
              "is_required": {
                "type": "boolean"
              },
              "label": {
                "type": "string"
              }
            },
            "title": "AttributeDefUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "data_type": {
              "$ref": "#/definitions/AttrDataType"
            },
            "default_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_order": {
              "format": "int32",
              "type": "integer"
            },
            "entity_type": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_required": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "data_type",
            "display_order",
            "entity_type",
            "id",
            "is_required",
            "label",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeDef",
          "type": "object"
        }
      },
      "summary": "Update an attribute definition with strict nullable-field semantics.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f2a9240eb4951f4e14a0c86b01682dcac8739d4a04539324de9f97e84f34337c",
      "x-quark-response-schema-hash": "sha256:fd58db5dc49d3be609faf0cffdbc9267f9f425e4db4d378704d20f830b770907",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_attribute_def",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            }
          },
          "properties": {
            "active": {
              "type": "boolean"
            },
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "data_type": {
              "$ref": "#/definitions/AttrDataType"
            },
            "default_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_order": {
              "format": "int32",
              "type": "integer"
            },
            "entity_type": {
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_required": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "owner_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "active",
            "add_when",
            "add_who",
            "code",
            "data_type",
            "display_order",
            "entity_type",
            "id",
            "is_required",
            "label",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeDef",
          "type": "object"
        }
      },
      "summary": "Delete a attribute_def by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:fd58db5dc49d3be609faf0cffdbc9267f9f425e4db4d378704d20f830b770907",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_attribute_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "attribute_def_id": {
                "format": "int64",
                "type": "integer"
              },
              "entity_id": {
                "format": "int64",
                "type": "integer"
              },
              "entity_type": {
                "description": "Required, and deliberately not defaulted: a caller that does not know whose row it is writing does not know enough to write it. See [`AttributeValue::entity_type`].",
                "type": "string"
              },
              "value_bool": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "value_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "value_float": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "value_int": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "value_text": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "attribute_def_id",
              "entity_id",
              "entity_type"
            ],
            "title": "AttributeValueForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_def_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_type": {
              "description": "Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.",
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "value_bool": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "value_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "value_float": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "value_int": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_text": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_def_id",
            "entity_id",
            "entity_type",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeValue",
          "type": "object"
        }
      },
      "summary": "Create a new attribute_value — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d9211d57c0a1339429363dfeacded6d94f792411f4d779b061ba2eda1b52003d",
      "x-quark-response-schema-hash": "sha256:4f6d6eadab96b303ac9aa111d2aea1714c8b851c48aedf7a6f06610eafc1c5e2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_attribute_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_def_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_type": {
              "description": "Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.",
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "value_bool": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "value_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "value_float": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "value_int": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_text": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_def_id",
            "entity_id",
            "entity_type",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeValue",
          "type": "object"
        }
      },
      "summary": "Get a attribute_value by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:4f6d6eadab96b303ac9aa111d2aea1714c8b851c48aedf7a6f06610eafc1c5e2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_attribute_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttributeValue": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attribute_def_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "entity_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "entity_type": {
                  "description": "Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.",
                  "type": "string"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "value_bool": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "value_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "value_float": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "value_int": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "value_text": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attribute_def_id",
                "entity_id",
                "entity_type",
                "id",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/AttributeValue"
          },
          "title": "Array_of_AttributeValue",
          "type": "array"
        }
      },
      "summary": "List attribute_value — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:c7e9d42da4a936b321ad71708b988642aa6157023ff77e0f8bbb2daf2e4fca91",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_attribute_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count attribute_value — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_attribute_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "properties": {
              "value_bool": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "value_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "value_float": {
                "format": "double",
                "type": [
                  "number",
                  "null"
                ]
              },
              "value_int": {
                "format": "int64",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "value_text": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "AttributeValueUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_def_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_type": {
              "description": "Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.",
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "value_bool": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "value_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "value_float": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "value_int": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_text": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_def_id",
            "entity_id",
            "entity_type",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeValue",
          "type": "object"
        }
      },
      "summary": "Update an attribute value with explicit keep, clear and set semantics.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:b1585aa67d2d0c96d41d4d61a9543c7c5e7f3b47dc675914436efb6010d404bf",
      "x-quark-response-schema-hash": "sha256:4f6d6eadab96b303ac9aa111d2aea1714c8b851c48aedf7a6f06610eafc1c5e2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_attribute_value",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attribute_def_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_type": {
              "description": "Which KIND of entity `entity_id` names — `'sku'`, `'location'`, …\n\n`attribute_value` is a generic EAV table and `entity_id` alone does not identify anything: SKU ids and location ids are independent sequences, so `entity_id = 7` is both SKU 7 and location 7. This is the discriminator that tells them apart, and migration 219's composite FK onto `attribute_def (id, entity_type)` makes it impossible for it to disagree with the definition the row points at.",
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "value_bool": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "value_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "value_float": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "value_int": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_text": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attribute_def_id",
            "entity_id",
            "entity_type",
            "id",
            "mod_when",
            "mod_who"
          ],
          "title": "AttributeValue",
          "type": "object"
        }
      },
      "summary": "Delete a attribute_value by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:4f6d6eadab96b303ac9aa111d2aea1714c8b851c48aedf7a6f06610eafc1c5e2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_entity_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "entity_type",
          "required": true,
          "schema": {
            "type": "string"
          },
          "summary": null
        },
        {
          "name": "owner_id",
          "required": false,
          "schema": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            },
            "EntityAttributeRow": {
              "description": "Row returned by get_entity_attributes — attribute def + current value",
              "properties": {
                "code": {
                  "type": "string"
                },
                "data_type": {
                  "$ref": "#/definitions/AttrDataType"
                },
                "def_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "default_value": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_order": {
                  "format": "int32",
                  "type": "integer"
                },
                "is_required": {
                  "type": "boolean"
                },
                "label": {
                  "type": "string"
                },
                "value_bool": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "value_date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "value_float": {
                  "format": "double",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "value_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "value_int": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "value_text": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "code",
                "data_type",
                "def_id",
                "display_order",
                "is_required",
                "label"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/EntityAttributeRow"
          },
          "title": "Array_of_EntityAttributeRow",
          "type": "array"
        }
      },
      "summary": "Get all attribute definitions with values for a specific entity",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:e7f85aa4df1706711d84d5af396cc4a180c04f948ac4aee4ecdc8984a7e74616",
      "x-quark-response-schema-hash": "sha256:c400de4c8873d6b01f0afa14d2af584ccbd33f3053a98aef82929a88a4f1a402",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_entity_attribute_row",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "def_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        },
        {
          "name": "entity_id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            }
          },
          "description": "Row returned by get_entity_attributes — attribute def + current value",
          "properties": {
            "code": {
              "type": "string"
            },
            "data_type": {
              "$ref": "#/definitions/AttrDataType"
            },
            "def_id": {
              "format": "int64",
              "type": "integer"
            },
            "default_value": {
              "type": [
                "string",
                "null"
              ]
            },
            "display_order": {
              "format": "int32",
              "type": "integer"
            },
            "is_required": {
              "type": "boolean"
            },
            "label": {
              "type": "string"
            },
            "value_bool": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "value_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "value_float": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "value_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_int": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_text": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "code",
            "data_type",
            "def_id",
            "display_order",
            "is_required",
            "label"
          ],
          "title": "EntityAttributeRow",
          "type": "object"
        }
      },
      "summary": "Get single entity attribute row by def_id",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:a660a1d18a4ee016b578c84fac10d75a771539379d07476ed35f95fde65a6bd5",
      "x-quark-response-schema-hash": "sha256:28ec82e1380503af0beb0436eb6a05deb8b586fa960678a0ed62ba0d5f7999a3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_attribute_value_enriched",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "AttrDataType": {
              "enum": [
                "Text",
                "Integer",
                "Decimal",
                "Boolean",
                "Date"
              ],
              "type": "string"
            }
          },
          "description": "Enriched attribute_value row for form load — includes attribute_def fields. Field names match form_normal_details in migration 037.",
          "properties": {
            "attribute_def_id": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "data_type": {
              "$ref": "#/definitions/AttrDataType"
            },
            "entity_id": {
              "format": "int64",
              "type": "integer"
            },
            "entity_type": {
              "description": "Carried through the form load so the edit form round-trips it: the bio's `entity_type` field is what its `rpc_filter` scopes on, and a record that came back without it would be saved back without it.",
              "type": "string"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "label": {
              "type": "string"
            },
            "value_bool": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "value_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "value_float": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "value_int": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "value_text": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "attribute_def_id",
            "code",
            "data_type",
            "entity_id",
            "entity_type",
            "id",
            "label"
          ],
          "title": "AttributeValueEnriched",
          "type": "object"
        }
      },
      "summary": "Get enriched attribute_value by id (with attribute_def fields)",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:61326a1f38764f9928f8a29552e833bbd2c454699b850793c341512e04bef5a7",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "save_entity_attributes",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
              "AttributeValueInput": {
                "description": "Single attribute value for save_entity_attributes",
                "properties": {
                  "attribute_def_id": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "value_bool": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "value_date": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "value_float": {
                    "format": "double",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "value_int": {
                    "format": "int64",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "value_text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "attribute_def_id"
                ],
                "type": "object"
              }
            },
            "description": "Params for save_entity_attributes",
            "properties": {
              "entity_id": {
                "format": "int64",
                "type": "integer"
              },
              "values": {
                "items": {
                  "$ref": "#/definitions/AttributeValueInput"
                },
                "type": "array"
              }
            },
            "required": [
              "entity_id",
              "values"
            ],
            "title": "SaveEntityAttributesParams",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "uint64",
          "minimum": 0.0,
          "title": "uint64",
          "type": "integer"
        }
      },
      "summary": "Bulk upsert attribute values for an entity",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR"
      ],
      "x-quark-method-class": "domain_command",
      "x-quark-module": "entity_attribute",
      "x-quark-module-class": "mixed",
      "x-quark-operation": "execute",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:4e60e3d41d4cc2886b5392d49204c0d05e9d1378ed97dbf27f69956577c29f82",
      "x-quark-response-schema-hash": "sha256:7a8fc7dc8b5737646971d252f653d1d59469554b1ad256081706b981a02920db",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_event_registry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "category": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "code": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "is_builtin": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "name"
            ],
            "title": "EventRegistryForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_builtin": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "id",
            "is_active",
            "is_builtin",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "EventRegistry",
          "type": "object"
        }
      },
      "summary": "Create a new event_registry — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "event_registry",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:d398475b83fc661da255637a02fb1840e2b31864acdc52790478fa45d988468f",
      "x-quark-response-schema-hash": "sha256:bba19b56de0f3f2677594aa8432262faed2d66cfedccde4653964c6a57a77850",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_event_registry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_builtin": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "id",
            "is_active",
            "is_builtin",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "EventRegistry",
          "type": "object"
        }
      },
      "summary": "Get a event_registry by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "event_registry",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bba19b56de0f3f2677594aa8432262faed2d66cfedccde4653964c6a57a77850",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_event_registry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "EventRegistry": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "category": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_builtin": {
                  "type": "boolean"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "category",
                "code",
                "id",
                "is_active",
                "is_builtin",
                "mod_when",
                "mod_who",
                "name"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/EventRegistry"
          },
          "title": "Array_of_EventRegistry",
          "type": "array"
        }
      },
      "summary": "List event_registry — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "event_registry",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:7d994052575e6cb42ab0e79d02410a8c1234783eedf7b9e072fb6a19548f6455",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_event_registry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count event_registry — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "event_registry",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_event_registry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Event code and builtin ownership are stable catalog identity.",
            "properties": {
              "category": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              }
            },
            "title": "EventRegistryUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_builtin": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "id",
            "is_active",
            "is_builtin",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "EventRegistry",
          "type": "object"
        }
      },
      "summary": "Update mutable event-catalog metadata; code/builtin identity is immutable.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "event_registry",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:5a0f91281e63de61ab8822b80fdfda50a5fa983ec5e177e84f0024e5ad9b04db",
      "x-quark-response-schema-hash": "sha256:bba19b56de0f3f2677594aa8432262faed2d66cfedccde4653964c6a57a77850",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_event_registry",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "category": {
              "type": "string"
            },
            "code": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "is_builtin": {
              "type": "boolean"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "category",
            "code",
            "id",
            "is_active",
            "is_builtin",
            "mod_when",
            "mod_who",
            "name"
          ],
          "title": "EventRegistry",
          "type": "object"
        }
      },
      "summary": "Delete a event_registry by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "event_registry",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bba19b56de0f3f2677594aa8432262faed2d66cfedccde4653964c6a57a77850",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_integration_event",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "description": "Per Decisions Log D-22: extended Rust struct matching the DDL `enterprise.integration_event` (existing migration `wms-enterprise/005_integration_event_system.sql`). The `payload`, `key2`, `key3`, `internal_result` fields are present in the DDL but were previously missing from the Rust struct — this blocked `EventPublisher::publish_typed_in_txn`.",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "entity_name": {
              "type": "string"
            },
            "event_category": {
              "type": "string"
            },
            "event_code": {
              "type": "string"
            },
            "event_status": {
              "type": "string"
            },
            "failure_count": {
              "format": "int32",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "internal_result": {
              "description": "Per D-22. Results of internal processing (Decision Tables, Rules, Lua)."
            },
            "internal_status": {
              "type": "string"
            },
            "key1": {
              "type": "string"
            },
            "key2": {
              "description": "Per D-22. Secondary identifier (e.g. line_number).",
              "type": "string"
            },
            "key3": {
              "description": "Per D-22. Tertiary identifier.",
              "type": "string"
            },
            "last_error": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "payload": {
              "description": "Per D-22. Full typed event payload (JSON Schema described in event_registry)."
            },
            "tenant_id": {
              "format": "int64",
              "type": [
                "integer",
                "null"
              ]
            },
            "warehouse": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "entity_name",
            "event_category",
            "event_code",
            "event_status",
            "failure_count",
            "id",
            "internal_status",
            "key1",
            "key2",
            "key3",
            "mod_when",
            "mod_who"
          ],
          "title": "IntegrationEvent",
          "type": "object"
        }
      },
      "summary": "Get a integration_event by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:bbb962572cf3488dd5c56310fa68d2615199318d3779fdcbae47b80c925cd651",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_integration_event",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "IntegrationEvent": {
              "description": "Per Decisions Log D-22: extended Rust struct matching the DDL `enterprise.integration_event` (existing migration `wms-enterprise/005_integration_event_system.sql`). The `payload`, `key2`, `key3`, `internal_result` fields are present in the DDL but were previously missing from the Rust struct — this blocked `EventPublisher::publish_typed_in_txn`.",
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "entity_name": {
                  "type": "string"
                },
                "event_category": {
                  "type": "string"
                },
                "event_code": {
                  "type": "string"
                },
                "event_status": {
                  "type": "string"
                },
                "failure_count": {
                  "format": "int32",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "internal_result": {
                  "description": "Per D-22. Results of internal processing (Decision Tables, Rules, Lua)."
                },
                "internal_status": {
                  "type": "string"
                },
                "key1": {
                  "type": "string"
                },
                "key2": {
                  "description": "Per D-22. Secondary identifier (e.g. line_number).",
                  "type": "string"
                },
                "key3": {
                  "description": "Per D-22. Tertiary identifier.",
                  "type": "string"
                },
                "last_error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "payload": {
                  "description": "Per D-22. Full typed event payload (JSON Schema described in event_registry)."
                },
                "tenant_id": {
                  "format": "int64",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "warehouse": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "entity_name",
                "event_category",
                "event_code",
                "event_status",
                "failure_count",
                "id",
                "internal_status",
                "key1",
                "key2",
                "key3",
                "mod_when",
                "mod_who"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/IntegrationEvent"
          },
          "title": "Array_of_IntegrationEvent",
          "type": "array"
        }
      },
      "summary": "List integration_event — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:6b373d489507ce0a5e4f2f5049554e10ab4771780d3b8d5f0429fefd32f2a4ef",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_integration_event",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count integration_event — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "create_integration_subscriber",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "code": {
                "type": "string"
              },
              "delivery": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "event_filter": true,
              "max_retries": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "retry_delay_sec": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "warehouse_filter": true,
              "webhook_headers": true,
              "webhook_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "delivery",
              "name"
            ],
            "title": "IntegrationSubscriberForCreate",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "delivery": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "event_filter": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_retries": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "retry_delay_sec": {
              "format": "int32",
              "type": "integer"
            },
            "warehouse_filter": true,
            "webhook_url": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "delivery",
            "event_filter",
            "id",
            "is_active",
            "max_retries",
            "mod_when",
            "mod_who",
            "name",
            "retry_delay_sec"
          ],
          "title": "IntegrationSubscriber",
          "type": "object"
        }
      },
      "summary": "Create a validated integration event subscriber.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-command-type": "stateless_command",
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "create",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:11c6c97363f5b3902ae93aaca7f956079dbc0504300d357e3f312dc24007937f",
      "x-quark-response-schema-hash": "sha256:697b737de0e8de9e0c50a99b61d6837e36655983b1fd95bcc42b362c42b88cc2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_integration_subscriber",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "delivery": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "event_filter": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_retries": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "retry_delay_sec": {
              "format": "int32",
              "type": "integer"
            },
            "warehouse_filter": true,
            "webhook_url": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "delivery",
            "event_filter",
            "id",
            "is_active",
            "max_retries",
            "mod_when",
            "mod_who",
            "name",
            "retry_delay_sec"
          ],
          "title": "IntegrationSubscriber",
          "type": "object"
        }
      },
      "summary": "Get a integration_subscriber by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:697b737de0e8de9e0c50a99b61d6837e36655983b1fd95bcc42b362c42b88cc2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_integration_subscriber",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "IntegrationSubscriber": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "code": {
                  "type": "string"
                },
                "delivery": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "event_filter": true,
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "is_active": {
                  "type": "boolean"
                },
                "max_retries": {
                  "format": "int32",
                  "type": "integer"
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "name": {
                  "type": "string"
                },
                "retry_delay_sec": {
                  "format": "int32",
                  "type": "integer"
                },
                "warehouse_filter": true,
                "webhook_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "add_when",
                "add_who",
                "code",
                "delivery",
                "event_filter",
                "id",
                "is_active",
                "max_retries",
                "mod_when",
                "mod_who",
                "name",
                "retry_delay_sec"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/IntegrationSubscriber"
          },
          "title": "Array_of_IntegrationSubscriber",
          "type": "array"
        }
      },
      "summary": "List integration_subscriber — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:cc4a0182ff6eb0d591edb1943039d6713391169acc3d9ba506c458f5d507d9a3",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_integration_subscriber",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count integration_subscriber — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "update_integration_subscriber",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        },
        {
          "name": "data",
          "required": true,
          "schema": {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "additionalProperties": false,
            "description": "Subscriber code is stable binding identity. A webhook may be cleared when delivery switches back to polling.",
            "properties": {
              "delivery": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "event_filter": true,
              "is_active": {
                "type": "boolean"
              },
              "max_retries": {
                "format": "int32",
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "retry_delay_sec": {
                "format": "int32",
                "type": "integer"
              },
              "warehouse_filter": true,
              "webhook_headers": true,
              "webhook_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "title": "IntegrationSubscriberUpdateApi",
            "type": "object"
          },
          "summary": null
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "delivery": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "event_filter": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_retries": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "retry_delay_sec": {
              "format": "int32",
              "type": "integer"
            },
            "warehouse_filter": true,
            "webhook_url": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "delivery",
            "event_filter",
            "id",
            "is_active",
            "max_retries",
            "mod_when",
            "mod_who",
            "name",
            "retry_delay_sec"
          ],
          "title": "IntegrationSubscriber",
          "type": "object"
        }
      },
      "summary": "Update integration subscriber configuration with explicit webhook clearing.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "update",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:f340cb53c359389f7b04c00ebdb66fa3e10945efe21f0e59c20a0214a12d25bf",
      "x-quark-response-schema-hash": "sha256:697b737de0e8de9e0c50a99b61d6837e36655983b1fd95bcc42b362c42b88cc2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "delete_integration_subscriber",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "code": {
              "type": "string"
            },
            "delivery": {
              "type": "string"
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "event_filter": true,
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "is_active": {
              "type": "boolean"
            },
            "max_retries": {
              "format": "int32",
              "type": "integer"
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "retry_delay_sec": {
              "format": "int32",
              "type": "integer"
            },
            "warehouse_filter": true,
            "webhook_url": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "add_when",
            "add_who",
            "code",
            "delivery",
            "event_filter",
            "id",
            "is_active",
            "max_retries",
            "mod_when",
            "mod_who",
            "name",
            "retry_delay_sec"
          ],
          "title": "IntegrationSubscriber",
          "type": "object"
        }
      },
      "summary": "Delete a integration_subscriber by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER"
      ],
      "x-quark-method-class": "reference_crud",
      "x-quark-module": "integration_event",
      "x-quark-module-class": "reference_crud",
      "x-quark-operation": "delete",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:697b737de0e8de9e0c50a99b61d6837e36655983b1fd95bcc42b362c42b88cc2",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "get_integration_event_delivery",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "id",
          "required": true,
          "schema": {
            "format": "int64",
            "type": "integer"
          },
          "summary": "Record ID"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "properties": {
            "add_when": {
              "type": "string"
            },
            "add_who": {
              "format": "int64",
              "type": "integer"
            },
            "attempts": {
              "format": "int32",
              "type": "integer"
            },
            "event_id": {
              "format": "int64",
              "type": "integer"
            },
            "id": {
              "format": "int64",
              "type": "integer"
            },
            "last_attempt": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "last_error": {
              "type": [
                "string",
                "null"
              ]
            },
            "mod_when": {
              "type": "string"
            },
            "mod_who": {
              "format": "int64",
              "type": "integer"
            },
            "next_attempt": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            },
            "response_code": {
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "subscriber_id": {
              "format": "int64",
              "type": "integer"
            },
            "transmit_batch": {
              "type": [
                "string",
                "null"
              ]
            },
            "transmit_status": {
              "type": "string"
            }
          },
          "required": [
            "add_when",
            "add_who",
            "attempts",
            "event_id",
            "id",
            "mod_when",
            "mod_who",
            "subscriber_id",
            "transmit_status"
          ],
          "title": "IntegrationEventDelivery",
          "type": "object"
        }
      },
      "summary": "Get a integration_event_delivery by ID — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "integration_event_delivery",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:44d34b9191376ed047e6e458021710824ccf4f3f62d774b377bb239334c7dec8",
      "x-quark-response-schema-hash": "sha256:2df5bd1b9fb337e60ea17a9ec227139fe9087a871e020ba9f0229c05edf256f0",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "list_integration_event_delivery",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "definitions": {
            "IntegrationEventDelivery": {
              "properties": {
                "add_when": {
                  "type": "string"
                },
                "add_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "attempts": {
                  "format": "int32",
                  "type": "integer"
                },
                "event_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "id": {
                  "format": "int64",
                  "type": "integer"
                },
                "last_attempt": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mod_when": {
                  "type": "string"
                },
                "mod_who": {
                  "format": "int64",
                  "type": "integer"
                },
                "next_attempt": {
                  "default": null,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "response_code": {
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "subscriber_id": {
                  "format": "int64",
                  "type": "integer"
                },
                "transmit_batch": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "transmit_status": {
                  "type": "string"
                }
              },
              "required": [
                "add_when",
                "add_who",
                "attempts",
                "event_id",
                "id",
                "mod_when",
                "mod_who",
                "subscriber_id",
                "transmit_status"
              ],
              "type": "object"
            }
          },
          "items": {
            "$ref": "#/definitions/IntegrationEventDelivery"
          },
          "title": "Array_of_IntegrationEventDelivery",
          "type": "array"
        }
      },
      "summary": "List integration_event_delivery — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "integration_event_delivery",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:a646752748b395b4a77dcb1011786ba4bdf4fc61520390a0fa8e22299af7b107",
      "x-quark-transaction-readiness": "replace_only"
    },
    {
      "name": "count_integration_event_delivery",
      "paramStructure": "by-name",
      "params": [
        {
          "name": "filters",
          "required": false,
          "schema": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": "Filter criteria"
        },
        {
          "name": "list_options",
          "required": false,
          "schema": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "summary": "Pagination/sorting"
        }
      ],
      "result": {
        "name": "result",
        "required": true,
        "schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "format": "int64",
          "title": "int64",
          "type": "integer"
        }
      },
      "summary": "Count integration_event_delivery — CRUD.",
      "tags": [
        {
          "name": "integration"
        }
      ],
      "x-quark-context": "integration",
      "x-quark-default-roles": [
        "ADMIN",
        "MANAGER",
        "OPERATOR",
        "VIEWER"
      ],
      "x-quark-method-class": "read_model",
      "x-quark-module": "integration_event_delivery",
      "x-quark-module-class": "read_model",
      "x-quark-operation": "read",
      "x-quark-override-mode": "replace",
      "x-quark-request-schema-hash": "sha256:6e530a8f749659ac9d2a87cf53542bfe9dfd9fc09d7769d71214560f52d323aa",
      "x-quark-response-schema-hash": "sha256:48804555f43bdca5b965625db5b8003e0d259aa2a383749918fdf76c3495ff76",
      "x-quark-transaction-readiness": "replace_only"
    }
  ],
  "openrpc": "1.3.2",
  "servers": [
    {
      "description": "Local development server",
      "url": "http://localhost:8081/api/rpc"
    }
  ],
  "x-quark-rpc-catalog": {
    "classified_method_count": 932,
    "context_count": 9,
    "contexts": [
      {
        "id": "enterprise",
        "modules": [
          {
            "class": "reference_crud",
            "id": "project",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_project",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_projects",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_project",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_project",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_project",
              "list_projects",
              "update_project",
              "delete_project"
            ]
          },
          {
            "class": "mixed",
            "id": "user",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "me",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "create_user",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "get_user",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "list_user",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "count_user",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "update_user",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_user",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_many_user",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "me",
              "create_user",
              "get_user",
              "list_user",
              "count_user",
              "update_user",
              "delete_user",
              "delete_many_user"
            ]
          },
          {
            "class": "reference_crud",
            "id": "sys_settings",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_system_settings",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_system_settings",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_system_settings",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_system_settings",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_system_settings",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_system_settings",
              "get_system_settings",
              "list_system_settings",
              "update_system_settings",
              "delete_system_settings"
            ]
          },
          {
            "class": "mixed",
            "id": "warehouse",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "warehouse_admin_list",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "warehouse_admin_get",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "warehouse_admin_create",
                "operation": "create",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "warehouse_admin_update",
                "operation": "update",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_user_warehouses",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_warehouse_defaults",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "warehouse_settings_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "warehouse_set_shared_tote_mixed_owners",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "warehouse_set_station_route_abandoned_after",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "warehouse_admin_list",
              "warehouse_admin_get",
              "warehouse_admin_create",
              "warehouse_admin_update",
              "list_user_warehouses",
              "get_warehouse_defaults",
              "warehouse_settings_list",
              "warehouse_set_shared_tote_mixed_owners",
              "warehouse_set_station_route_abandoned_after"
            ]
          },
          {
            "class": "reference_crud",
            "id": "role",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "create_role",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_role",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_role",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "update_role",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_role",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_many_role",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_role",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "create_role_permission",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_role_permission",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_role_permission",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "update_role_permission",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_role_permission",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_many_role_permission",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_role_permission",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_role",
              "get_role",
              "list_role",
              "update_role",
              "delete_role",
              "delete_many_role",
              "count_role",
              "create_role_permission",
              "get_role_permission",
              "list_role_permission",
              "update_role_permission",
              "delete_role_permission",
              "delete_many_role_permission",
              "count_role_permission"
            ]
          },
          {
            "class": "domain_command",
            "id": "override_grant",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "supervisor_override_grant",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "supervisor_override_grant"
            ]
          },
          {
            "class": "reference_crud",
            "id": "user_warehouse",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "create_user_warehouse",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_user_warehouse",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_user_warehouse",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "update_user_warehouse",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_user_warehouse",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_many_user_warehouse",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_user_warehouse",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_user_warehouse",
              "get_user_warehouse",
              "list_user_warehouse",
              "update_user_warehouse",
              "delete_user_warehouse",
              "delete_many_user_warehouse",
              "count_user_warehouse"
            ]
          },
          {
            "class": "mixed",
            "id": "user_api_key",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "generate_user_api_key",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "revoke_user_api_key",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "get_user_api_key",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "list_user_api_key",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "count_user_api_key",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "generate_user_api_key",
              "revoke_user_api_key",
              "get_user_api_key",
              "list_user_api_key",
              "count_user_api_key"
            ]
          },
          {
            "class": "read_model",
            "id": "audit_log",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_audit_log",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_audit_log",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_audit_log",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_audit_event_kinds",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_audit_log",
              "list_audit_log",
              "count_audit_log",
              "list_audit_event_kinds"
            ]
          },
          {
            "class": "mixed",
            "id": "role_permission",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "batch_update_role_permissions",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "list_role_permissions_tree",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "batch_update_role_permissions",
              "list_role_permissions_tree"
            ]
          },
          {
            "class": "mixed",
            "id": "permission_matrix",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_permission_matrix",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "batch_upsert_permission_matrix",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "list_permission_matrix",
              "batch_upsert_permission_matrix"
            ]
          },
          {
            "class": "read_model",
            "id": "dashboard",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "dashboard_snapshot_rpc",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "dashboard_snapshot_rpc"
            ]
          },
          {
            "class": "mixed",
            "id": "dashboard_setting",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_dashboard_setting",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_dashboard_metric_threshold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_dashboard_metric_threshold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "dashboard_metric_threshold_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "dashboard_setting_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "dashboard_setting_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "dashboard_metric_threshold_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "dashboard_metric_threshold_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "dashboard_metric_catalogue",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "update_dashboard_setting",
              "create_dashboard_metric_threshold",
              "update_dashboard_metric_threshold",
              "dashboard_metric_threshold_delete",
              "dashboard_setting_get",
              "dashboard_setting_list",
              "dashboard_metric_threshold_get",
              "dashboard_metric_threshold_list",
              "dashboard_metric_catalogue"
            ]
          },
          {
            "class": "mixed",
            "id": "log_level",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "set_log_level",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "get_log_level",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "set_log_level",
              "get_log_level"
            ]
          },
          {
            "class": "reference_crud",
            "id": "handling_unit_type",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_handling_unit_type",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_handling_unit_type",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_handling_unit_type",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_handling_unit_type",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_handling_unit_type",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_handling_unit_type",
              "get_handling_unit_type",
              "list_handling_unit_type",
              "count_handling_unit_type",
              "update_handling_unit_type"
            ]
          }
        ]
      },
      {
        "id": "master_data",
        "modules": [
          {
            "class": "reference_crud",
            "id": "code",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_code_list",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_code_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_code_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_code_list",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_code_list",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_code_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_code_list",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_code_list",
              "get_code_list",
              "list_code_list",
              "update_code_list",
              "delete_code_list",
              "count_code_list",
              "delete_many_code_list"
            ]
          },
          {
            "class": "reference_crud",
            "id": "code_value",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_code_list_value",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_code_list_value",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_code_list_value",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_code_list_value",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_code_list_value",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_code_list_value",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_code_list_value",
              "get_code_list_value",
              "list_code_list_value",
              "update_code_list_value",
              "delete_code_list_value",
              "count_code_list_value"
            ]
          },
          {
            "class": "mixed",
            "id": "pack",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_pack",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_pack_with_items",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_pack_item",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_pack",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_pack_with_items",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_pack_item",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_pack",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_pack_with_items",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_pack_item",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_packs",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_pack_items",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_pack",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_pack_item",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_pack_with_items",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_pack",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_pack_hierarchy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "convert_pack_uom",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "calc_pack_quantity_breakdown",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "calc_pack_pallet_breakdown",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "recalculate_pack_hierarchy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_pack",
              "create_pack_with_items",
              "create_pack_item",
              "get_pack",
              "get_pack_with_items",
              "get_pack_item",
              "update_pack",
              "update_pack_with_items",
              "update_pack_item",
              "list_packs",
              "list_pack_items",
              "delete_pack",
              "delete_pack_item",
              "delete_pack_with_items",
              "count_pack",
              "get_pack_hierarchy",
              "convert_pack_uom",
              "calc_pack_quantity_breakdown",
              "calc_pack_pallet_breakdown",
              "recalculate_pack_hierarchy"
            ]
          },
          {
            "class": "mixed",
            "id": "owner",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_owner",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner_full",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner_config_by_owner",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_owner_full",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_owner_full",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_owner",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_owner",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_owner",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_owner",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "search_owners",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_owner",
              "get_owner",
              "get_owner_full",
              "get_owner_config_by_owner",
              "create_owner_full",
              "update_owner_full",
              "list_owner",
              "update_owner",
              "delete_owner",
              "count_owner",
              "search_owners"
            ]
          },
          {
            "class": "reference_crud",
            "id": "owner_address",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_owner_address",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner_address",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_owner_address",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_owner_address",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_owner_address",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_owner_address",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_owner_address",
              "get_owner_address",
              "list_owner_address",
              "update_owner_address",
              "delete_owner_address",
              "count_owner_address"
            ]
          },
          {
            "class": "reference_crud",
            "id": "owner_bank_account",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_owner_bank_account",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner_bank_account",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_owner_bank_account",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_owner_bank_account",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_owner_bank_account",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_owner_bank_account",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_owner_bank_account",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_owner_bank_account",
              "get_owner_bank_account",
              "list_owner_bank_account",
              "update_owner_bank_account",
              "delete_owner_bank_account",
              "delete_many_owner_bank_account",
              "count_owner_bank_account"
            ]
          },
          {
            "class": "mixed",
            "id": "owner_config",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_owner_config",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner_config",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_owner_config",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_owner_config",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_owner_config",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_owner_config",
              "get_owner_config",
              "list_owner_config",
              "update_owner_config",
              "count_owner_config"
            ]
          },
          {
            "class": "reference_crud",
            "id": "putawayzone",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_putawayzone",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_putawayzone",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_putawayzone_by_code",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_putawayzone",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_putawayzone",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_putawayzone",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_putawayzone",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_putawayzone",
              "get_putawayzone",
              "get_putawayzone_by_code",
              "list_putawayzone",
              "count_putawayzone",
              "update_putawayzone",
              "delete_putawayzone"
            ]
          },
          {
            "class": "mixed",
            "id": "location",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_loc",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_loc",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_loc_by_code",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_loc",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_loc",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_loc",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_many_locs",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "gen_locs",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "preview_gen_locs",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_loc",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_loc",
              "get_loc",
              "get_loc_by_code",
              "list_loc",
              "update_loc",
              "delete_loc",
              "delete_many_locs",
              "gen_locs",
              "preview_gen_locs",
              "count_loc"
            ]
          },
          {
            "class": "reference_crud",
            "id": "loc_lot_commingle",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_loc_lot_commingle",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_loc_lot_commingle",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_loc_lot_commingle",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_loc_lot_commingle",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_loc_lot_commingle",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_loc_lot_commingle",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_loc_lot_commingle",
              "get_loc_lot_commingle",
              "list_loc_lot_commingle",
              "update_loc_lot_commingle",
              "delete_loc_lot_commingle",
              "count_loc_lot_commingle"
            ]
          },
          {
            "class": "reference_crud",
            "id": "putawayzone_lot_commingle",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_putawayzone_lot_commingle",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_putawayzone_lot_commingle",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_putawayzone_lot_commingle",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_putawayzone_lot_commingle",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_putawayzone_lot_commingle",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_putawayzone_lot_commingle",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_putawayzone_lot_commingle",
              "get_putawayzone_lot_commingle",
              "list_putawayzone_lot_commingle",
              "count_putawayzone_lot_commingle",
              "update_putawayzone_lot_commingle",
              "delete_putawayzone_lot_commingle"
            ]
          },
          {
            "class": "mixed",
            "id": "sku",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_sku",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_sku_full",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_sku_full",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_full",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_sku",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_sku",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_sku",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_info",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_sku",
              "create_sku_full",
              "update_sku_full",
              "get_sku",
              "get_sku_full",
              "list_sku",
              "update_sku",
              "delete_sku",
              "get_sku_info"
            ]
          },
          {
            "class": "read_model",
            "id": "sku_audit",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_audit",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_sku_audit",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_sku_audit",
              "list_sku_audit"
            ]
          },
          {
            "class": "mixed",
            "id": "sku_barcode",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_sku_barcode",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_barcode",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_sku_barcode",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_sku_barcode",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_sku_barcode",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_many_sku_barcode",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_sku_barcode",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_sku_barcode",
              "get_sku_barcode",
              "list_sku_barcode",
              "update_sku_barcode",
              "delete_sku_barcode",
              "delete_many_sku_barcode",
              "count_sku_barcode"
            ]
          },
          {
            "class": "mixed",
            "id": "barcode_format",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_barcode_format",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_barcode_format",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_barcode_format",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_barcode_format",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_barcode_format",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_barcode_format",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_barcode_format",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "parse_barcode",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_barcode_format",
              "get_barcode_format",
              "list_barcode_format",
              "update_barcode_format",
              "delete_barcode_format",
              "delete_many_barcode_format",
              "count_barcode_format",
              "parse_barcode"
            ]
          },
          {
            "class": "mixed",
            "id": "barcode_format_detail",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_barcode_format_detail",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_barcode_format_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_barcode_format_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_barcode_format_detail",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_barcode_format_detail",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_barcode_format_detail",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_barcode_format_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "next_barcode_format_detail_sequence",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_barcode_format_detail",
              "get_barcode_format_detail",
              "list_barcode_format_detail",
              "update_barcode_format_detail",
              "delete_barcode_format_detail",
              "delete_many_barcode_format_detail",
              "count_barcode_format_detail",
              "next_barcode_format_detail_sequence"
            ]
          },
          {
            "class": "read_model",
            "id": "check_digit",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "generate_check_digit",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "generate_check_digit"
            ]
          },
          {
            "class": "domain_command",
            "id": "key",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_next_key",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_next_key"
            ]
          }
        ]
      },
      {
        "id": "inbound",
        "modules": [
          {
            "class": "mixed",
            "id": "lot_policy",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_lot_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_lot_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_lot_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_lot_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_lot_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_lot_policy_attribute",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_lot_policy_attribute",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_lot_policy_attribute",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "lot_policy_config_view",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "lot_policy_config_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_lot_policy_attribute_form",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "lot_policy_config_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "lot_policy_config_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_lot_policy_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_lot_policy_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_lot_policy_attribute_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_lot_policy_attribute_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_lot_policy_attribute_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_lot_policy_attribute_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_lot_policy",
              "list_lot_policy",
              "delete_lot_policy",
              "delete_many_lot_policy",
              "count_lot_policy",
              "get_lot_policy_attribute",
              "list_lot_policy_attribute",
              "count_lot_policy_attribute",
              "lot_policy_config_view",
              "lot_policy_config_template",
              "get_lot_policy_attribute_form",
              "lot_policy_config_create",
              "lot_policy_config_save",
              "create_lot_policy_form",
              "update_lot_policy_form",
              "create_lot_policy_attribute_form",
              "update_lot_policy_attribute_form",
              "delete_lot_policy_attribute_form",
              "delete_many_lot_policy_attribute_form"
            ]
          },
          {
            "class": "mixed",
            "id": "receipt_policy",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_receipt_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_receipt_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_receipt_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_receipt_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_receipt_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_receipt_policy",
              "get_receipt_policy",
              "list_receipt_policy",
              "update_receipt_policy",
              "delete_receipt_policy",
              "delete_many_receipt_policy",
              "count_receipt_policy"
            ]
          },
          {
            "class": "mixed",
            "id": "receipt",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_receipt",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_receipt",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_receipt",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_many_receipt",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_receipt",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "find_receipt_by_number",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "find_receipt_by_rma",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "find_receipt_line_by_sku",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "validate_lpn_unused",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "find_printer_for_context",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_summary",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_full",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_envelope",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "assign_lpn",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_owner_damage_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_my_open_receipts",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_hold_history",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_detail_history",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_close_blockers",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_cancel_blockers",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "lookup_asn",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "search_asns",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_asn_by_number",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_open_blind_receipts",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_damage_severity_codes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_damage_action_codes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_shortage_reasons",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "search_open_lpns",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_qty_adjust_reasons",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_open_customer_returns",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_adjust_qty",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_close",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_cancel",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_put_on_hold",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_report_damage",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_receive_against_asn",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_receive_blind_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_receive_return",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_receipt",
              "get_receipt",
              "list_receipt",
              "update_receipt",
              "delete_receipt",
              "delete_many_receipt",
              "count_receipt",
              "find_receipt_by_number",
              "find_receipt_by_rma",
              "find_receipt_line_by_sku",
              "validate_lpn_unused",
              "find_printer_for_context",
              "get_receipt_summary",
              "get_receipt_full",
              "get_sku_envelope",
              "assign_lpn",
              "get_owner_damage_policy",
              "list_my_open_receipts",
              "get_receipt_hold_history",
              "get_receipt_detail_history",
              "get_close_blockers",
              "get_cancel_blockers",
              "lookup_asn",
              "search_asns",
              "get_asn_by_number",
              "list_open_blind_receipts",
              "list_damage_severity_codes",
              "list_damage_action_codes",
              "list_shortage_reasons",
              "search_open_lpns",
              "list_qty_adjust_reasons",
              "list_open_customer_returns",
              "pre_validate_adjust_qty",
              "pre_validate_close",
              "pre_validate_cancel",
              "pre_validate_put_on_hold",
              "pre_validate_report_damage",
              "pre_validate_receive_against_asn",
              "pre_validate_receive_blind_line",
              "pre_validate_receive_return"
            ]
          },
          {
            "class": "mixed",
            "id": "receipt_commands",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_receive_against_asn",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_cancel",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_put_on_hold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_release_from_hold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_report_damage",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_write_off_damage",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_move_damage_to_rtv",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_set_damage_disposition",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_receive_blind",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_receive_blind_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_receive_return",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_receive_return_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_adjust_received_qty",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_kpi_aggregate",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "receipt_receive_against_asn",
              "receipt_cancel",
              "receipt_put_on_hold",
              "receipt_release_from_hold",
              "receipt_report_damage",
              "receipt_write_off_damage",
              "receipt_move_damage_to_rtv",
              "receipt_set_damage_disposition",
              "receipt_receive_blind",
              "receipt_receive_blind_line",
              "receipt_receive_return",
              "receipt_receive_return_line",
              "receipt_close",
              "receipt_adjust_received_qty",
              "receipt_kpi_aggregate"
            ]
          },
          {
            "class": "read_model",
            "id": "receipt_audit",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_audit",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_audit",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_receipt_audit",
              "list_receipt_audit"
            ]
          },
          {
            "class": "mixed",
            "id": "receipt_detail",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_receipt_detail",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_detail_lines",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_detail_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_receive_context",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "update_receipt_detail",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_receipt_detail",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN"
                ],
                "name": "delete_many_receipt_detail",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_receipt_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_receipt_detail",
              "get_receipt_detail",
              "list_receipt_detail",
              "list_receipt_detail_lines",
              "get_receipt_detail_line",
              "get_receipt_receive_context",
              "update_receipt_detail",
              "delete_receipt_detail",
              "delete_many_receipt_detail",
              "count_receipt_detail"
            ]
          },
          {
            "class": "mixed",
            "id": "receipt_expected_lot_attributes",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_receipt_detail_lot_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_detail_lot_attributes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_detail_lot_attributes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_receipt_detail_lot_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_receipt_detail_lot_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_receipt_detail_lot_attributes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_receipt_detail_lot_attributes",
              "get_receipt_detail_lot_attributes",
              "list_receipt_detail_lot_attributes",
              "update_receipt_detail_lot_attributes",
              "delete_receipt_detail_lot_attributes",
              "count_receipt_detail_lot_attributes"
            ]
          },
          {
            "class": "read_model",
            "id": "receipt_detail_damage",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_receipt_detail_damage",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_detail_damage",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_receipt_detail_damage",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "receipt_damage_vocabulary",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "receipt_damage_destination",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "receipt_damage_context",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_receipt_detail_damage",
              "list_receipt_detail_damage",
              "count_receipt_detail_damage",
              "receipt_damage_vocabulary",
              "receipt_damage_destination",
              "receipt_damage_context"
            ]
          },
          {
            "class": "read_model",
            "id": "receipt_damage_photo",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_damage_photo_upload_url",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "receipt_damage_photo_view_urls",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "receipt_damage_photo_upload_url",
              "receipt_damage_photo_view_urls"
            ]
          },
          {
            "class": "read_model",
            "id": "case_level",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "find_planned_case",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_case_envelope",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "validate_pallet_unique",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_receipt_cases",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "find_unreceived_cases",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pre_validate_receive_case_level",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_case_level_asn_by_number",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "lookup_case_level_asn",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "find_planned_case",
              "get_case_envelope",
              "validate_pallet_unique",
              "list_receipt_cases",
              "find_unreceived_cases",
              "pre_validate_receive_case_level",
              "get_case_level_asn_by_number",
              "lookup_case_level_asn"
            ]
          },
          {
            "class": "domain_command",
            "id": "case_level_commands",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "receipt_create_case_level_asn",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_receive_case_level_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "receipt_replace_pallet",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "receipt_cancel_planned_case",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "receipt_create_case_level_asn",
              "receipt_receive_case_level_line",
              "receipt_replace_pallet",
              "receipt_cancel_planned_case"
            ]
          }
        ]
      },
      {
        "id": "inventory",
        "modules": [
          {
            "class": "mixed",
            "id": "putaway_policy",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_putaway_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_putaway_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_putaway_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_putaway_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "delete_putaway_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "delete_many_putaway_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_putaway_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_putaway_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_putaway_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_putaway_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_putaway_step_criterion",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_putaway_step_criterion",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_putaway_step_criterion",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "putaway_pipeline_view",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "putaway_criterion_vocabulary",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "putaway_dry_run",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "putaway_steps_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "putaway_step_add",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "putaway_step_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "putaway_steps_reorder",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_putaway_policy",
              "get_putaway_policy",
              "list_putaway_policy",
              "update_putaway_policy",
              "delete_putaway_policy",
              "delete_many_putaway_policy",
              "count_putaway_policy",
              "get_putaway_policy_detail",
              "list_putaway_policy_detail",
              "count_putaway_policy_detail",
              "get_putaway_step_criterion",
              "list_putaway_step_criterion",
              "count_putaway_step_criterion",
              "putaway_pipeline_view",
              "putaway_criterion_vocabulary",
              "putaway_dry_run",
              "putaway_steps_save",
              "putaway_step_add",
              "putaway_step_delete",
              "putaway_steps_reorder"
            ]
          },
          {
            "class": "reference_crud",
            "id": "inventory_hold_code",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_inventory_hold_code",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_inventory_hold_code",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_hold_code",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_inventory_hold_code",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_inventory_hold_code",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_inventory_hold_code",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_hold_code",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_inventory_hold_code",
              "get_inventory_hold_code",
              "list_inventory_hold_code",
              "update_inventory_hold_code",
              "delete_inventory_hold_code",
              "delete_many_inventory_hold_code",
              "count_inventory_hold_code"
            ]
          },
          {
            "class": "mixed",
            "id": "move_command",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "move_execute",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "generate_lpn",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "print_lpn_label",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "move_source_holds",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "move_execute",
              "generate_lpn",
              "print_lpn_label",
              "move_source_holds"
            ]
          },
          {
            "class": "mixed",
            "id": "putaway",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "putaway_suggest_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "putaway_explain_location",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "putaway_release_reservation",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_pending_move_in",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_pending_move_in",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "putaway_suggest_location",
              "putaway_explain_location",
              "putaway_release_reservation",
              "list_inventory_pending_move_in",
              "count_inventory_pending_move_in"
            ]
          },
          {
            "class": "mixed",
            "id": "hold",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_active_holds_by_lpn",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_inventory_hold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_inventory_hold_row",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "release_inventory_hold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "list_active_holds_by_lpn",
              "create_inventory_hold",
              "create_inventory_hold_row",
              "release_inventory_hold"
            ]
          },
          {
            "class": "mixed",
            "id": "serial_commands",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "serial_reserve",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "serial_pick",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "serial_ship",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "serial_return",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "serial_dispose",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "serial_move",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "remove_captured_serial",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "capture_serial",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "cancel_episode",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "force_close_episode",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_open_episodes_for_receipt",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_open_episodes_for_operator",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "list_force_close_candidates",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "serial_reserve",
              "serial_pick",
              "serial_ship",
              "serial_return",
              "serial_dispose",
              "serial_move",
              "remove_captured_serial",
              "capture_serial",
              "cancel_episode",
              "force_close_episode",
              "list_open_episodes_for_receipt",
              "list_open_episodes_for_operator",
              "list_force_close_candidates"
            ]
          },
          {
            "class": "read_model",
            "id": "transaction_log",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_transaction_log",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_transaction_log",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_transaction_log",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "list_transaction_log",
              "get_transaction_log",
              "count_transaction_log"
            ]
          },
          {
            "class": "mixed",
            "id": "sku_pick_location",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_pick_location",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_sku_pick_location",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_sku_pick_location",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_sku_pick_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_sku_pick_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "delete_sku_pick_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_sku_pick_location",
              "list_sku_pick_location",
              "count_sku_pick_location",
              "create_sku_pick_location",
              "update_sku_pick_location",
              "delete_sku_pick_location"
            ]
          },
          {
            "class": "mixed",
            "id": "replenishment",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "replenishment_take_next",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "replenishment_confirm",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "replenishment_plan",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "replenishment_cancel",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "replenishment_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "replenishment_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "replenishment_count",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "replenishment_take_next",
              "replenishment_confirm",
              "replenishment_plan",
              "replenishment_cancel",
              "replenishment_get",
              "replenishment_list",
              "replenishment_count"
            ]
          },
          {
            "class": "mixed",
            "id": "sku_serial_config",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_sku_serial_config",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_serial_config",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_sku_serial_config_by_sku",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_sku_serial_config",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_sku_serial_config",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_sku_serial_config",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_sku_serial_config",
              "get_sku_serial_config",
              "get_sku_serial_config_by_sku",
              "list_sku_serial_config",
              "update_sku_serial_config",
              "count_sku_serial_config"
            ]
          },
          {
            "class": "read_model",
            "id": "inventory_balance_serial",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_inventory_balance_serial",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_serial",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance_serial",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_inventory_balance_serial",
              "list_inventory_balance_serial",
              "count_inventory_balance_serial"
            ]
          },
          {
            "class": "mixed",
            "id": "handling_unit",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "handling_unit_register",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_handling_unit",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "handling_unit_register",
              "list_handling_unit"
            ]
          },
          {
            "class": "mixed",
            "id": "inventory_adjustment",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_add_lines",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_add_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_generate_lines",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_update_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_remove_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_validate",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_post",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_reverse",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_adjustment_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_inventory_adjustment",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_inventory_adjustment",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_inventory_adjustment_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_inventory_adjustment_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "inventory_adjustment_approve",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "inventory_adjust_reason_set_count",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_adjustment_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_adjustment_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_adjustment_list_lines",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_adjustment_card_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_adjustment_line_preview_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "get_inventory_adjustment_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_adjust_reason_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "inventory_adjustment_create",
              "inventory_adjustment_add_lines",
              "inventory_adjustment_add_line",
              "inventory_adjustment_generate_lines",
              "inventory_adjustment_update_line",
              "inventory_adjustment_remove_line",
              "inventory_adjustment_validate",
              "inventory_adjustment_post",
              "inventory_adjustment_reverse",
              "inventory_adjustment_delete",
              "create_inventory_adjustment",
              "update_inventory_adjustment",
              "create_inventory_adjustment_line",
              "update_inventory_adjustment_line",
              "inventory_adjustment_approve",
              "inventory_adjust_reason_set_count",
              "inventory_adjustment_get",
              "inventory_adjustment_list",
              "inventory_adjustment_list_lines",
              "inventory_adjustment_card_get",
              "inventory_adjustment_line_preview_list",
              "get_inventory_adjustment_line",
              "inventory_adjust_reason_list"
            ]
          },
          {
            "class": "mixed",
            "id": "inventory_count",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_task_take_next",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_task_at_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_task_leave",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_observe",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_void_observation",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_confirm_empty",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_complete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "location_confirm_empty",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "location_report_unexpected",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_add_locations",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_remove_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_accept",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_recount",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_cancel",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_inventory_count",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_policy_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_policy_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_policy_run",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "inventory_count_policy_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_inventory_count_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_inventory_count_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_inventory_count_tolerance",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "inventory_count_task_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_list_tasks",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_card_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_location_results",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_location_serials",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_task_card_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_policy_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_policy_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_tolerance_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "inventory_count_tolerance_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "location_checks",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "inventory_count_task_take_next",
              "inventory_count_task_at_location",
              "inventory_count_task_leave",
              "inventory_count_observe",
              "inventory_count_void_observation",
              "inventory_count_confirm_empty",
              "inventory_count_complete",
              "location_confirm_empty",
              "location_report_unexpected",
              "inventory_count_create",
              "inventory_count_add_locations",
              "inventory_count_remove_location",
              "inventory_count_accept",
              "inventory_count_recount",
              "inventory_count_cancel",
              "inventory_count_delete",
              "create_inventory_count",
              "inventory_count_policy_create",
              "inventory_count_policy_save",
              "inventory_count_policy_run",
              "inventory_count_policy_delete",
              "create_inventory_count_policy",
              "update_inventory_count_policy",
              "update_inventory_count_tolerance",
              "inventory_count_task_get",
              "inventory_count_get",
              "inventory_count_list",
              "inventory_count_list_tasks",
              "inventory_count_card_get",
              "inventory_count_location_results",
              "inventory_count_location_serials",
              "inventory_count_task_card_get",
              "inventory_count_policy_get",
              "inventory_count_policy_list",
              "inventory_count_tolerance_get",
              "inventory_count_tolerance_list",
              "location_checks"
            ]
          },
          {
            "class": "mixed",
            "id": "lot_transfer",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_update_header",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_add_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_update_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_set_line_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_remove_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_post",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "lot_transfer_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_lot_transfer",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_lot_transfer",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_lot_transfer_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_lot_transfer_line",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "lot_transfer_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "lot_transfer_card_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "lot_transfer_line_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "get_lot_transfer_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "lot_transfer_line_attribute_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "lot_transfer_create",
              "lot_transfer_update_header",
              "lot_transfer_add_line",
              "lot_transfer_update_line",
              "lot_transfer_set_line_attributes",
              "lot_transfer_remove_line",
              "lot_transfer_post",
              "lot_transfer_delete",
              "create_lot_transfer",
              "update_lot_transfer",
              "create_lot_transfer_line",
              "update_lot_transfer_line",
              "lot_transfer_list",
              "lot_transfer_card_get",
              "lot_transfer_line_list",
              "get_lot_transfer_line",
              "lot_transfer_line_attribute_list"
            ]
          },
          {
            "class": "mixed",
            "id": "lot_by_attributes",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "lot_create_by_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "lot_attribute_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "lot_search_by_attributes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "lot_create_by_attributes",
              "lot_attribute_template",
              "lot_search_by_attributes"
            ]
          },
          {
            "class": "read_model",
            "id": "barcode_scan",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "barcode_scan_parse",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "barcode_scan_parse"
            ]
          }
        ]
      },
      {
        "id": "outbound",
        "modules": [
          {
            "class": "mixed",
            "id": "loading",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_lookup",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_unit_review",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_header_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_header_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "transport_unit_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "transport_unit_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "transport_unit_register",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_open",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_unit_remove",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_cancel",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_start",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_unit_confirm",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "load_complete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "confirm_shipment",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "load_get",
              "load_lookup",
              "load_unit_review",
              "load_header_get",
              "load_header_list",
              "transport_unit_get",
              "transport_unit_list",
              "transport_unit_register",
              "load_open",
              "load_unit_remove",
              "load_cancel",
              "load_start",
              "load_unit_confirm",
              "load_complete",
              "confirm_shipment"
            ]
          },
          {
            "class": "mixed",
            "id": "load_plan",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_header_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_header_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_generate",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_add_unit",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_remove_unit",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_resequence",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_set_position",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "load_plan_freeze",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "SUPERVISOR"
                ],
                "name": "load_plan_reopen",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "load_plan_get",
              "load_plan_header_get",
              "load_plan_header_list",
              "load_plan_create",
              "load_plan_generate",
              "load_plan_add_unit",
              "load_plan_remove_unit",
              "load_plan_resequence",
              "load_plan_set_position",
              "load_plan_freeze",
              "load_plan_reopen"
            ]
          },
          {
            "class": "mixed",
            "id": "staging",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "stage_unit_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "stage_unit_lookup",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "stage_unit_assign",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "stage_unit_confirm",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "stage_unit_transfer",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "stage_unit_get",
              "stage_unit_lookup",
              "stage_unit_assign",
              "stage_unit_confirm",
              "stage_unit_transfer"
            ]
          },
          {
            "class": "mixed",
            "id": "allocation_policy",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "create_allocation_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_allocation_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_allocation_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "update_allocation_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "delete_allocation_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "delete_many_allocation_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_allocation_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_allocation_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_allocation_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_allocation_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "allocation_pipeline_view",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "allocation_policy_validate",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_steps_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_step_add",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_step_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_steps_reorder",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_policy_publish",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_policy_deactivate",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "allocation_policy_clone",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_allocation_policy",
              "get_allocation_policy",
              "list_allocation_policy",
              "update_allocation_policy",
              "delete_allocation_policy",
              "delete_many_allocation_policy",
              "count_allocation_policy",
              "get_allocation_policy_detail",
              "list_allocation_policy_detail",
              "count_allocation_policy_detail",
              "allocation_pipeline_view",
              "allocation_policy_validate",
              "allocation_steps_save",
              "allocation_step_add",
              "allocation_step_delete",
              "allocation_steps_reorder",
              "allocation_policy_publish",
              "allocation_policy_deactivate",
              "allocation_policy_clone"
            ]
          },
          {
            "class": "mixed",
            "id": "replenishment_policy",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_replenishment_policy",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "replenishment_policy_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_replenishment_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_replenishment_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_replenishment_policy",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_replenishment_policy",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_replenishment_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_replenishment_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_replenishment_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_replenishment_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_replenishment_policy",
              "replenishment_policy_save",
              "get_replenishment_policy",
              "list_replenishment_policy",
              "delete_replenishment_policy",
              "delete_many_replenishment_policy",
              "count_replenishment_policy",
              "get_replenishment_policy_detail",
              "list_replenishment_policy_detail",
              "count_replenishment_policy_detail"
            ]
          },
          {
            "class": "mixed",
            "id": "cartonization_policy",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_cartonization_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_cartonization_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_cartonization_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_cartonization_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_cartonization_policy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_cartonization_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_cartonization_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_cartonization_policy_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_cartonization_policy_detail_form",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "cartonization_policy_view",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "cartonization_policy_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "cartonization_policy_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "cartonization_policy_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_cartonization_policy_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_cartonization_policy_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_cartonization_policy_detail_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_cartonization_policy_detail_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_cartonization_policy_detail_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_cartonization_policy_detail_form",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_cartonization_policy",
              "list_cartonization_policy",
              "delete_cartonization_policy",
              "delete_many_cartonization_policy",
              "count_cartonization_policy",
              "get_cartonization_policy_detail",
              "list_cartonization_policy_detail",
              "count_cartonization_policy_detail",
              "get_cartonization_policy_detail_form",
              "cartonization_policy_view",
              "cartonization_policy_template",
              "cartonization_policy_create",
              "cartonization_policy_save",
              "create_cartonization_policy_form",
              "update_cartonization_policy_form",
              "create_cartonization_policy_detail_form",
              "update_cartonization_policy_detail_form",
              "delete_cartonization_policy_detail_form",
              "delete_many_cartonization_policy_detail_form"
            ]
          },
          {
            "class": "mixed",
            "id": "wave",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_header_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_header_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_preview",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_policy_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_policy_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_policy_preview",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_add_order",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_remove_order",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_cancel",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_release",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_retry_blocked",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "wave_set_station",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "wave_policy_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "wave_policy_save",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "wave_policy_build",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "wave_get",
              "wave_list",
              "wave_header_get",
              "wave_header_list",
              "wave_preview",
              "wave_policy_get",
              "wave_policy_list",
              "wave_policy_preview",
              "wave_create",
              "wave_add_order",
              "wave_remove_order",
              "wave_cancel",
              "wave_release",
              "wave_retry_blocked",
              "wave_set_station",
              "wave_policy_create",
              "wave_policy_save",
              "wave_policy_build"
            ]
          },
          {
            "class": "mixed",
            "id": "dispatch",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_header_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_header_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_stop_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_order_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_add_order",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_remove_order",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_stop_add",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_stop_update",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_stop_resequence",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "dispatch_plan",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "dispatch_get",
              "dispatch_list",
              "dispatch_header_get",
              "dispatch_header_list",
              "dispatch_stop_list",
              "dispatch_order_list",
              "dispatch_create",
              "dispatch_add_order",
              "dispatch_remove_order",
              "dispatch_stop_add",
              "dispatch_stop_update",
              "dispatch_stop_resequence",
              "dispatch_plan"
            ]
          },
          {
            "class": "mixed",
            "id": "outbound_unit_assignment",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "outbound_unit_assignment_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "outbound_unit_assign",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "outbound_unit_reassign",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "outbound_unit_assignment_get",
              "outbound_unit_assign",
              "outbound_unit_reassign"
            ]
          },
          {
            "class": "read_model",
            "id": "shipment_order",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_shipment_order",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_shipment_order",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_shipment_order",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_shipment_order_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_shipment_order_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_shipment_order_line",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_order_type",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_order_type",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_order_type",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "find_shipment_order_by_number",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_shipment_order_full",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "get_shipment_order_line_lot_requirements",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "shipment_order_fulfilment_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "shipment_order_shipment_history",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_shipment_order",
              "list_shipment_order",
              "count_shipment_order",
              "get_shipment_order_line",
              "list_shipment_order_line",
              "count_shipment_order_line",
              "get_order_type",
              "list_order_type",
              "count_order_type",
              "find_shipment_order_by_number",
              "get_shipment_order_full",
              "get_shipment_order_line_lot_requirements",
              "shipment_order_fulfilment_list",
              "shipment_order_shipment_history"
            ]
          },
          {
            "class": "mixed",
            "id": "shipment_order_commands",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_validate",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_update",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "shipment_order_release",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "shipment_order_cancel",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shipment_order_ship",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_allocate_preview",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shipment_order_allocate",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_cancel_allocation",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pick_detail_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_line_upsert",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_line_remove",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_line_set_lot_requirements",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "shipment_order_line_cancel_qty",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "shipment_order_line_adjust_qty",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "shipment_order_validate",
              "shipment_order_create",
              "shipment_order_update",
              "shipment_order_release",
              "shipment_order_cancel",
              "shipment_order_close",
              "shipment_order_ship",
              "shipment_order_allocate_preview",
              "shipment_order_allocate",
              "shipment_order_cancel_allocation",
              "pick_detail_delete",
              "shipment_order_line_upsert",
              "shipment_order_line_remove",
              "shipment_order_line_set_lot_requirements",
              "shipment_order_line_cancel_qty",
              "shipment_order_line_adjust_qty"
            ]
          },
          {
            "class": "domain_command",
            "id": "container_commands",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "container_restructure",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "container_dispose",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "container_repack",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "container_restructure",
              "container_dispose",
              "container_repack"
            ]
          },
          {
            "class": "mixed",
            "id": "pick_commands",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_dispatch_next",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_drop_open",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_drop_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_location",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_item",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_source_lpn",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_substitute_source_lpn",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_qty",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_serial",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_internal_lot",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_confirm_lot_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_commit",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_short",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_reject",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_manual_complete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_manual_finalize",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shared_pick_route_start",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shared_pick_tote_bind",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shared_pick_commit",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shared_pick_tote_deliver",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "shared_pick_tote_release",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_work_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_drop_current",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_manual_review",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "shared_pick_route_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_reconciliation_report",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "shared_pick_tote_complete_supervised",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_drop_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "VIEWER"
                ],
                "name": "shared_pick_route_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "pick_dispatch_next",
              "pick_drop_open",
              "pick_drop_close",
              "pick_confirm_location",
              "pick_confirm_item",
              "pick_confirm_source_lpn",
              "pick_substitute_source_lpn",
              "pick_confirm_qty",
              "pick_confirm_serial",
              "pick_confirm_internal_lot",
              "pick_confirm_lot_attributes",
              "pick_commit",
              "pick_short",
              "pick_reject",
              "pick_manual_complete",
              "pick_manual_finalize",
              "shared_pick_route_start",
              "shared_pick_tote_bind",
              "shared_pick_commit",
              "shared_pick_tote_deliver",
              "shared_pick_tote_release",
              "pick_work_get",
              "pick_drop_current",
              "pick_manual_review",
              "shared_pick_route_get",
              "pick_reconciliation_report",
              "shared_pick_tote_complete_supervised",
              "pick_drop_list",
              "shared_pick_route_list"
            ]
          },
          {
            "class": "mixed",
            "id": "pick_assignment",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_start",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_bind_position",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_dissolve",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_assignment_dissolve_supervised",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_skip",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_complete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_position_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_position_hand_over",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "pick_assignment_position_replace_container",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "cartonization_exception_retry",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "cartonization_exception_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_assignment_complete_supervised",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_destination_retarget",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_assignment_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_assignment_board_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_assignment_position_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "pick_assignment_start",
              "pick_assignment_bind_position",
              "pick_assignment_get",
              "pick_assignment_dissolve",
              "pick_assignment_dissolve_supervised",
              "pick_assignment_skip",
              "pick_assignment_complete",
              "pick_assignment_position_close",
              "pick_assignment_position_hand_over",
              "pick_assignment_position_replace_container",
              "cartonization_exception_retry",
              "cartonization_exception_list",
              "pick_assignment_complete_supervised",
              "pick_destination_retarget",
              "pick_assignment_list",
              "pick_assignment_board_get",
              "pick_assignment_position_list"
            ]
          },
          {
            "class": "mixed",
            "id": "pick_short_reason",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pick_short_reason_create_draft",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pick_short_reason_update_draft",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pick_short_reason_publish",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "pick_short_reason_retire",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_short_reason_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "pick_short_reason_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "get_pick_short_reason_revision",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "list_pick_short_reason_revision",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "count_pick_short_reason_revision",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "get_pick_short_reason_action",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "list_pick_short_reason_action",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "count_pick_short_reason_action",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "pick_short_reason_create_draft",
              "pick_short_reason_update_draft",
              "pick_short_reason_publish",
              "pick_short_reason_retire",
              "pick_short_reason_get",
              "pick_short_reason_list",
              "get_pick_short_reason_revision",
              "list_pick_short_reason_revision",
              "count_pick_short_reason_revision",
              "get_pick_short_reason_action",
              "list_pick_short_reason_action",
              "count_pick_short_reason_action"
            ]
          },
          {
            "class": "mixed",
            "id": "picking_policy",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "picking_policy_create_draft",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "picking_policy_update_draft",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "picking_policy_publish",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "picking_policy_retire",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "work_area_assign_picking_policy",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "work_area_equipment_policy_create",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "work_area_equipment_policy_update",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "work_area_equipment_policy_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "picking_policy_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "picking_policy_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "work_area_equipment_policy_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "picking_policy_create_draft",
              "picking_policy_update_draft",
              "picking_policy_publish",
              "picking_policy_retire",
              "work_area_assign_picking_policy",
              "work_area_equipment_policy_create",
              "work_area_equipment_policy_update",
              "work_area_equipment_policy_delete",
              "picking_policy_get",
              "picking_policy_list",
              "work_area_equipment_policy_list"
            ]
          },
          {
            "class": "mixed",
            "id": "packing",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_queue_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_work_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_work_open",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_carton_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_carton_void",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_carton_reopen",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_exception_report",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_carton_open",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_add",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_remove",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "packing_source_complete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "packing_exception_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "packing_exception_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "packing_exception_resolve",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "packing_exception_resolve_short",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "packing_exception_resolve_unexpected",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "packing_queue_list",
              "packing_work_get",
              "packing_work_open",
              "packing_carton_close",
              "packing_carton_void",
              "packing_carton_reopen",
              "packing_exception_report",
              "packing_carton_open",
              "packing_add",
              "packing_remove",
              "packing_source_complete",
              "packing_exception_list",
              "packing_exception_get",
              "packing_exception_resolve",
              "packing_exception_resolve_short",
              "packing_exception_resolve_unexpected"
            ]
          },
          {
            "class": "mixed",
            "id": "station",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_excess_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_excess_context",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "station_remainder_order",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_tote_short",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_excess_report",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "station_tote_lost",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "station_excess_count",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "station_order_withdraw",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_card_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_position_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_place_suggest",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "station_configure",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_box_bind",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_box_deliver",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_place",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_box_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "station_box_close_full",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "station_excess_list",
              "station_excess_context",
              "station_remainder_order",
              "station_tote_short",
              "station_excess_report",
              "station_tote_lost",
              "station_excess_count",
              "station_order_withdraw",
              "station_get",
              "station_list",
              "station_card_get",
              "station_position_list",
              "station_place_suggest",
              "station_configure",
              "station_box_bind",
              "station_box_deliver",
              "station_place",
              "station_box_close",
              "station_box_close_full"
            ]
          },
          {
            "class": "mixed",
            "id": "consolidation",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_queue_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_unit_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_target_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_station_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_station_card_get",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_board_pallet_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_board_box_list",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_session_open",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_session_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_add",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_remove",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR"
                ],
                "name": "consolidation_target_close",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "consolidation_target_reopen",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "consolidation_queue_list",
              "consolidation_unit_get",
              "consolidation_target_get",
              "consolidation_station_list",
              "consolidation_station_card_get",
              "consolidation_board_pallet_list",
              "consolidation_board_box_list",
              "consolidation_session_open",
              "consolidation_session_close",
              "consolidation_add",
              "consolidation_remove",
              "consolidation_target_close",
              "consolidation_target_reopen"
            ]
          }
        ]
      },
      {
        "id": "tasks",
        "modules": [
          {
            "class": "reference_crud",
            "id": "work_area",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_work_area",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_work_area_zone",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_work_area",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_work_area_zone",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_work_area",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_work_area_zone",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_work_area",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_work_area_zone",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_work_area",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_work_area_zone",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_work_area",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_work_area",
              "create_work_area_zone",
              "get_work_area",
              "get_work_area_zone",
              "list_work_area",
              "list_work_area_zone",
              "update_work_area",
              "update_work_area_zone",
              "delete_work_area",
              "delete_work_area_zone",
              "count_work_area"
            ]
          },
          {
            "class": "reference_crud",
            "id": "equipment_profile",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_equipment_profile",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_equipment_profile_zone_exclusion",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_equipment_profile",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_equipment_profile_zone_exclusion",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_equipment_profile",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_equipment_profile_zone_exclusion",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_equipment_profile",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_equipment_profile_zone_exclusion",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_equipment_profile",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_equipment_profile_zone_exclusion",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_equipment_profile",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_equipment_profile_zone_exclusion",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_equipment_profile",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_equipment_profile",
              "create_equipment_profile_zone_exclusion",
              "get_equipment_profile",
              "get_equipment_profile_zone_exclusion",
              "list_equipment_profile",
              "list_equipment_profile_zone_exclusion",
              "update_equipment_profile",
              "update_equipment_profile_zone_exclusion",
              "delete_equipment_profile",
              "delete_equipment_profile_zone_exclusion",
              "delete_many_equipment_profile",
              "delete_many_equipment_profile_zone_exclusion",
              "count_equipment_profile"
            ]
          },
          {
            "class": "mixed",
            "id": "operator",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_operator",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_operator",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_operator",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_operator",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "sync_operators",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_operator_task_permission",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_operator_task_permission",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_operator_task_permission",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_operator_task_permission",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_operator_task_permission",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_operator_task_permission",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_operator_task_permission",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_operator",
              "list_operator",
              "count_operator",
              "update_operator",
              "sync_operators",
              "create_operator_task_permission",
              "get_operator_task_permission",
              "list_operator_task_permission",
              "count_operator_task_permission",
              "update_operator_task_permission",
              "delete_operator_task_permission",
              "delete_many_operator_task_permission"
            ]
          },
          {
            "class": "read_model",
            "id": "task",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_task",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_task",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_task",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_task",
              "list_task",
              "count_task"
            ]
          },
          {
            "class": "domain_command",
            "id": "task_commands",
            "method_metadata": [
              {
                "class": "domain_command",
                "default_roles": [
                  "OPERATOR"
                ],
                "name": "task_claim",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "OPERATOR"
                ],
                "name": "task_heartbeat",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "OPERATOR"
                ],
                "name": "task_report_progress",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "OPERATOR"
                ],
                "name": "task_finish",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "OPERATOR"
                ],
                "name": "task_skip",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "task_reassign",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "task_force_release",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "task_delete",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR"
                ],
                "name": "task_delete_many",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "task_claim",
              "task_heartbeat",
              "task_report_progress",
              "task_finish",
              "task_skip",
              "task_reassign",
              "task_force_release",
              "task_delete",
              "task_delete_many"
            ]
          }
        ]
      },
      {
        "id": "reporting",
        "modules": [
          {
            "class": "mixed",
            "id": "report_definition",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_report_definition",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_report_definition",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_report_definition",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_report_definition",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_report_definition",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_report_definition",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_report_definition",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "generate_report_data",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "print_report",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "test_dataset",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_report_album",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_report_album",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "set_report_favorite",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_report_definition",
              "get_report_definition",
              "list_report_definition",
              "update_report_definition",
              "delete_report_definition",
              "delete_many_report_definition",
              "count_report_definition",
              "generate_report_data",
              "print_report",
              "test_dataset",
              "list_report_album",
              "get_report_album",
              "set_report_favorite"
            ]
          },
          {
            "class": "reference_crud",
            "id": "report_template",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_report_template",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_report_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_report_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_report_template",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_report_template",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_report_template",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_report_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_report_template",
              "get_report_template",
              "list_report_template",
              "update_report_template",
              "delete_report_template",
              "delete_many_report_template",
              "count_report_template"
            ]
          },
          {
            "class": "mixed",
            "id": "label_definition",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_label_definition",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_label_definition",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_label_definition",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_label_definition",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_label_definition",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_label_definition",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_label_definition",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "generate_label_data",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "print_label",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "send_label_to_printer",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_label_definition",
              "get_label_definition",
              "list_label_definition",
              "update_label_definition",
              "delete_label_definition",
              "delete_many_label_definition",
              "count_label_definition",
              "generate_label_data",
              "print_label",
              "send_label_to_printer"
            ]
          },
          {
            "class": "reference_crud",
            "id": "label_template",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_label_template",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_label_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_label_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_label_template",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_label_template",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_label_template",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_label_template",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_label_template",
              "get_label_template",
              "list_label_template",
              "update_label_template",
              "delete_label_template",
              "delete_many_label_template",
              "count_label_template"
            ]
          },
          {
            "class": "reference_crud",
            "id": "printer_configuration",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_printer_configuration",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_printer_configuration",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_printer_configuration",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_printer_configuration",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_printer_configuration",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_printer_configuration",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_printer_configuration",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_printer_configuration",
              "get_printer_configuration",
              "list_printer_configuration",
              "update_printer_configuration",
              "delete_printer_configuration",
              "delete_many_printer_configuration",
              "count_printer_configuration"
            ]
          },
          {
            "class": "reference_crud",
            "id": "printer_assignments",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_printer_assignment",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_printer_assignment",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_printer_assignment",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_printer_assignment",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_printer_assignment",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_many_printer_assignment",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_printer_assignment",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_printer_assignment",
              "get_printer_assignment",
              "list_printer_assignment",
              "update_printer_assignment",
              "delete_printer_assignment",
              "delete_many_printer_assignment",
              "count_printer_assignment"
            ]
          }
        ]
      },
      {
        "id": "rf",
        "modules": [
          {
            "class": "mixed",
            "id": "screen_def",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_screen_def",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_screen_def",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_screen_defs",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "save_all_screen_defs",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_screen_tree",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "list_screen_def",
              "get_screen_def",
              "get_screen_defs",
              "save_all_screen_defs",
              "get_screen_tree"
            ]
          },
          {
            "class": "mixed",
            "id": "metadata",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "fetch_screen",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "fetch_reachable_from",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_screens",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_revision",
                "operation": "read",
                "override_mode": "disabled",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "save_screen",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "activate_revision",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "fetch_screen",
              "fetch_reachable_from",
              "list_screens",
              "get_revision",
              "save_screen",
              "activate_revision"
            ]
          }
        ]
      },
      {
        "id": "integration",
        "modules": [
          {
            "class": "mixed",
            "id": "inventory",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_available_stock",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_all_stock",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "sync_stock_log",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_on_hold",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_lot",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance_on_hold",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance_lot",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_hold",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_hold",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_inventory_hold",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_inventory_hold",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_by_sku",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_by_lot",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_by_container",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance_by_sku",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance_by_lot",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_balance_by_container",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_container_hierarchy",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_hold_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_hold_detail",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_serial_capture_episode_open",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_serial_capture_episode_open",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_balance_kpi",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_inventory_pending_move_in_ui",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "SUPERVISOR",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_inventory_pending_move_in_ui",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_available_stock",
              "get_all_stock",
              "sync_stock_log",
              "list_inventory_balance",
              "list_inventory_balance_on_hold",
              "list_inventory_balance_lot",
              "count_inventory_balance",
              "count_inventory_balance_on_hold",
              "count_inventory_balance_lot",
              "list_inventory_hold",
              "count_inventory_hold",
              "get_inventory_hold",
              "update_inventory_hold",
              "list_inventory_balance_by_sku",
              "list_inventory_balance_by_lot",
              "list_inventory_balance_by_container",
              "count_inventory_balance_by_sku",
              "count_inventory_balance_by_lot",
              "count_inventory_balance_by_container",
              "get_container_hierarchy",
              "list_inventory_hold_detail",
              "count_inventory_hold_detail",
              "list_serial_capture_episode_open",
              "count_serial_capture_episode_open",
              "list_inventory_balance_kpi",
              "list_inventory_pending_move_in_ui",
              "count_inventory_pending_move_in_ui"
            ]
          },
          {
            "class": "read_model",
            "id": "inventory_search",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "search_inventory_balances",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_position_serials",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "search_inventory_balances",
              "list_position_serials"
            ]
          },
          {
            "class": "mixed",
            "id": "marking",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_expected_sgtins",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_shipment_sgtins",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_box_sgtins",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_withdrawal_codes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_pharma_sgtins",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_kz_inbound_codes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "confirm_inbound",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "confirm_outbound",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "confirm_aggregation",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "confirm_pharma_inbound",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "confirm_kz_inbound",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_expected_sgtins",
              "get_shipment_sgtins",
              "get_box_sgtins",
              "get_withdrawal_codes",
              "get_pharma_sgtins",
              "get_kz_inbound_codes",
              "confirm_inbound",
              "confirm_outbound",
              "confirm_aggregation",
              "confirm_pharma_inbound",
              "confirm_kz_inbound"
            ]
          },
          {
            "class": "mixed",
            "id": "entity_attribute",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_attribute_def",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_attribute_def",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_attribute_def",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_attribute_def",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_attribute_def",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_attribute_def",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "create_attribute_value",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_attribute_value",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_attribute_value",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_attribute_value",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "update_attribute_value",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "delete_attribute_value",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_entity_attributes",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_entity_attribute_row",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_attribute_value_enriched",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "domain_command",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR"
                ],
                "name": "save_entity_attributes",
                "operation": "execute",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_attribute_def",
              "get_attribute_def",
              "list_attribute_def",
              "count_attribute_def",
              "update_attribute_def",
              "delete_attribute_def",
              "create_attribute_value",
              "get_attribute_value",
              "list_attribute_value",
              "count_attribute_value",
              "update_attribute_value",
              "delete_attribute_value",
              "get_entity_attributes",
              "get_entity_attribute_row",
              "get_attribute_value_enriched",
              "save_entity_attributes"
            ]
          },
          {
            "class": "reference_crud",
            "id": "event_registry",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_event_registry",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_event_registry",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_event_registry",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_event_registry",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_event_registry",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_event_registry",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "create_event_registry",
              "get_event_registry",
              "list_event_registry",
              "count_event_registry",
              "update_event_registry",
              "delete_event_registry"
            ]
          },
          {
            "class": "reference_crud",
            "id": "integration_event",
            "method_metadata": [
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_integration_event",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_integration_event",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_integration_event",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "create_integration_subscriber",
                "operation": "create",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_integration_subscriber",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_integration_subscriber",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_integration_subscriber",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "update_integration_subscriber",
                "operation": "update",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "reference_crud",
                "default_roles": [
                  "ADMIN",
                  "MANAGER"
                ],
                "name": "delete_integration_subscriber",
                "operation": "delete",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_integration_event",
              "list_integration_event",
              "count_integration_event",
              "create_integration_subscriber",
              "get_integration_subscriber",
              "list_integration_subscriber",
              "count_integration_subscriber",
              "update_integration_subscriber",
              "delete_integration_subscriber"
            ]
          },
          {
            "class": "read_model",
            "id": "integration_event_delivery",
            "method_metadata": [
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "get_integration_event_delivery",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "list_integration_event_delivery",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              },
              {
                "class": "read_model",
                "default_roles": [
                  "ADMIN",
                  "MANAGER",
                  "OPERATOR",
                  "VIEWER"
                ],
                "name": "count_integration_event_delivery",
                "operation": "read",
                "override_mode": "replace",
                "transaction_readiness": "replace_only"
              }
            ],
            "methods": [
              "get_integration_event_delivery",
              "list_integration_event_delivery",
              "count_integration_event_delivery"
            ]
          }
        ]
      }
    ],
    "method_count": 932,
    "module_count": 100
  }
}