2021-01-06 17:01:32 -03:00
|
|
|
interface Product {
|
|
|
|
id: string | number
|
|
|
|
name: string
|
|
|
|
description: string
|
2021-01-07 11:58:00 -03:00
|
|
|
images: ProductImage[]
|
2021-01-07 16:28:50 -03:00
|
|
|
variants: ProductVariant[]
|
2021-01-07 11:58:00 -03:00
|
|
|
prices: ProductPrice[]
|
2021-01-06 17:01:32 -03:00
|
|
|
slug: string
|
2021-01-07 11:58:00 -03:00
|
|
|
path?: string
|
2021-01-06 17:01:32 -03:00
|
|
|
}
|
2021-01-07 16:28:50 -03:00
|
|
|
interface ProductImage {
|
|
|
|
url: string
|
|
|
|
alt?: string
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ProductVariant {
|
|
|
|
id: string | number
|
|
|
|
}
|
2021-01-06 17:01:32 -03:00
|
|
|
|
2021-01-07 11:58:00 -03:00
|
|
|
interface ProductPrice {
|
|
|
|
value: number | string
|
|
|
|
currencyCode: 'USD' | 'ARS'
|
|
|
|
type?: 'price' | 'retail' | 'sale' | string
|
2021-01-06 17:01:32 -03:00
|
|
|
}
|
2021-01-09 12:05:40 -03:00
|
|
|
|
2021-01-09 12:17:31 -03:00
|
|
|
interface Cart {
|
2021-01-09 12:05:40 -03:00
|
|
|
id: string
|
2021-01-09 12:07:17 -03:00
|
|
|
products: Pick<Product, 'id' | 'name' | 'prices'>[]
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Wishlist {
|
|
|
|
id: string
|
|
|
|
products: Pick<Product, 'id' | 'name' | 'prices'>[]
|
2021-01-09 12:05:40 -03:00
|
|
|
}
|
|
|
|
|
2021-01-09 12:17:31 -03:00
|
|
|
interface Order {}
|
|
|
|
|
2021-01-09 12:05:40 -03:00
|
|
|
interface Customer {
|
|
|
|
id: string
|
|
|
|
name: string
|
2021-01-09 12:17:31 -03:00
|
|
|
email: string
|
2021-01-09 12:05:40 -03:00
|
|
|
}
|
|
|
|
|
2021-01-09 12:17:31 -03:00
|
|
|
interface Category {
|
|
|
|
id: string
|
|
|
|
name: string
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Brand {
|
|
|
|
id: string
|
|
|
|
name: string
|
|
|
|
}
|
2021-01-09 12:05:40 -03:00
|
|
|
|
2021-01-09 12:17:31 -03:00
|
|
|
type Features = 'wishlist' | 'customer'
|