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

39 lines
604 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']>[]
}
interface Customer {
id: string
name: string
}
interface Category {}
interface Brand {}