feat(plan4): types CatalogProduct, ProductFilters, ProductListResponse

This commit is contained in:
2026-06-08 23:18:29 +02:00
parent e576df334a
commit 6dd6dc301e
+25
View File
@@ -0,0 +1,25 @@
// src/types/products.ts
/** Produit Shopify simplifié pour affichage catalogue */
export interface CatalogProduct {
shopifyId: string
ref: string // SKU de la première variante
handle: string
title: string
price: string // "29.99"
stock: number // inventory_quantity variante 1
status: 'active' | 'draft' | 'archived'
shopifyUrl: string // https://materiaux-destock.myshopify.com/admin/products/<id>
}
/** Filtres appliqués à la liste */
export interface ProductFilters {
status: 'all' | 'active' | 'draft'
search: string // filtre titre ou ref (côté client)
}
/** Réponse de l'API /api/products/list */
export interface ProductListResponse {
products: CatalogProduct[]
total: number
}