feat: enhance Letzshop order import with EAN matching and stats
- Add historical order import with pagination support - Add customer_locale, shipping_country_iso, billing_country_iso columns - Add gtin/gtin_type columns to Product table for EAN matching - Fix order stats to count all orders server-side (not just visible page) - Add GraphQL introspection script with tracking workaround tests - Enrich inventory units with EAN, MPN, SKU, product name - Add LetzshopOrderStats schema for proper status counts Migrations: - a9a86cef6cca: Add locale and country fields to letzshop_orders - cb88bc9b5f86: Add gtin columns to products table 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,15 @@ class LetzshopOrderDetailResponse(LetzshopOrderResponse):
|
||||
raw_order_data: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class LetzshopOrderStats(BaseModel):
|
||||
"""Schema for order statistics by status."""
|
||||
|
||||
pending: int = 0
|
||||
confirmed: int = 0
|
||||
rejected: int = 0
|
||||
shipped: int = 0
|
||||
|
||||
|
||||
class LetzshopOrderListResponse(BaseModel):
|
||||
"""Schema for paginated Letzshop order list."""
|
||||
|
||||
@@ -137,6 +146,7 @@ class LetzshopOrderListResponse(BaseModel):
|
||||
total: int
|
||||
skip: int
|
||||
limit: int
|
||||
stats: LetzshopOrderStats | None = None # Order counts by sync_status
|
||||
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user