4
0
forked from crowetic/commerce
commerce/framework/types.d.ts
2021-01-09 12:07:17 -03:00

44 lines
705 B
TypeScript

interface Product {
id: string | number
name: string
description: string
images: ProductImage[]
variants: ProductVariant[]
prices: ProductPrice[]
slug: string
path?: string
}
interface ProductImage {
url: string
alt?: string
}
interface ProductVariant {
id: string | number
}
interface ProductPrice {
value: number | string
currencyCode: 'USD' | 'ARS'
type?: 'price' | 'retail' | 'sale' | string
}
interface Wishlist {
id: string
products: Pick<Product, 'id' | 'name' | 'prices'>[]
}
interface Wishlist {
id: string
products: Pick<Product, 'id' | 'name' | 'prices'>[]
}
interface Customer {
id: string
name: string
}
interface Category {}
interface Brand {}