fix: add Pydantic models for customer/inventory endpoints and align JS rules

- Add Pydantic response models for vendor customer endpoints
- Add InventoryMessageResponse for delete endpoint
- Align JS rule IDs between YAML and validation script (JS-001=logger, JS-002=apiClient)
- Add exception for init-*.js files in console logging check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-04 23:38:12 +01:00
parent 81bfc49f77
commit d2063f6dad
6 changed files with 159 additions and 67 deletions

View File

@@ -18,6 +18,7 @@ from models.schema.inventory import (
InventoryAdjust,
InventoryCreate,
InventoryListResponse,
InventoryMessageResponse,
InventoryReserve,
InventoryResponse,
InventoryUpdate,
@@ -123,7 +124,7 @@ def update_inventory(
)
@router.delete("/inventory/{inventory_id}")
@router.delete("/inventory/{inventory_id}", response_model=InventoryMessageResponse)
def delete_inventory(
inventory_id: int,
current_user: User = Depends(get_current_vendor_api),
@@ -131,4 +132,4 @@ def delete_inventory(
):
"""Delete inventory entry."""
inventory_service.delete_inventory(db, current_user.token_vendor_id, inventory_id)
return {"message": "Inventory deleted successfully"}
return InventoryMessageResponse(message="Inventory deleted successfully")