monkeybrain-runtime 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- monkeybrain_runtime-1.0.0.dist-info/METADATA +76 -0
- monkeybrain_runtime-1.0.0.dist-info/RECORD +838 -0
- monkeybrain_runtime-1.0.0.dist-info/WHEEL +5 -0
- monkeybrain_runtime-1.0.0.dist-info/entry_points.txt +3 -0
- monkeybrain_runtime-1.0.0.dist-info/top_level.txt +2 -0
- services/__init__.py +8 -0
- services/agentos/__init__.py +0 -0
- services/agentos/main.py +1 -0
- services/assets/helpers/__init__.py +12 -0
- services/assets/helpers/device.py +59 -0
- services/assets/helpers/equipment.py +179 -0
- services/assets/helpers/instruments.py +72 -0
- services/assets/helpers/machines.py +183 -0
- services/assets/helpers/materials.py +76 -0
- services/assets/helpers/parts.py +116 -0
- services/assets/helpers/plc.py +134 -0
- services/assets/helpers/tags.py +108 -0
- services/assets/helpers/tools.py +101 -0
- services/assets/main.py +75 -0
- services/assets/models/__init__.py +12 -0
- services/assets/models/device.py +79 -0
- services/assets/models/equipment.py +222 -0
- services/assets/models/instruments.py +85 -0
- services/assets/models/machines.py +230 -0
- services/assets/models/material.py +266 -0
- services/assets/models/parts.py +96 -0
- services/assets/models/plc.py +264 -0
- services/assets/models/tags.py +76 -0
- services/assets/models/tools.py +179 -0
- services/assets/routers/__init__.py +12 -0
- services/assets/routers/classes.py +65 -0
- services/assets/routers/device.py +86 -0
- services/assets/routers/equipment.py +145 -0
- services/assets/routers/families.py +61 -0
- services/assets/routers/instruments.py +70 -0
- services/assets/routers/machines.py +136 -0
- services/assets/routers/materials.py +105 -0
- services/assets/routers/parts.py +130 -0
- services/assets/routers/plc.py +94 -0
- services/assets/routers/subclasses.py +68 -0
- services/assets/routers/tags.py +138 -0
- services/assets/routers/tools.py +113 -0
- services/auth/helpers/__init__.py +13 -0
- services/auth/helpers/approval_decisions.py +261 -0
- services/auth/helpers/audit_elasticsearch_sync.py +350 -0
- services/auth/helpers/departments.py +53 -0
- services/auth/helpers/graph_store.py +848 -0
- services/auth/helpers/influx_store.py +280 -0
- services/auth/helpers/me.py +33 -0
- services/auth/helpers/nats_consumer.py +618 -0
- services/auth/helpers/nats_store.py +242 -0
- services/auth/helpers/permissions.py +62 -0
- services/auth/helpers/roles.py +87 -0
- services/auth/helpers/store.py +54 -0
- services/auth/helpers/team_members.py +155 -0
- services/auth/helpers/teams.py +87 -0
- services/auth/helpers/tokens.py +71 -0
- services/auth/helpers/users.py +119 -0
- services/auth/helpers/websocket_broadcast.py +41 -0
- services/auth/main.py +88 -0
- services/auth/models/__init__.py +12 -0
- services/auth/models/departments.py +55 -0
- services/auth/models/login.py +20 -0
- services/auth/models/permissions.py +61 -0
- services/auth/models/roles.py +53 -0
- services/auth/models/session.py +26 -0
- services/auth/models/teamMembers.py +59 -0
- services/auth/models/teams.py +56 -0
- services/auth/models/users.py +77 -0
- services/auth/routers/__init__.py +14 -0
- services/auth/routers/auth.py +3839 -0
- services/auth/routers/departments.py +84 -0
- services/auth/routers/integration_config.py +703 -0
- services/auth/routers/me.py +28 -0
- services/auth/routers/permissions.py +96 -0
- services/auth/routers/roles.py +139 -0
- services/auth/routers/session.py +224 -0
- services/auth/routers/team_members.py +152 -0
- services/auth/routers/teams.py +112 -0
- services/auth/routers/users.py +131 -0
- services/auth/routers/websocket_events.py +247 -0
- services/batch_execution/__init__.py +19 -0
- services/batch_execution/pipeline_triggers/__init__.py +53 -0
- services/batch_execution/pipeline_triggers/pipeline_parameter_adjuster.py +440 -0
- services/batch_execution/pipeline_triggers/pipeline_trigger_engine.py +445 -0
- services/batch_execution/pipeline_triggers/re_evaluation_queue.py +341 -0
- services/batch_execution/pipeline_triggers/test_phase3_implementation.py +553 -0
- services/batch_execution/pipeline_triggers/workflow_reevaluator.py +367 -0
- services/batch_execution/smoke_test_e2e_feedback_loop.py +704 -0
- services/batch_execution/workflow_executor.py +478 -0
- services/changeover/helpers/__init__.py +11 -0
- services/changeover/helpers/changeover.py +87 -0
- services/changeover/helpers/changeover_common.py +55 -0
- services/changeover/helpers/changeover_events.py +66 -0
- services/changeover/helpers/changeover_kpis.py +33 -0
- services/changeover/helpers/changeover_matrix.py +60 -0
- services/changeover/helpers/changeover_procedures.py +164 -0
- services/changeover/helpers/changeover_windows.py +96 -0
- services/changeover/main.py +52 -0
- services/changeover/models/__init__.py +11 -0
- services/changeover/models/changeover.py +73 -0
- services/changeover/models/changeover_events.py +142 -0
- services/changeover/models/changeover_kpis.py +75 -0
- services/changeover/models/changeover_matrix.py +63 -0
- services/changeover/models/changeover_procedures.py +108 -0
- services/changeover/models/changeover_tasks.py +87 -0
- services/changeover/models/changeover_windows.py +72 -0
- services/changeover/routers/__init__.py +9 -0
- services/changeover/routers/changeover_events.py +127 -0
- services/changeover/routers/changeover_kpis.py +80 -0
- services/changeover/routers/changeover_matrix.py +80 -0
- services/changeover/routers/changeover_procedures.py +118 -0
- services/changeover/routers/changeover_windows.py +98 -0
- services/common/__init__.py +2 -0
- services/common/approval_chains.py +648 -0
- services/common/auth.py +56 -0
- services/common/cdc.py +52 -0
- services/common/compat.py +217 -0
- services/common/compliance.py +562 -0
- services/common/config.py +134 -0
- services/common/cors.py +17 -0
- services/common/data_transformation.py +195 -0
- services/common/db.py +577 -0
- services/common/embeddings.py +97 -0
- services/common/event_reducers.py +194 -0
- services/common/event_types.py +51 -0
- services/common/integration_ingestion.py +169 -0
- services/common/logging.py +204 -0
- services/common/models/__init__.py +2 -0
- services/common/models/databricks.py +25 -0
- services/common/models/enums.py +64 -0
- services/common/module_control.py +422 -0
- services/common/mongo_cdc_watcher.py +106 -0
- services/common/n8n_auth.py +22 -0
- services/common/neo4j_mirror.py +1087 -0
- services/common/ontology_registry.py +110 -0
- services/common/reasoning_traces.py +52 -0
- services/common/supply_chain_cdc.py +555 -0
- services/common/tracing.py +159 -0
- services/common/utils.py +30 -0
- services/customers/helpers/__init__.py +8 -0
- services/customers/helpers/customer_details.py +64 -0
- services/customers/helpers/customer_metadata.py +64 -0
- services/customers/helpers/customer_order_metrics.py +67 -0
- services/customers/helpers/customer_payment_data.py +67 -0
- services/customers/main.py +50 -0
- services/customers/models/__init__.py +8 -0
- services/customers/models/customer_details.py +42 -0
- services/customers/models/customer_metadata.py +97 -0
- services/customers/models/customer_order_metrics.py +86 -0
- services/customers/models/customer_payment_data.py +60 -0
- services/customers/routers/__init__.py +8 -0
- services/customers/routers/customer_details.py +88 -0
- services/customers/routers/customer_metadata.py +88 -0
- services/customers/routers/customer_order_metrics.py +88 -0
- services/customers/routers/customer_payment_data.py +88 -0
- services/documents/__init__.py +1 -0
- services/documents/helpers/__init__.py +6 -0
- services/documents/helpers/document_metadata.py +569 -0
- services/documents/helpers/document_workflows.py +215 -0
- services/documents/helpers/report_templates.py +113 -0
- services/documents/main.py +49 -0
- services/documents/models/__init__.py +6 -0
- services/documents/models/document_metadata.py +215 -0
- services/documents/models/document_workflows.py +136 -0
- services/documents/models/report_templates.py +132 -0
- services/documents/routers/__init__.py +6 -0
- services/documents/routers/document_metadata.py +654 -0
- services/documents/routers/document_workflows.py +146 -0
- services/documents/routers/report_templates.py +86 -0
- services/events/helpers/__init__.py +5 -0
- services/events/helpers/events.py +394 -0
- services/events/main.py +40 -0
- services/events/models/__init__.py +5 -0
- services/events/models/events.py +50 -0
- services/events/routers/__init__.py +6 -0
- services/events/routers/count_events.py +109 -0
- services/events/routers/events.py +75 -0
- services/events/seed_events.py +196 -0
- services/facilities/helpers/__init__.py +8 -0
- services/facilities/helpers/lines.py +74 -0
- services/facilities/helpers/locations.py +231 -0
- services/facilities/helpers/plants.py +59 -0
- services/facilities/helpers/stages.py +110 -0
- services/facilities/helpers/workstation.py +213 -0
- services/facilities/main.py +60 -0
- services/facilities/models/__init__.py +10 -0
- services/facilities/models/industrialLine.py +72 -0
- services/facilities/models/industrialPlant.py +164 -0
- services/facilities/models/locations.py +74 -0
- services/facilities/models/stages.py +92 -0
- services/facilities/models/worker.py +73 -0
- services/facilities/models/workstation.py +117 -0
- services/facilities/models/workstation_live_state.py +59 -0
- services/facilities/routers/__init__.py +8 -0
- services/facilities/routers/bays.py +81 -0
- services/facilities/routers/buildings.py +92 -0
- services/facilities/routers/floors.py +81 -0
- services/facilities/routers/lines.py +154 -0
- services/facilities/routers/locations.py +208 -0
- services/facilities/routers/plant.py +203 -0
- services/facilities/routers/rooms.py +81 -0
- services/facilities/routers/stages.py +152 -0
- services/facilities/routers/workstation.py +173 -0
- services/file/backup.py +71 -0
- services/file/main.py +45 -0
- services/file/recieve.py +54 -0
- services/file/send.py +55 -0
- services/file/src/core/config.py +90 -0
- services/file/src/core/keycloak.py +152 -0
- services/file/src/core/logging_config.py +9 -0
- services/file/src/core/security.py +33 -0
- services/file/src/helpers/cad_conversion.py +331 -0
- services/file/src/helpers/helpers.py +825 -0
- services/file/src/routes/cad_conversion.py +26 -0
- services/file/src/routes/files.py +136 -0
- services/file/src/routes/presigned.py +154 -0
- services/file/src/services/websocket.py +293 -0
- services/floor_layout/helpers/__init__.py +8 -0
- services/floor_layout/helpers/bays.py +92 -0
- services/floor_layout/helpers/buildings.py +54 -0
- services/floor_layout/helpers/floors.py +65 -0
- services/floor_layout/helpers/rooms.py +76 -0
- services/floor_layout/main.py +52 -0
- services/floor_layout/models/__init__.py +8 -0
- services/floor_layout/models/bays.py +65 -0
- services/floor_layout/models/buildings.py +52 -0
- services/floor_layout/models/floors.py +45 -0
- services/floor_layout/models/rooms.py +61 -0
- services/floor_layout/routers/__init__.py +9 -0
- services/floor_layout/routers/bays.py +143 -0
- services/floor_layout/routers/buildings.py +116 -0
- services/floor_layout/routers/floors.py +89 -0
- services/floor_layout/routers/locations.py +80 -0
- services/floor_layout/routers/rooms.py +134 -0
- services/inventory/helpers/__init__.py +13 -0
- services/inventory/helpers/cycle_counts.py +124 -0
- services/inventory/helpers/inventory_allocations.py +134 -0
- services/inventory/helpers/inventory_item_counts.py +114 -0
- services/inventory/helpers/inventory_item_quantities.py +114 -0
- services/inventory/helpers/inventory_items.py +103 -0
- services/inventory/helpers/inventory_stage_outputs.py +134 -0
- services/inventory/helpers/inventory_transactions.py +112 -0
- services/inventory/helpers/stock_adjustment_requests.py +101 -0
- services/inventory/helpers/warehouse_cycle_counts.py +133 -0
- services/inventory/helpers/warehouse_locations.py +213 -0
- services/inventory/helpers/warehouse_regulated_records.py +123 -0
- services/inventory/main.py +62 -0
- services/inventory/models/__init__.py +17 -0
- services/inventory/models/cycle_counts.py +99 -0
- services/inventory/models/inventory_allocations.py +121 -0
- services/inventory/models/inventory_common.py +65 -0
- services/inventory/models/inventory_enums.py +21 -0
- services/inventory/models/inventory_item_count.py +65 -0
- services/inventory/models/inventory_item_quantity.py +82 -0
- services/inventory/models/inventory_items.py +168 -0
- services/inventory/models/inventory_responses.py +44 -0
- services/inventory/models/inventory_stage_outputs.py +96 -0
- services/inventory/models/inventory_state.py +15 -0
- services/inventory/models/inventory_transactions.py +80 -0
- services/inventory/models/stock_adjustment_requests.py +109 -0
- services/inventory/models/warehouse_cycle_counts.py +119 -0
- services/inventory/models/warehouse_location_models.py +708 -0
- services/inventory/models/warehouse_regulated_records.py +358 -0
- services/inventory/routers/__init__.py +13 -0
- services/inventory/routers/cycle_counts.py +106 -0
- services/inventory/routers/inventory_allocations.py +125 -0
- services/inventory/routers/inventory_item_counts.py +105 -0
- services/inventory/routers/inventory_item_quantities.py +105 -0
- services/inventory/routers/inventory_items.py +109 -0
- services/inventory/routers/inventory_stage_outputs.py +122 -0
- services/inventory/routers/inventory_transactions.py +96 -0
- services/inventory/routers/stock_adjustment_requests.py +124 -0
- services/inventory/routers/warehouse_cycle_counts.py +124 -0
- services/inventory/routers/warehouse_locations.py +426 -0
- services/inventory/routers/warehouse_regulated_records.py +273 -0
- services/iot/helpers/__init__.py +8 -0
- services/iot/helpers/ble_device.py +87 -0
- services/iot/helpers/mqtt_bridge.py +115 -0
- services/iot/helpers/sensor_readings.py +63 -0
- services/iot/helpers/sensors.py +77 -0
- services/iot/helpers/servers.py +72 -0
- services/iot/helpers/uwb_device.py +95 -0
- services/iot/main.py +53 -0
- services/iot/models/__init__.py +8 -0
- services/iot/models/ble_device.py +118 -0
- services/iot/models/sensors.py +256 -0
- services/iot/models/servers.py +206 -0
- services/iot/models/uwb_device.py +106 -0
- services/iot/routers/__init__.py +8 -0
- services/iot/routers/ble_device.py +110 -0
- services/iot/routers/sensors.py +144 -0
- services/iot/routers/servers.py +141 -0
- services/iot/routers/uwb_device.py +148 -0
- services/module_control/__init__.py +1 -0
- services/module_control/helpers/__init__.py +1 -0
- services/module_control/helpers/integration_config.py +243 -0
- services/module_control/helpers/security.py +104 -0
- services/module_control/main.py +44 -0
- services/module_control/models/__init__.py +1 -0
- services/module_control/models/module_control.py +65 -0
- services/module_control/routers/__init__.py +1 -0
- services/module_control/routers/module_control.py +219 -0
- services/orders/helpers/__init__.py +11 -0
- services/orders/helpers/invoices.py +123 -0
- services/orders/helpers/order_customer_metrics.py +61 -0
- services/orders/helpers/order_details.py +71 -0
- services/orders/helpers/order_metadata.py +61 -0
- services/orders/helpers/order_payment_metadata.py +74 -0
- services/orders/helpers/orders.py +119 -0
- services/orders/helpers/sales_orders.py +136 -0
- services/orders/main.py +56 -0
- services/orders/models/__init__.py +11 -0
- services/orders/models/invoices.py +415 -0
- services/orders/models/order_customer_metrics.py +78 -0
- services/orders/models/order_details.py +46 -0
- services/orders/models/order_metadata.py +60 -0
- services/orders/models/order_payment_metadata.py +63 -0
- services/orders/models/orders.py +64 -0
- services/orders/models/sales_orders.py +130 -0
- services/orders/routers/__init__.py +11 -0
- services/orders/routers/invoices.py +111 -0
- services/orders/routers/order_customer_metrics.py +87 -0
- services/orders/routers/order_details.py +87 -0
- services/orders/routers/order_metadata.py +87 -0
- services/orders/routers/order_payment_metadata.py +87 -0
- services/orders/routers/orders.py +74 -0
- services/orders/routers/sales_orders.py +111 -0
- services/pm/helpers/__init__.py +14 -0
- services/pm/helpers/calendar_bookings.py +114 -0
- services/pm/helpers/calibration_point.py +110 -0
- services/pm/helpers/calibrations.py +196 -0
- services/pm/helpers/checklists.py +318 -0
- services/pm/helpers/cleaning.py +333 -0
- services/pm/helpers/downtime.py +376 -0
- services/pm/helpers/kanban_boards.py +186 -0
- services/pm/helpers/maintainance.py +177 -0
- services/pm/helpers/sop.py +1155 -0
- services/pm/helpers/sop_cdc.py +324 -0
- services/pm/helpers/weekly_schedules.py +79 -0
- services/pm/main.py +62 -0
- services/pm/models/__init__.py +14 -0
- services/pm/models/calendar_booking.py +82 -0
- services/pm/models/calibration_point.py +44 -0
- services/pm/models/calibrations.py +167 -0
- services/pm/models/checklists.py +117 -0
- services/pm/models/cleaning.py +203 -0
- services/pm/models/downtime.py +109 -0
- services/pm/models/kanban_board.py +178 -0
- services/pm/models/maintainanceLog.py +148 -0
- services/pm/models/sop.py +152 -0
- services/pm/models/weekly_schedule.py +91 -0
- services/pm/routers/__init__.py +14 -0
- services/pm/routers/calendar_bookings.py +143 -0
- services/pm/routers/calibration_point.py +94 -0
- services/pm/routers/calibrations.py +232 -0
- services/pm/routers/checklists.py +188 -0
- services/pm/routers/cleaning.py +127 -0
- services/pm/routers/downtime.py +143 -0
- services/pm/routers/kanban_boards.py +283 -0
- services/pm/routers/maintainance.py +241 -0
- services/pm/routers/sop.py +437 -0
- services/pm/routers/weekly_schedules.py +108 -0
- services/process_definitions/helpers/__init__.py +11 -0
- services/process_definitions/helpers/cpp_cqa_registry.py +120 -0
- services/process_definitions/helpers/mbmr_templates.py +107 -0
- services/process_definitions/helpers/packing_instructions.py +113 -0
- services/process_definitions/helpers/process_constraints.py +495 -0
- services/process_definitions/helpers/process_corrections.py +279 -0
- services/process_definitions/helpers/process_definition.py +996 -0
- services/process_definitions/helpers/process_node_catalog.py +786 -0
- services/process_definitions/helpers/process_post_checks.py +441 -0
- services/process_definitions/helpers/process_pre_checks.py +351 -0
- services/process_definitions/helpers/process_steps.py +220 -0
- services/process_definitions/main.py +71 -0
- services/process_definitions/models/__init__.py +13 -0
- services/process_definitions/models/cpp_cqa_registry.py +145 -0
- services/process_definitions/models/gxp_change_controls.py +38 -0
- services/process_definitions/models/gxp_risk_assessments.py +30 -0
- services/process_definitions/models/gxp_validation_evidence.py +33 -0
- services/process_definitions/models/mbmr_templates.py +173 -0
- services/process_definitions/models/packing_instructions.py +176 -0
- services/process_definitions/models/process_constraints.py +159 -0
- services/process_definitions/models/process_corrections.py +118 -0
- services/process_definitions/models/process_definition.py +685 -0
- services/process_definitions/models/process_definition_common.py +48 -0
- services/process_definitions/models/process_node_catalog.py +25 -0
- services/process_definitions/models/process_post_checks.py +171 -0
- services/process_definitions/models/process_pre_checks.py +168 -0
- services/process_definitions/models/process_steps.py +170 -0
- services/process_definitions/node_services/__init__.py +8 -0
- services/process_definitions/node_services/common.py +95 -0
- services/process_definitions/node_services/executor.py +499 -0
- services/process_definitions/node_services/flow_simulator.py +733 -0
- services/process_definitions/node_services/functions.py +193 -0
- services/process_definitions/node_services/messaging.py +44 -0
- services/process_definitions/node_services/models.py +221 -0
- services/process_definitions/node_services/network.py +161 -0
- services/process_definitions/node_services/parsers.py +87 -0
- services/process_definitions/node_services/sequence.py +95 -0
- services/process_definitions/node_services/storage.py +50 -0
- services/process_definitions/node_services/webhooks.py +52 -0
- services/process_definitions/routers/__init__.py +10 -0
- services/process_definitions/routers/cpp_cqa_registry.py +86 -0
- services/process_definitions/routers/mbmr_templates.py +84 -0
- services/process_definitions/routers/packing_instructions.py +84 -0
- services/process_definitions/routers/process_constraints.py +564 -0
- services/process_definitions/routers/process_corrections.py +343 -0
- services/process_definitions/routers/process_definition.py +992 -0
- services/process_definitions/routers/process_post_checks.py +529 -0
- services/process_definitions/routers/process_pre_checks.py +435 -0
- services/process_definitions/routers/process_steps.py +274 -0
- services/procurement/helpers/__init__.py +9 -0
- services/procurement/helpers/goods_receipts.py +240 -0
- services/procurement/helpers/purchase_order_shipping_information.py +85 -0
- services/procurement/helpers/purchase_orders.py +68 -0
- services/procurement/helpers/quality_control.py +235 -0
- services/procurement/helpers/sampling.py +404 -0
- services/procurement/main.py +52 -0
- services/procurement/models/__init__.py +9 -0
- services/procurement/models/goods_receipts.py +165 -0
- services/procurement/models/purchase_orders.py +54 -0
- services/procurement/models/quality_control.py +464 -0
- services/procurement/models/reinspection_records.py +28 -0
- services/procurement/models/sampling.py +262 -0
- services/procurement/models/shipping_information.py +51 -0
- services/procurement/routers/__init__.py +9 -0
- services/procurement/routers/goods_receipts.py +201 -0
- services/procurement/routers/purchase_orders.py +106 -0
- services/procurement/routers/quality_control.py +386 -0
- services/procurement/routers/sampling.py +296 -0
- services/procurement/routers/shipping_information.py +97 -0
- services/production/__init__.py +1 -0
- services/production/agents/__init__.py +5 -0
- services/production/agents/batch_planning_agent.py +815 -0
- services/production/models/__init__.py +25 -0
- services/production/models/batch.py +253 -0
- services/products/helpers/__init__.py +10 -0
- services/products/helpers/boms.py +100 -0
- services/products/helpers/drug_research.py +644 -0
- services/products/helpers/product_component.py +168 -0
- services/products/helpers/product_inventory.py +221 -0
- services/products/helpers/product_pricing.py +123 -0
- services/products/helpers/product_utils.py +32 -0
- services/products/helpers/products.py +81 -0
- services/products/main.py +59 -0
- services/products/models/__init__.py +9 -0
- services/products/models/drug_research.py +138 -0
- services/products/models/product_common.py +60 -0
- services/products/models/product_component.py +1028 -0
- services/products/models/product_inventory.py +118 -0
- services/products/models/product_pricing.py +73 -0
- services/products/models/products.py +151 -0
- services/products/routers/__init__.py +9 -0
- services/products/routers/boms.py +116 -0
- services/products/routers/drug_research.py +115 -0
- services/products/routers/product_components.py +123 -0
- services/products/routers/product_inventory.py +185 -0
- services/products/routers/product_pricing.py +136 -0
- services/products/routers/products.py +165 -0
- services/replenishment/__init__.py +1 -0
- services/replenishment/main.py +46 -0
- services/replenishment/routers/__init__.py +1 -0
- services/replenishment/routers/replenishment.py +20 -0
- services/shifts/helpers/__init__.py +7 -0
- services/shifts/helpers/shift_templates.py +124 -0
- services/shifts/helpers/shifts.py +79 -0
- services/shifts/helpers/timesheets.py +137 -0
- services/shifts/main.py +48 -0
- services/shifts/models/__init__.py +8 -0
- services/shifts/models/shift.py +62 -0
- services/shifts/models/shift_template.py +82 -0
- services/shifts/models/time_range.py +31 -0
- services/shifts/models/timesheet.py +196 -0
- services/shifts/routers/__init__.py +7 -0
- services/shifts/routers/shift_templates.py +97 -0
- services/shifts/routers/shifts.py +117 -0
- services/shifts/routers/timesheets.py +117 -0
- services/shipping/helpers/__init__.py +15 -0
- services/shipping/helpers/carrier.py +78 -0
- services/shipping/helpers/customs_declaration.py +104 -0
- services/shipping/helpers/delivery_note.py +99 -0
- services/shipping/helpers/package.py +95 -0
- services/shipping/helpers/pallet.py +85 -0
- services/shipping/helpers/route.py +93 -0
- services/shipping/helpers/shipping_information.py +82 -0
- services/shipping/helpers/shipping_provider_details.py +59 -0
- services/shipping/helpers/shipping_provider_metadata.py +59 -0
- services/shipping/helpers/vehicle.py +85 -0
- services/shipping/helpers/waybill.py +86 -0
- services/shipping/main.py +64 -0
- services/shipping/models/__init__.py +15 -0
- services/shipping/models/carrier.py +97 -0
- services/shipping/models/customs_declaration.py +138 -0
- services/shipping/models/delivery_note.py +163 -0
- services/shipping/models/package.py +152 -0
- services/shipping/models/pallet.py +137 -0
- services/shipping/models/route.py +120 -0
- services/shipping/models/shipping_information.py +55 -0
- services/shipping/models/shipping_provider_details.py +42 -0
- services/shipping/models/shipping_provider_metadata.py +54 -0
- services/shipping/models/vehicle.py +129 -0
- services/shipping/models/waybill.py +189 -0
- services/shipping/routers/__init__.py +15 -0
- services/shipping/routers/carrier.py +99 -0
- services/shipping/routers/customs_declaration.py +132 -0
- services/shipping/routers/delivery_note.py +150 -0
- services/shipping/routers/package.py +141 -0
- services/shipping/routers/pallet.py +108 -0
- services/shipping/routers/route.py +128 -0
- services/shipping/routers/shipping_information.py +97 -0
- services/shipping/routers/shipping_provider_details.py +80 -0
- services/shipping/routers/shipping_provider_metadata.py +80 -0
- services/shipping/routers/vehicle.py +117 -0
- services/shipping/routers/waybill.py +119 -0
- services/suppliers/helpers/__init__.py +13 -0
- services/suppliers/helpers/supplier_capabilities.py +58 -0
- services/suppliers/helpers/supplier_certifications.py +67 -0
- services/suppliers/helpers/supplier_details.py +58 -0
- services/suppliers/helpers/supplier_financials.py +58 -0
- services/suppliers/helpers/supplier_inventory.py +74 -0
- services/suppliers/helpers/supplier_locations.py +60 -0
- services/suppliers/helpers/supplier_pricing.py +69 -0
- services/suppliers/helpers/supplier_quality.py +69 -0
- services/suppliers/helpers/supplier_shipping.py +69 -0
- services/suppliers/main.py +60 -0
- services/suppliers/models/__init__.py +13 -0
- services/suppliers/models/supplier_capabilities.py +70 -0
- services/suppliers/models/supplier_certifications.py +64 -0
- services/suppliers/models/supplier_details.py +75 -0
- services/suppliers/models/supplier_financials.py +69 -0
- services/suppliers/models/supplier_inventory.py +76 -0
- services/suppliers/models/supplier_locations.py +70 -0
- services/suppliers/models/supplier_pricing.py +74 -0
- services/suppliers/models/supplier_quality.py +74 -0
- services/suppliers/models/supplier_shipping.py +76 -0
- services/suppliers/routers/__init__.py +13 -0
- services/suppliers/routers/supplier_capabilities.py +88 -0
- services/suppliers/routers/supplier_certifications.py +87 -0
- services/suppliers/routers/supplier_details.py +83 -0
- services/suppliers/routers/supplier_financials.py +83 -0
- services/suppliers/routers/supplier_inventory.py +105 -0
- services/suppliers/routers/supplier_locations.py +89 -0
- services/suppliers/routers/supplier_pricing.py +96 -0
- services/suppliers/routers/supplier_quality.py +96 -0
- services/suppliers/routers/supplier_shipping.py +96 -0
- services/supply_allocation/main.py +46 -0
- services/supply_allocation/routers/__init__.py +1 -0
- services/supply_allocation/routers/allocation.py +20 -0
- services/taxonomy/helpers/__init__.py +7 -0
- services/taxonomy/helpers/classes.py +48 -0
- services/taxonomy/helpers/family.py +53 -0
- services/taxonomy/helpers/subclass.py +58 -0
- services/taxonomy/main.py +48 -0
- services/taxonomy/models/__init__.py +7 -0
- services/taxonomy/models/classes.py +52 -0
- services/taxonomy/models/family.py +60 -0
- services/taxonomy/models/subclass.py +50 -0
- services/taxonomy/routers/__init__.py +7 -0
- services/taxonomy/routers/classes.py +78 -0
- services/taxonomy/routers/family.py +77 -0
- services/taxonomy/routers/subclass.py +82 -0
- services/warehouse_execution/__init__.py +1 -0
- services/warehouse_execution/main.py +46 -0
- services/warehouse_execution/routers/__init__.py +1 -0
- services/warehouse_execution/routers/execution.py +21 -0
- services/work_order_agent/__init__.py +17 -0
- services/work_order_agent/agent/__init__.py +17 -0
- services/work_order_agent/agent/work_order_agent.py +658 -0
- services/work_order_agent/tracking/__init__.py +101 -0
- services/work_order_agent/tracking/event_system.py +182 -0
- services/work_order_agent/tracking/state_machine.py +163 -0
- services/work_order_agent/tracking/state_machine_integrator.py +295 -0
- services/work_order_agent/tracking/test_phase2_implementation.py +302 -0
- services/work_order_agent/tracking/time_analysis.py +301 -0
- services/work_order_agent/tracking/tracked_work_order.py +255 -0
- services/work_order_agent/tracking/work_order_adapter.py +367 -0
- services/work_order_agent/tracking/work_order_batch_manager.py +406 -0
- services/work_order_agent/tracking/work_order_repository.py +431 -0
- services/workorders/helpers/__init__.py +5 -0
- services/workorders/helpers/area_room_usage_ledger.py +139 -0
- services/workorders/helpers/batch_execution_records.py +265 -0
- services/workorders/helpers/batch_release_workflows.py +158 -0
- services/workorders/helpers/batch_step_executions.py +145 -0
- services/workorders/helpers/equipment_usage_ledger.py +209 -0
- services/workorders/helpers/executed_bmr_records.py +170 -0
- services/workorders/helpers/executed_bpr_records.py +170 -0
- services/workorders/helpers/executed_instruction_evidence.py +155 -0
- services/workorders/helpers/ipc_result_records.py +134 -0
- services/workorders/helpers/production_batches.py +117 -0
- services/workorders/helpers/work_orders.py +367 -0
- services/workorders/helpers/yield_reconciliation_records.py +158 -0
- services/workorders/main.py +110 -0
- services/workorders/models/__init__.py +5 -0
- services/workorders/models/area_room_usage_ledger.py +154 -0
- services/workorders/models/batch_execution_records.py +575 -0
- services/workorders/models/batch_release_workflows.py +190 -0
- services/workorders/models/batch_step_executions.py +142 -0
- services/workorders/models/equipment_usage_ledger.py +144 -0
- services/workorders/models/executed_bmr_records.py +220 -0
- services/workorders/models/executed_bpr_records.py +220 -0
- services/workorders/models/executed_instruction_evidence.py +128 -0
- services/workorders/models/ipc_result_records.py +164 -0
- services/workorders/models/production_batches.py +181 -0
- services/workorders/models/work_orders.py +255 -0
- services/workorders/models/yield_reconciliation_records.py +175 -0
- services/workorders/routers/__init__.py +5 -0
- services/workorders/routers/area_room_usage_ledger.py +117 -0
- services/workorders/routers/batch_execution_records.py +103 -0
- services/workorders/routers/batch_release_workflows.py +86 -0
- services/workorders/routers/batch_step_executions.py +88 -0
- services/workorders/routers/equipment_usage_ledger.py +115 -0
- services/workorders/routers/executed_bmr_records.py +86 -0
- services/workorders/routers/executed_bpr_records.py +86 -0
- services/workorders/routers/executed_instruction_evidence.py +86 -0
- services/workorders/routers/ipc_result_records.py +86 -0
- services/workorders/routers/production_batches.py +86 -0
- services/workorders/routers/work_orders.py +257 -0
- services/workorders/routers/yield_reconciliation_records.py +86 -0
- src/broca/__init__.py +5 -0
- src/broca/agent.py +201 -0
- src/cerebellum/__init__.py +0 -0
- src/cerebellum/adapter.py +84 -0
- src/cerebellum/capabilities/__init__.py +0 -0
- src/cerebellum/capabilities/agent/__init__.py +0 -0
- src/cerebellum/capabilities/agent/agents.py +65 -0
- src/cerebellum/capabilities/ai/__init__.py +0 -0
- src/cerebellum/capabilities/ai/providers.py +106 -0
- src/cerebellum/capabilities/api/__init__.py +0 -0
- src/cerebellum/capabilities/api/graphql.py +35 -0
- src/cerebellum/capabilities/api/rest_api.py +45 -0
- src/cerebellum/capabilities/api/webhook.py +30 -0
- src/cerebellum/capabilities/browser/__init__.py +0 -0
- src/cerebellum/capabilities/browser/browsers.py +27 -0
- src/cerebellum/capabilities/cloud/__init__.py +0 -0
- src/cerebellum/capabilities/cloud/cloud.py +46 -0
- src/cerebellum/capabilities/communication/__init__.py +0 -0
- src/cerebellum/capabilities/communication/communication.py +62 -0
- src/cerebellum/capabilities/database/__init__.py +0 -0
- src/cerebellum/capabilities/database/elasticsearch.py +40 -0
- src/cerebellum/capabilities/database/influxdb.py +37 -0
- src/cerebellum/capabilities/database/mongodb.py +50 -0
- src/cerebellum/capabilities/database/neo4j.py +32 -0
- src/cerebellum/capabilities/database/redis.py +44 -0
- src/cerebellum/capabilities/enterprise/__init__.py +0 -0
- src/cerebellum/capabilities/enterprise/opensource.py +180 -0
- src/cerebellum/capabilities/enterprise/proprietary.py +313 -0
- src/cerebellum/capabilities/event_streaming/__init__.py +0 -0
- src/cerebellum/capabilities/event_streaming/streaming.py +38 -0
- src/cerebellum/capabilities/infrastructure/__init__.py +0 -0
- src/cerebellum/capabilities/infrastructure/infrastructure.py +30 -0
- src/cerebellum/capabilities/productivity/__init__.py +0 -0
- src/cerebellum/capabilities/productivity/productivity.py +158 -0
- src/cerebellum/capabilities/robotics/__init__.py +0 -0
- src/cerebellum/capabilities/robotics/robotics.py +124 -0
- src/cerebellum/capabilities/runtime/__init__.py +0 -0
- src/cerebellum/capabilities/runtime/runtimes.py +92 -0
- src/cerebellum/capabilities/search/__init__.py +0 -0
- src/cerebellum/capabilities/search/search.py +63 -0
- src/cerebellum/capabilities/source_control/__init__.py +0 -0
- src/cerebellum/capabilities/source_control/source_control.py +113 -0
- src/cerebellum/capabilities/storage/__init__.py +0 -0
- src/cerebellum/capabilities/storage/storage.py +94 -0
- src/cerebellum/capabilities/workflow/__init__.py +0 -0
- src/cerebellum/capabilities/workflow/workflows.py +49 -0
- src/cerebellum/capability.py +108 -0
- src/cerebellum/config.py +157 -0
- src/cerebellum/fallback.py +147 -0
- src/cerebellum/fallback_engine.py +121 -0
- src/cerebellum/key_manager.py +129 -0
- src/cerebellum/keystore.py +179 -0
- src/cerebellum/lifecycle.py +54 -0
- src/cerebellum/metadata.py +61 -0
- src/cerebellum/operator/base.py +25 -0
- src/cerebellum/peripheral.py +92 -0
- src/cerebellum/registry.py +98 -0
- src/cerebellum/resolve_entity_capability.py +259 -0
- src/cingulate/benchmark/__init__.py +23 -0
- src/cingulate/benchmark/reporter.py +102 -0
- src/cingulate/benchmark/runner.py +159 -0
- src/cingulate/benchmark/scenario_runner.py +150 -0
- src/cingulate/benchmark/validator.py +102 -0
- src/cingulate/governance/__init__.py +21 -0
- src/cingulate/governance/architecture_validator.py +194 -0
- src/cingulate/governance/compliance.py +104 -0
- src/cingulate/governance/governance.py +77 -0
- src/cingulate/governance/policy_registry.py +91 -0
- src/cortex/__init__.py +33 -0
- src/cortex/cost.py +71 -0
- src/cortex/counterfactual.py +162 -0
- src/cortex/digital_twin.py +90 -0
- src/cortex/experience.py +83 -0
- src/cortex/feedback.py +144 -0
- src/cortex/loss.py +116 -0
- src/cortex/prediction.py +142 -0
- src/cortex/replay.py +130 -0
- src/cortex/reward.py +113 -0
- src/cortex/simulator.py +102 -0
- src/cortex/world_model.py +180 -0
- src/cortex/world_model_simulation.py +1591 -0
- src/cortex/world_state.py +121 -0
- src/cortex/xavier.py +250 -0
- src/deepdive/__init__.py +29 -0
- src/deepdive/aggregation.py +113 -0
- src/deepdive/digital_twin_aggregator.py +128 -0
- src/deepdive/elasticsearch_adapter.py +110 -0
- src/deepdive/fleet_analytics.py +131 -0
- src/deepdive/knowledge_aggregator.py +130 -0
- src/homeostasis/__init__.py +19 -0
- src/homeostasis/control_plane.py +159 -0
- src/introspection/__init__.py +38 -0
- src/introspection/alerting.py +142 -0
- src/introspection/health.py +101 -0
- src/introspection/lemon.py +243 -0
- src/introspection/logging.py +147 -0
- src/introspection/metrics.py +106 -0
- src/introspection/tracing.py +162 -0
- src/monkey_brain/__init__.py +1 -0
- src/monkey_brain/api/main.py +148 -0
- src/monkey_brain/api/models.py +81 -0
- src/monkey_brain/api/routes/routes/keys.py +106 -0
- src/monkey_brain/api/routes/routes/run.py +169 -0
- src/monkey_brain/api/routes/routes/simulate.py +485 -0
- src/monkey_brain/dlm/__init__.py +44 -0
- src/monkey_brain/dlm/dlm.py +139 -0
- src/monkey_brain/dlm/gc.py +115 -0
- src/monkey_brain/dlm/lifecycle.py +149 -0
- src/monkey_brain/dlm/orphans.py +99 -0
- src/monkey_brain/dlm/storage.py +149 -0
- src/monkey_brain/dlm/ttl.py +140 -0
- src/monkey_brain/documents/__init__.py +0 -0
- src/monkey_brain/documents/document_ocr.py +6 -0
- src/monkey_brain/kernel/__init__.py +53 -0
- src/monkey_brain/kernel/capability_interface.py +144 -0
- src/monkey_brain/kernel/classifier/__init__.py +1 -0
- src/monkey_brain/kernel/classifier/embed_classifier.py +125 -0
- src/monkey_brain/kernel/classifier/intent_examples.py +106 -0
- src/monkey_brain/kernel/dag.py +23 -0
- src/monkey_brain/kernel/execution_state.py +257 -0
- src/monkey_brain/kernel/goal_planner.py +85 -0
- src/monkey_brain/kernel/goal_router.py +20 -0
- src/monkey_brain/kernel/goals/__init__.py +1 -0
- src/monkey_brain/kernel/goals/goal.py +130 -0
- src/monkey_brain/kernel/goals/goal_bootstrap.py +38 -0
- src/monkey_brain/kernel/goals/goal_classifier.py +132 -0
- src/monkey_brain/kernel/goals/goal_registry.py +75 -0
- src/monkey_brain/kernel/intents/__init__.py +1 -0
- src/monkey_brain/kernel/intents/event_adapter.py +246 -0
- src/monkey_brain/kernel/intents/helpers.py +13 -0
- src/monkey_brain/kernel/intents/intent_registry.py +705 -0
- src/monkey_brain/kernel/intents/intent_router.py +102 -0
- src/monkey_brain/kernel/intents/predicates/approval_create.py +9 -0
- src/monkey_brain/kernel/intents/predicates/approval_decision.py +9 -0
- src/monkey_brain/kernel/intents/predicates/approval_hold.py +9 -0
- src/monkey_brain/kernel/intents/predicates/approval_query.py +9 -0
- src/monkey_brain/kernel/intents/predicates/batch_close.py +9 -0
- src/monkey_brain/kernel/intents/predicates/batch_creation.py +9 -0
- src/monkey_brain/kernel/intents/predicates/batch_delete.py +9 -0
- src/monkey_brain/kernel/intents/predicates/batch_hold.py +9 -0
- src/monkey_brain/kernel/intents/predicates/batch_record.py +9 -0
- src/monkey_brain/kernel/intents/predicates/batch_update.py +9 -0
- src/monkey_brain/kernel/intents/predicates/change_control.py +49 -0
- src/monkey_brain/kernel/intents/predicates/compliance_audit.py +14 -0
- src/monkey_brain/kernel/intents/predicates/decision_intelligence.py +9 -0
- src/monkey_brain/kernel/intents/predicates/drug_research.py +9 -0
- src/monkey_brain/kernel/intents/predicates/fuzzy_match.py +19 -0
- src/monkey_brain/kernel/intents/predicates/production_kpi.py +9 -0
- src/monkey_brain/kernel/intents/predicates/sop_create.py +9 -0
- src/monkey_brain/kernel/intents/predicates/sop_query.py +9 -0
- src/monkey_brain/kernel/intents/predicates/sop_update.py +9 -0
- src/monkey_brain/kernel/intents/predicates/warehouse_shipping.py +9 -0
- src/monkey_brain/kernel/intents/predicates/work_order_create.py +9 -0
- src/monkey_brain/kernel/intents/predicates/work_order_delete.py +9 -0
- src/monkey_brain/kernel/intents/predicates/work_order_hold.py +9 -0
- src/monkey_brain/kernel/intents/predicates/work_order_query.py +9 -0
- src/monkey_brain/kernel/intents/predicates/work_order_status.py +9 -0
- src/monkey_brain/kernel/intents/predicates/work_order_update.py +9 -0
- src/monkey_brain/kernel/intents/predicates/worker.py +9 -0
- src/monkey_brain/kernel/intents/telemetry_adapter.py +274 -0
- src/monkey_brain/kernel/intents/utils.py +68 -0
- src/monkey_brain/kernel/learning.py +98 -0
- src/monkey_brain/kernel/llm_explorer.py +188 -0
- src/monkey_brain/kernel/loss.py +81 -0
- src/monkey_brain/kernel/nlp/__init__.py +1 -0
- src/monkey_brain/kernel/nlp/compat.py +23 -0
- src/monkey_brain/kernel/nlp/models.py +10 -0
- src/monkey_brain/kernel/nlp/question_analyzer.py +203 -0
- src/monkey_brain/kernel/nlp/spacy_parser.py +53 -0
- src/monkey_brain/kernel/observer.py +97 -0
- src/monkey_brain/kernel/parser/__init__.py +3 -0
- src/monkey_brain/kernel/parser/ast.py +28 -0
- src/monkey_brain/kernel/parser/extractors/__init__.py +11 -0
- src/monkey_brain/kernel/parser/extractors/entities.py +21 -0
- src/monkey_brain/kernel/parser/extractors/filters.py +16 -0
- src/monkey_brain/kernel/parser/extractors/projections.py +36 -0
- src/monkey_brain/kernel/parser/extractors/verbs.py +31 -0
- src/monkey_brain/kernel/parser/parser.py +57 -0
- src/monkey_brain/kernel/parser/rules.py +75 -0
- src/monkey_brain/kernel/pipeline.py +44 -0
- src/monkey_brain/kernel/planner.py +57 -0
- src/monkey_brain/kernel/rl/__init__.py +33 -0
- src/monkey_brain/kernel/rl/learner.py +98 -0
- src/monkey_brain/kernel/rl/policy.py +254 -0
- src/monkey_brain/kernel/rl/reward.py +117 -0
- src/monkey_brain/kernel/rl/transition.py +112 -0
- src/monkey_brain/persistence/__init__.py +47 -0
- src/monkey_brain/persistence/adapters.py +49 -0
- src/monkey_brain/persistence/events.py +105 -0
- src/monkey_brain/persistence/manager.py +124 -0
- src/monkey_brain/persistence/mongodb_adapter.py +91 -0
- src/monkey_brain/persistence/redis_adapter.py +93 -0
- src/monkey_brain/persistence/reducer.py +111 -0
- src/monkey_brain/runtime/__init__.py +49 -0
- src/monkey_brain/runtime/depedencies.py +8 -0
- src/monkey_brain/runtime/engine.py +183 -0
- src/monkey_brain/runtime/message_bus.py +82 -0
- src/monkey_brain/runtime/process.py +144 -0
- src/monkey_brain/runtime/resource_manager.py +100 -0
- src/monkey_brain/runtime/routers.py +8 -0
- src/monkey_brain/runtime/runtime.py +199 -0
- src/monkey_brain/runtime/scheduler.py +165 -0
- src/monkey_brain/runtime/supervisor.py +133 -0
- src/monkey_brain/runtime/worker_pool.py +111 -0
- src/plasticity/seed/__init__.py +30 -0
- src/plasticity/seed/benchmark_generator.py +105 -0
- src/plasticity/seed/event_generator.py +122 -0
- src/plasticity/seed/scenario_builder.py +134 -0
- src/plasticity/seed/seed_data.py +206 -0
- src/plasticity/seed/seeder.py +122 -0
- src/plasticity/testing/__init__.py +28 -0
- src/plasticity/testing/performance.py +131 -0
- src/plasticity/testing/profiler.py +255 -0
- src/plasticity/testing/reporter.py +84 -0
- src/plasticity/testing/runner.py +209 -0
- src/sync/__init__.py +12 -0
- src/sync/cloud_aggregator.py +63 -0
- src/sync/edge_node.py +51 -0
- src/sync/sync_manager.py +74 -0
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
"""
|
|
2
|
+
warehouse_location_models.py
|
|
3
|
+
----------------------------
|
|
4
|
+
Pydantic models for a 6-level warehouse location hierarchy:
|
|
5
|
+
|
|
6
|
+
Lot -> Zone -> Area -> Aisle -> Rack -> Bin
|
|
7
|
+
|
|
8
|
+
Each level is a standalone model with its own identity, status, capacity,
|
|
9
|
+
and dimensional fields. Higher levels embed references (IDs) to their
|
|
10
|
+
parent; the aggregate models (WarehouseLocation, LocationTree) compose
|
|
11
|
+
the full hierarchy for reads / API responses.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from datetime import datetime, timezone
|
|
17
|
+
from typing import Literal, Optional
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, Field, computed_field, model_validator
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
LocationStatus = Literal["Active", "Inactive", "Under-Maintenance", "Reserved", "Blocked"]
|
|
23
|
+
|
|
24
|
+
StorageType = Literal[
|
|
25
|
+
"Ambient",
|
|
26
|
+
"Cold-Storage",
|
|
27
|
+
"Frozen",
|
|
28
|
+
"Hazardous",
|
|
29
|
+
"High-Value",
|
|
30
|
+
"Bulk",
|
|
31
|
+
"Rack-Storage",
|
|
32
|
+
"Floor-Storage",
|
|
33
|
+
"Mezzanine",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
TemperatureZone = Literal["Ambient", "Chilled", "Frozen", "Controlled"]
|
|
37
|
+
|
|
38
|
+
BinType = Literal[
|
|
39
|
+
"Standard",
|
|
40
|
+
"Oversized",
|
|
41
|
+
"Small-Parts",
|
|
42
|
+
"Liquid",
|
|
43
|
+
"Fragile",
|
|
44
|
+
"Hazmat",
|
|
45
|
+
"Returns",
|
|
46
|
+
"QC-Hold",
|
|
47
|
+
"Staging",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
Orientation = Literal["Horizontal", "Vertical", "Angled"]
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _utc_now() -> datetime:
|
|
54
|
+
return datetime.now(timezone.utc)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class _LocationBase(BaseModel):
|
|
58
|
+
"""Fields common to every level of the hierarchy."""
|
|
59
|
+
|
|
60
|
+
code: str = Field(..., min_length=1, description="Short mnemonic code, e.g. 'LOT-A'")
|
|
61
|
+
name: str = Field(..., min_length=1)
|
|
62
|
+
status: LocationStatus = "Active"
|
|
63
|
+
description: Optional[str] = None
|
|
64
|
+
tags: list[str] = Field(default_factory=list, description="Free-form labels for search / filtering")
|
|
65
|
+
is_active: bool = True
|
|
66
|
+
created_at: datetime = Field(default_factory=_utc_now)
|
|
67
|
+
updated_at: datetime = Field(default_factory=_utc_now)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def is_available(self) -> bool:
|
|
71
|
+
return self.is_active and self.status == "Active"
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class _CapacityMixin(BaseModel):
|
|
75
|
+
"""Weight / volume capacity tracking, mixed into capacity-bearing levels."""
|
|
76
|
+
|
|
77
|
+
max_weight_kg: Optional[float] = Field(default=None, ge=0)
|
|
78
|
+
current_weight_kg: float = Field(default=0.0, ge=0)
|
|
79
|
+
max_volume_m3: Optional[float] = Field(default=None, ge=0)
|
|
80
|
+
current_volume_m3: float = Field(default=0.0, ge=0)
|
|
81
|
+
|
|
82
|
+
@model_validator(mode="after")
|
|
83
|
+
def weight_within_capacity(self) -> "_CapacityMixin":
|
|
84
|
+
if self.max_weight_kg is not None and self.current_weight_kg > self.max_weight_kg:
|
|
85
|
+
raise ValueError(
|
|
86
|
+
f"current_weight_kg ({self.current_weight_kg}) exceeds "
|
|
87
|
+
f"max_weight_kg ({self.max_weight_kg})"
|
|
88
|
+
)
|
|
89
|
+
if self.max_volume_m3 is not None and self.current_volume_m3 > self.max_volume_m3:
|
|
90
|
+
raise ValueError(
|
|
91
|
+
f"current_volume_m3 ({self.current_volume_m3}) exceeds "
|
|
92
|
+
f"max_volume_m3 ({self.max_volume_m3})"
|
|
93
|
+
)
|
|
94
|
+
return self
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def weight_utilization_pct(self) -> Optional[float]:
|
|
98
|
+
if self.max_weight_kg:
|
|
99
|
+
return round(self.current_weight_kg / self.max_weight_kg * 100, 2)
|
|
100
|
+
return None
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def volume_utilization_pct(self) -> Optional[float]:
|
|
104
|
+
if self.max_volume_m3:
|
|
105
|
+
return round(self.current_volume_m3 / self.max_volume_m3 * 100, 2)
|
|
106
|
+
return None
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class _DimensionMixin(BaseModel):
|
|
110
|
+
"""Physical dimensions in metres, mixed into spatially-defined levels."""
|
|
111
|
+
|
|
112
|
+
length_m: Optional[float] = Field(default=None, ge=0)
|
|
113
|
+
width_m: Optional[float] = Field(default=None, ge=0)
|
|
114
|
+
height_m: Optional[float] = Field(default=None, ge=0)
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def floor_area_m2(self) -> Optional[float]:
|
|
118
|
+
if self.length_m and self.width_m:
|
|
119
|
+
return round(self.length_m * self.width_m, 4)
|
|
120
|
+
return None
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def volume_m3(self) -> Optional[float]:
|
|
124
|
+
if self.length_m and self.width_m and self.height_m:
|
|
125
|
+
return round(self.length_m * self.width_m * self.height_m, 4)
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class Lot(_LocationBase, _DimensionMixin, _CapacityMixin):
|
|
130
|
+
"""Largest physical unit: a fenced plot, building, or outdoor storage area."""
|
|
131
|
+
|
|
132
|
+
lot_id: str = Field(..., min_length=1)
|
|
133
|
+
warehouse_id: str = Field(..., min_length=1, description="Parent warehouse / site FK")
|
|
134
|
+
storage_type: StorageType = "Ambient"
|
|
135
|
+
temperature_zone: TemperatureZone = "Ambient"
|
|
136
|
+
is_outdoor: bool = False
|
|
137
|
+
security_level: Literal["Open", "Restricted", "High-Security"] = "Open"
|
|
138
|
+
address: Optional[str] = None
|
|
139
|
+
gps_lat: Optional[float] = Field(default=None, ge=-90, le=90)
|
|
140
|
+
gps_lng: Optional[float] = Field(default=None, ge=-180, le=180)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class Zone(_LocationBase, _DimensionMixin, _CapacityMixin):
|
|
144
|
+
"""Functional sub-division of a Lot."""
|
|
145
|
+
|
|
146
|
+
zone_id: str = Field(..., min_length=1)
|
|
147
|
+
lot_id: str = Field(..., min_length=1, description="Parent Lot FK")
|
|
148
|
+
zone_type: Literal[
|
|
149
|
+
"Receiving",
|
|
150
|
+
"Shipping",
|
|
151
|
+
"Picking",
|
|
152
|
+
"Bulk-Storage",
|
|
153
|
+
"Cross-Dock",
|
|
154
|
+
"Returns",
|
|
155
|
+
"Quarantine",
|
|
156
|
+
"Value-Added-Services",
|
|
157
|
+
] = "Bulk-Storage"
|
|
158
|
+
storage_type: StorageType = "Ambient"
|
|
159
|
+
temperature_zone: TemperatureZone = "Ambient"
|
|
160
|
+
is_temperature_controlled: bool = False
|
|
161
|
+
allows_hazmat: bool = False
|
|
162
|
+
fire_suppression: bool = False
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class Area(_LocationBase, _DimensionMixin, _CapacityMixin):
|
|
166
|
+
"""Named section within a Zone, grouped by product category or pick strategy."""
|
|
167
|
+
|
|
168
|
+
area_id: str = Field(..., min_length=1)
|
|
169
|
+
zone_id: str = Field(..., min_length=1, description="Parent Zone FK")
|
|
170
|
+
storage_type: StorageType = "Rack-Storage"
|
|
171
|
+
velocity_class: Literal["A", "B", "C", "D", "Unclassified"] = "Unclassified"
|
|
172
|
+
product_category: Optional[str] = None
|
|
173
|
+
picking_method: Literal["Manual", "Forklift", "AGV", "Conveyor", "Mixed"] = "Manual"
|
|
174
|
+
requires_ppe: bool = False
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class Aisle(_LocationBase):
|
|
178
|
+
"""A corridor between rows of racks inside an Area."""
|
|
179
|
+
|
|
180
|
+
aisle_id: str = Field(..., min_length=1)
|
|
181
|
+
area_id: str = Field(..., min_length=1, description="Parent Area FK")
|
|
182
|
+
aisle_number: int = Field(..., ge=1)
|
|
183
|
+
orientation: Orientation = "Horizontal"
|
|
184
|
+
width_m: Optional[float] = Field(default=None, ge=0, description="Clear aisle width")
|
|
185
|
+
length_m: Optional[float] = Field(default=None, ge=0)
|
|
186
|
+
allows_forklift: bool = False
|
|
187
|
+
is_one_way: bool = False
|
|
188
|
+
lighting_lux: Optional[float] = Field(default=None, ge=0)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
class Rack(_LocationBase, _DimensionMixin, _CapacityMixin):
|
|
192
|
+
"""A physical shelving structure within an Aisle."""
|
|
193
|
+
|
|
194
|
+
rack_id: str = Field(..., min_length=1)
|
|
195
|
+
aisle_id: str = Field(..., min_length=1, description="Parent Aisle FK")
|
|
196
|
+
rack_number: int = Field(..., ge=1)
|
|
197
|
+
rack_type: Literal[
|
|
198
|
+
"Selective",
|
|
199
|
+
"Drive-In",
|
|
200
|
+
"Push-Back",
|
|
201
|
+
"Pallet-Flow",
|
|
202
|
+
"Cantilever",
|
|
203
|
+
"Mezzanine",
|
|
204
|
+
"Mobile",
|
|
205
|
+
"Carton-Flow",
|
|
206
|
+
] = "Selective"
|
|
207
|
+
total_levels: int = Field(..., ge=1, description="Number of vertical shelf levels")
|
|
208
|
+
side: Literal["Left", "Right", "Center", "N/A"] = "N/A"
|
|
209
|
+
is_double_deep: bool = False
|
|
210
|
+
max_weight_per_level_kg: Optional[float] = Field(default=None, ge=0)
|
|
211
|
+
material: Literal["Steel", "Aluminum", "Wood", "Composite"] = "Steel"
|
|
212
|
+
install_date: Optional[datetime] = None
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class Bin(_LocationBase, _DimensionMixin, _CapacityMixin):
|
|
216
|
+
"""The atomic storage cell: one slot on one shelf level of one rack."""
|
|
217
|
+
|
|
218
|
+
bin_id: str = Field(..., min_length=1)
|
|
219
|
+
rack_id: str = Field(..., min_length=1, description="Parent Rack FK")
|
|
220
|
+
level: int = Field(..., ge=1, description="Vertical level (1 = floor level)")
|
|
221
|
+
column: int = Field(..., ge=1, description="Horizontal column within the rack")
|
|
222
|
+
level_label: str = Field(default="", description="Human label e.g. 'A', 'B', 'C'")
|
|
223
|
+
bin_type: BinType = "Standard"
|
|
224
|
+
is_occupied: bool = False
|
|
225
|
+
is_pickable: bool = True
|
|
226
|
+
is_replenishment_source: bool = False
|
|
227
|
+
current_sku: Optional[str] = None
|
|
228
|
+
current_qty: float = Field(default=0.0, ge=0)
|
|
229
|
+
lot_number: Optional[str] = None
|
|
230
|
+
expiry_date: Optional[datetime] = None
|
|
231
|
+
last_counted_at: Optional[datetime] = None
|
|
232
|
+
last_movement_at: Optional[datetime] = None
|
|
233
|
+
lot_code: str = ""
|
|
234
|
+
zone_code: str = ""
|
|
235
|
+
area_code: str = ""
|
|
236
|
+
aisle_code: str = ""
|
|
237
|
+
rack_code: str = ""
|
|
238
|
+
|
|
239
|
+
@model_validator(mode="after")
|
|
240
|
+
def occupied_requires_sku(self) -> "Bin":
|
|
241
|
+
if self.is_occupied and not self.current_sku:
|
|
242
|
+
raise ValueError("is_occupied=True requires current_sku to be set")
|
|
243
|
+
return self
|
|
244
|
+
|
|
245
|
+
@computed_field # type: ignore[misc]
|
|
246
|
+
@property
|
|
247
|
+
def bin_address(self) -> str:
|
|
248
|
+
parts = [
|
|
249
|
+
self.lot_code,
|
|
250
|
+
self.zone_code,
|
|
251
|
+
self.area_code,
|
|
252
|
+
self.aisle_code,
|
|
253
|
+
self.rack_code,
|
|
254
|
+
self.code,
|
|
255
|
+
]
|
|
256
|
+
filled = [part for part in parts if part]
|
|
257
|
+
return " / ".join(filled) if filled else self.code
|
|
258
|
+
|
|
259
|
+
@property
|
|
260
|
+
def is_empty(self) -> bool:
|
|
261
|
+
return not self.is_occupied and self.current_qty == 0
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
class WarehouseLocation(BaseModel):
|
|
265
|
+
"""Flat denormalised view of a bin's full ancestry."""
|
|
266
|
+
|
|
267
|
+
bin: Bin
|
|
268
|
+
rack: Rack
|
|
269
|
+
aisle: Aisle
|
|
270
|
+
area: Area
|
|
271
|
+
zone: Zone
|
|
272
|
+
lot: Lot
|
|
273
|
+
|
|
274
|
+
@computed_field # type: ignore[misc]
|
|
275
|
+
@property
|
|
276
|
+
def full_address(self) -> str:
|
|
277
|
+
return (
|
|
278
|
+
f"{self.lot.code} / {self.zone.code} / {self.area.code} / "
|
|
279
|
+
f"{self.aisle.code} / {self.rack.code} / {self.bin.code}"
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
@computed_field # type: ignore[misc]
|
|
283
|
+
@property
|
|
284
|
+
def is_available(self) -> bool:
|
|
285
|
+
"""True only when every ancestor level is Active and the bin is free."""
|
|
286
|
+
return (
|
|
287
|
+
self.lot.is_available
|
|
288
|
+
and self.zone.is_available
|
|
289
|
+
and self.area.is_available
|
|
290
|
+
and self.aisle.is_available
|
|
291
|
+
and self.rack.is_available
|
|
292
|
+
and self.bin.is_available
|
|
293
|
+
and not self.bin.is_occupied
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
class LocationTree(BaseModel):
|
|
298
|
+
"""Hierarchical tree rooted at a Lot."""
|
|
299
|
+
|
|
300
|
+
lot: Lot
|
|
301
|
+
zones: list[ZoneTree] = Field(default_factory=list)
|
|
302
|
+
|
|
303
|
+
@property
|
|
304
|
+
def total_bins(self) -> int:
|
|
305
|
+
return sum(zone.total_bins for zone in self.zones)
|
|
306
|
+
|
|
307
|
+
@property
|
|
308
|
+
def available_bins(self) -> int:
|
|
309
|
+
return sum(zone.available_bins for zone in self.zones)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
class ZoneTree(BaseModel):
|
|
313
|
+
zone: Zone
|
|
314
|
+
areas: list[AreaTree] = Field(default_factory=list)
|
|
315
|
+
|
|
316
|
+
@property
|
|
317
|
+
def total_bins(self) -> int:
|
|
318
|
+
return sum(area.total_bins for area in self.areas)
|
|
319
|
+
|
|
320
|
+
@property
|
|
321
|
+
def available_bins(self) -> int:
|
|
322
|
+
return sum(area.available_bins for area in self.areas)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
class AreaTree(BaseModel):
|
|
326
|
+
area: Area
|
|
327
|
+
aisles: list[AisleTree] = Field(default_factory=list)
|
|
328
|
+
|
|
329
|
+
@property
|
|
330
|
+
def total_bins(self) -> int:
|
|
331
|
+
return sum(aisle.total_bins for aisle in self.aisles)
|
|
332
|
+
|
|
333
|
+
@property
|
|
334
|
+
def available_bins(self) -> int:
|
|
335
|
+
return sum(aisle.available_bins for aisle in self.aisles)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
class AisleTree(BaseModel):
|
|
339
|
+
aisle: Aisle
|
|
340
|
+
racks: list[RackTree] = Field(default_factory=list)
|
|
341
|
+
|
|
342
|
+
@property
|
|
343
|
+
def total_bins(self) -> int:
|
|
344
|
+
return sum(rack.total_bins for rack in self.racks)
|
|
345
|
+
|
|
346
|
+
@property
|
|
347
|
+
def available_bins(self) -> int:
|
|
348
|
+
return sum(rack.available_bins for rack in self.racks)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
class RackTree(BaseModel):
|
|
352
|
+
rack: Rack
|
|
353
|
+
bins: list[Bin] = Field(default_factory=list)
|
|
354
|
+
|
|
355
|
+
@property
|
|
356
|
+
def total_bins(self) -> int:
|
|
357
|
+
return len(self.bins)
|
|
358
|
+
|
|
359
|
+
@property
|
|
360
|
+
def available_bins(self) -> int:
|
|
361
|
+
return sum(1 for bin_ in self.bins if not bin_.is_occupied and bin_.is_available)
|
|
362
|
+
|
|
363
|
+
@property
|
|
364
|
+
def occupancy_pct(self) -> float:
|
|
365
|
+
if not self.bins:
|
|
366
|
+
return 0.0
|
|
367
|
+
occupied = sum(1 for bin_ in self.bins if bin_.is_occupied)
|
|
368
|
+
return round(occupied / len(self.bins) * 100, 2)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
LocationTree.model_rebuild()
|
|
372
|
+
ZoneTree.model_rebuild()
|
|
373
|
+
AreaTree.model_rebuild()
|
|
374
|
+
AisleTree.model_rebuild()
|
|
375
|
+
RackTree.model_rebuild()
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class LotCreate(BaseModel):
|
|
379
|
+
lot_id: str
|
|
380
|
+
warehouse_id: str
|
|
381
|
+
code: str
|
|
382
|
+
name: str
|
|
383
|
+
storage_type: StorageType = "Ambient"
|
|
384
|
+
temperature_zone: TemperatureZone = "Ambient"
|
|
385
|
+
status: LocationStatus = "Active"
|
|
386
|
+
description: Optional[str] = None
|
|
387
|
+
length_m: Optional[float] = None
|
|
388
|
+
width_m: Optional[float] = None
|
|
389
|
+
height_m: Optional[float] = None
|
|
390
|
+
max_weight_kg: Optional[float] = None
|
|
391
|
+
max_volume_m3: Optional[float] = None
|
|
392
|
+
is_outdoor: bool = False
|
|
393
|
+
security_level: Literal["Open", "Restricted", "High-Security"] = "Open"
|
|
394
|
+
address: Optional[str] = None
|
|
395
|
+
gps_lat: Optional[float] = None
|
|
396
|
+
gps_lng: Optional[float] = None
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
class LotUpdate(BaseModel):
|
|
400
|
+
code: Optional[str] = None
|
|
401
|
+
name: Optional[str] = None
|
|
402
|
+
status: Optional[LocationStatus] = None
|
|
403
|
+
description: Optional[str] = None
|
|
404
|
+
tags: Optional[list[str]] = None
|
|
405
|
+
is_active: Optional[bool] = None
|
|
406
|
+
storage_type: Optional[StorageType] = None
|
|
407
|
+
temperature_zone: Optional[TemperatureZone] = None
|
|
408
|
+
length_m: Optional[float] = None
|
|
409
|
+
width_m: Optional[float] = None
|
|
410
|
+
height_m: Optional[float] = None
|
|
411
|
+
max_weight_kg: Optional[float] = None
|
|
412
|
+
current_weight_kg: Optional[float] = None
|
|
413
|
+
max_volume_m3: Optional[float] = None
|
|
414
|
+
current_volume_m3: Optional[float] = None
|
|
415
|
+
is_outdoor: Optional[bool] = None
|
|
416
|
+
security_level: Optional[Literal["Open", "Restricted", "High-Security"]] = None
|
|
417
|
+
address: Optional[str] = None
|
|
418
|
+
gps_lat: Optional[float] = None
|
|
419
|
+
gps_lng: Optional[float] = None
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
class ZoneCreate(BaseModel):
|
|
423
|
+
zone_id: str
|
|
424
|
+
lot_id: str
|
|
425
|
+
code: str
|
|
426
|
+
name: str
|
|
427
|
+
zone_type: Literal[
|
|
428
|
+
"Receiving",
|
|
429
|
+
"Shipping",
|
|
430
|
+
"Picking",
|
|
431
|
+
"Bulk-Storage",
|
|
432
|
+
"Cross-Dock",
|
|
433
|
+
"Returns",
|
|
434
|
+
"Quarantine",
|
|
435
|
+
"Value-Added-Services",
|
|
436
|
+
] = "Bulk-Storage"
|
|
437
|
+
storage_type: StorageType = "Ambient"
|
|
438
|
+
temperature_zone: TemperatureZone = "Ambient"
|
|
439
|
+
status: LocationStatus = "Active"
|
|
440
|
+
description: Optional[str] = None
|
|
441
|
+
is_temperature_controlled: bool = False
|
|
442
|
+
allows_hazmat: bool = False
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
class ZoneUpdate(BaseModel):
|
|
446
|
+
code: Optional[str] = None
|
|
447
|
+
name: Optional[str] = None
|
|
448
|
+
status: Optional[LocationStatus] = None
|
|
449
|
+
description: Optional[str] = None
|
|
450
|
+
tags: Optional[list[str]] = None
|
|
451
|
+
is_active: Optional[bool] = None
|
|
452
|
+
zone_type: Optional[
|
|
453
|
+
Literal[
|
|
454
|
+
"Receiving",
|
|
455
|
+
"Shipping",
|
|
456
|
+
"Picking",
|
|
457
|
+
"Bulk-Storage",
|
|
458
|
+
"Cross-Dock",
|
|
459
|
+
"Returns",
|
|
460
|
+
"Quarantine",
|
|
461
|
+
"Value-Added-Services",
|
|
462
|
+
]
|
|
463
|
+
] = None
|
|
464
|
+
storage_type: Optional[StorageType] = None
|
|
465
|
+
temperature_zone: Optional[TemperatureZone] = None
|
|
466
|
+
length_m: Optional[float] = None
|
|
467
|
+
width_m: Optional[float] = None
|
|
468
|
+
height_m: Optional[float] = None
|
|
469
|
+
max_weight_kg: Optional[float] = None
|
|
470
|
+
current_weight_kg: Optional[float] = None
|
|
471
|
+
max_volume_m3: Optional[float] = None
|
|
472
|
+
current_volume_m3: Optional[float] = None
|
|
473
|
+
is_temperature_controlled: Optional[bool] = None
|
|
474
|
+
allows_hazmat: Optional[bool] = None
|
|
475
|
+
fire_suppression: Optional[bool] = None
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
class AreaCreate(BaseModel):
|
|
479
|
+
area_id: str
|
|
480
|
+
zone_id: str
|
|
481
|
+
code: str
|
|
482
|
+
name: str
|
|
483
|
+
storage_type: StorageType = "Rack-Storage"
|
|
484
|
+
velocity_class: Literal["A", "B", "C", "D", "Unclassified"] = "Unclassified"
|
|
485
|
+
product_category: Optional[str] = None
|
|
486
|
+
picking_method: Literal["Manual", "Forklift", "AGV", "Conveyor", "Mixed"] = "Manual"
|
|
487
|
+
status: LocationStatus = "Active"
|
|
488
|
+
requires_ppe: bool = False
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
class AreaUpdate(BaseModel):
|
|
492
|
+
code: Optional[str] = None
|
|
493
|
+
name: Optional[str] = None
|
|
494
|
+
status: Optional[LocationStatus] = None
|
|
495
|
+
description: Optional[str] = None
|
|
496
|
+
tags: Optional[list[str]] = None
|
|
497
|
+
is_active: Optional[bool] = None
|
|
498
|
+
storage_type: Optional[StorageType] = None
|
|
499
|
+
velocity_class: Optional[Literal["A", "B", "C", "D", "Unclassified"]] = None
|
|
500
|
+
product_category: Optional[str] = None
|
|
501
|
+
picking_method: Optional[Literal["Manual", "Forklift", "AGV", "Conveyor", "Mixed"]] = None
|
|
502
|
+
length_m: Optional[float] = None
|
|
503
|
+
width_m: Optional[float] = None
|
|
504
|
+
height_m: Optional[float] = None
|
|
505
|
+
max_weight_kg: Optional[float] = None
|
|
506
|
+
current_weight_kg: Optional[float] = None
|
|
507
|
+
max_volume_m3: Optional[float] = None
|
|
508
|
+
current_volume_m3: Optional[float] = None
|
|
509
|
+
requires_ppe: Optional[bool] = None
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
class AisleCreate(BaseModel):
|
|
513
|
+
aisle_id: str
|
|
514
|
+
area_id: str
|
|
515
|
+
code: str
|
|
516
|
+
name: str
|
|
517
|
+
aisle_number: int
|
|
518
|
+
orientation: Orientation = "Horizontal"
|
|
519
|
+
width_m: Optional[float] = None
|
|
520
|
+
length_m: Optional[float] = None
|
|
521
|
+
allows_forklift: bool = False
|
|
522
|
+
is_one_way: bool = False
|
|
523
|
+
status: LocationStatus = "Active"
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
class AisleUpdate(BaseModel):
|
|
527
|
+
code: Optional[str] = None
|
|
528
|
+
name: Optional[str] = None
|
|
529
|
+
status: Optional[LocationStatus] = None
|
|
530
|
+
description: Optional[str] = None
|
|
531
|
+
tags: Optional[list[str]] = None
|
|
532
|
+
is_active: Optional[bool] = None
|
|
533
|
+
aisle_number: Optional[int] = None
|
|
534
|
+
orientation: Optional[Orientation] = None
|
|
535
|
+
width_m: Optional[float] = None
|
|
536
|
+
length_m: Optional[float] = None
|
|
537
|
+
allows_forklift: Optional[bool] = None
|
|
538
|
+
is_one_way: Optional[bool] = None
|
|
539
|
+
lighting_lux: Optional[float] = None
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
class RackCreate(BaseModel):
|
|
543
|
+
rack_id: str
|
|
544
|
+
aisle_id: str
|
|
545
|
+
code: str
|
|
546
|
+
name: str
|
|
547
|
+
rack_number: int
|
|
548
|
+
total_levels: int
|
|
549
|
+
rack_type: Literal[
|
|
550
|
+
"Selective",
|
|
551
|
+
"Drive-In",
|
|
552
|
+
"Push-Back",
|
|
553
|
+
"Pallet-Flow",
|
|
554
|
+
"Cantilever",
|
|
555
|
+
"Mezzanine",
|
|
556
|
+
"Mobile",
|
|
557
|
+
"Carton-Flow",
|
|
558
|
+
] = "Selective"
|
|
559
|
+
side: Literal["Left", "Right", "Center", "N/A"] = "N/A"
|
|
560
|
+
is_double_deep: bool = False
|
|
561
|
+
max_weight_kg: Optional[float] = None
|
|
562
|
+
max_weight_per_level_kg: Optional[float] = None
|
|
563
|
+
length_m: Optional[float] = None
|
|
564
|
+
width_m: Optional[float] = None
|
|
565
|
+
height_m: Optional[float] = None
|
|
566
|
+
status: LocationStatus = "Active"
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
class RackUpdate(BaseModel):
|
|
570
|
+
code: Optional[str] = None
|
|
571
|
+
name: Optional[str] = None
|
|
572
|
+
status: Optional[LocationStatus] = None
|
|
573
|
+
description: Optional[str] = None
|
|
574
|
+
tags: Optional[list[str]] = None
|
|
575
|
+
is_active: Optional[bool] = None
|
|
576
|
+
rack_number: Optional[int] = None
|
|
577
|
+
rack_type: Optional[
|
|
578
|
+
Literal[
|
|
579
|
+
"Selective",
|
|
580
|
+
"Drive-In",
|
|
581
|
+
"Push-Back",
|
|
582
|
+
"Pallet-Flow",
|
|
583
|
+
"Cantilever",
|
|
584
|
+
"Mezzanine",
|
|
585
|
+
"Mobile",
|
|
586
|
+
"Carton-Flow",
|
|
587
|
+
]
|
|
588
|
+
] = None
|
|
589
|
+
total_levels: Optional[int] = None
|
|
590
|
+
side: Optional[Literal["Left", "Right", "Center", "N/A"]] = None
|
|
591
|
+
is_double_deep: Optional[bool] = None
|
|
592
|
+
max_weight_kg: Optional[float] = None
|
|
593
|
+
current_weight_kg: Optional[float] = None
|
|
594
|
+
max_volume_m3: Optional[float] = None
|
|
595
|
+
current_volume_m3: Optional[float] = None
|
|
596
|
+
max_weight_per_level_kg: Optional[float] = None
|
|
597
|
+
length_m: Optional[float] = None
|
|
598
|
+
width_m: Optional[float] = None
|
|
599
|
+
height_m: Optional[float] = None
|
|
600
|
+
material: Optional[Literal["Steel", "Aluminum", "Wood", "Composite"]] = None
|
|
601
|
+
install_date: Optional[datetime] = None
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
class BinCreate(BaseModel):
|
|
605
|
+
bin_id: str
|
|
606
|
+
rack_id: str
|
|
607
|
+
code: str
|
|
608
|
+
name: str
|
|
609
|
+
level: int
|
|
610
|
+
column: int
|
|
611
|
+
level_label: str = ""
|
|
612
|
+
bin_type: BinType = "Standard"
|
|
613
|
+
max_weight_kg: Optional[float] = None
|
|
614
|
+
max_volume_m3: Optional[float] = None
|
|
615
|
+
length_m: Optional[float] = None
|
|
616
|
+
width_m: Optional[float] = None
|
|
617
|
+
height_m: Optional[float] = None
|
|
618
|
+
is_pickable: bool = True
|
|
619
|
+
is_replenishment_source: bool = False
|
|
620
|
+
status: LocationStatus = "Active"
|
|
621
|
+
lot_code: str = ""
|
|
622
|
+
zone_code: str = ""
|
|
623
|
+
area_code: str = ""
|
|
624
|
+
aisle_code: str = ""
|
|
625
|
+
rack_code: str = ""
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
class BinUpdate(BaseModel):
|
|
629
|
+
code: Optional[str] = None
|
|
630
|
+
name: Optional[str] = None
|
|
631
|
+
description: Optional[str] = None
|
|
632
|
+
tags: Optional[list[str]] = None
|
|
633
|
+
is_active: Optional[bool] = None
|
|
634
|
+
status: Optional[LocationStatus] = None
|
|
635
|
+
is_occupied: Optional[bool] = None
|
|
636
|
+
is_pickable: Optional[bool] = None
|
|
637
|
+
current_sku: Optional[str] = None
|
|
638
|
+
current_qty: Optional[float] = None
|
|
639
|
+
current_weight_kg: Optional[float] = None
|
|
640
|
+
current_volume_m3: Optional[float] = None
|
|
641
|
+
lot_number: Optional[str] = None
|
|
642
|
+
expiry_date: Optional[datetime] = None
|
|
643
|
+
last_counted_at: Optional[datetime] = None
|
|
644
|
+
last_movement_at: Optional[datetime] = None
|
|
645
|
+
bin_type: Optional[BinType] = None
|
|
646
|
+
level: Optional[int] = None
|
|
647
|
+
column: Optional[int] = None
|
|
648
|
+
level_label: Optional[str] = None
|
|
649
|
+
max_weight_kg: Optional[float] = None
|
|
650
|
+
max_volume_m3: Optional[float] = None
|
|
651
|
+
length_m: Optional[float] = None
|
|
652
|
+
width_m: Optional[float] = None
|
|
653
|
+
height_m: Optional[float] = None
|
|
654
|
+
is_replenishment_source: Optional[bool] = None
|
|
655
|
+
lot_code: Optional[str] = None
|
|
656
|
+
zone_code: Optional[str] = None
|
|
657
|
+
area_code: Optional[str] = None
|
|
658
|
+
aisle_code: Optional[str] = None
|
|
659
|
+
rack_code: Optional[str] = None
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
class PaginatedLotResponse(BaseModel):
|
|
663
|
+
total: int
|
|
664
|
+
page: int
|
|
665
|
+
page_size: int
|
|
666
|
+
results: list[Lot]
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
class PaginatedZoneResponse(BaseModel):
|
|
670
|
+
total: int
|
|
671
|
+
page: int
|
|
672
|
+
page_size: int
|
|
673
|
+
results: list[Zone]
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
class PaginatedAreaResponse(BaseModel):
|
|
677
|
+
total: int
|
|
678
|
+
page: int
|
|
679
|
+
page_size: int
|
|
680
|
+
results: list[Area]
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
class PaginatedAisleResponse(BaseModel):
|
|
684
|
+
total: int
|
|
685
|
+
page: int
|
|
686
|
+
page_size: int
|
|
687
|
+
results: list[Aisle]
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
class PaginatedRackResponse(BaseModel):
|
|
691
|
+
total: int
|
|
692
|
+
page: int
|
|
693
|
+
page_size: int
|
|
694
|
+
results: list[Rack]
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
class PaginatedBinResponse(BaseModel):
|
|
698
|
+
total: int
|
|
699
|
+
page: int
|
|
700
|
+
page_size: int
|
|
701
|
+
results: list[Bin]
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
class PaginatedLocationResponse(BaseModel):
|
|
705
|
+
total: int
|
|
706
|
+
page: int
|
|
707
|
+
page_size: int
|
|
708
|
+
results: list[WarehouseLocation]
|