mirror of
https://github.com/vercel/commerce.git
synced 2025-04-03 02:25:52 +00:00
15 lines
419 B
TypeScript
15 lines
419 B
TypeScript
import type { ItemBody as WishlistItemBody } from '../wishlist'
|
|
import type { ItemBody } from '../cart'
|
|
|
|
export const parseWishlistItem = (item: WishlistItemBody) => ({
|
|
product_id: item.productId,
|
|
variant_id: item.variantId,
|
|
})
|
|
|
|
export const parseCartItem = (item: ItemBody) => ({
|
|
quantity: item.quantity,
|
|
product_id: item.productId,
|
|
variant_id: item.variantId,
|
|
option_selections: item.optionSelections,
|
|
})
|