4
0
forked from crowetic/commerce
commerce/framework/types.d.ts

44 lines
705 B
TypeScript
Raw Normal View History

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
interface Wishlist {
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
}
interface Customer {
id: string
name: string
}
interface Category {}
interface Brand {}