feat(plan4): types CatalogProduct, ProductFilters, ProductListResponse
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user