mirror of
https://github.com/vercel/commerce.git
synced 2025-05-10 11:47:51 +00:00
50 lines
863 B
TypeScript
50 lines
863 B
TypeScript
export type FourthwallMoney = {
|
|
value: number;
|
|
currencyCode: string;
|
|
}
|
|
|
|
export type FourthwallProduct = {
|
|
id: string;
|
|
name: string;
|
|
slug: string;
|
|
description: string;
|
|
|
|
images: FourthwallProductImage[];
|
|
variants: FourthwallProductVariant[];
|
|
};
|
|
|
|
export type FourthwallProductImage = {
|
|
id: string;
|
|
url: string;
|
|
width: number;
|
|
height: number;
|
|
};
|
|
|
|
export type FourthwallProductVariant = {
|
|
id: string;
|
|
name: string;
|
|
sku: string;
|
|
unitPrice: FourthwallMoney;
|
|
|
|
images: FourthwallProductImage[];
|
|
|
|
// other attr
|
|
};
|
|
|
|
|
|
export type FourthwallCart = {
|
|
id: string | undefined;
|
|
// checkoutUrl: string;
|
|
// cost: {
|
|
// subtotalAmount: Money;
|
|
// totalAmount: Money;
|
|
// totalTaxAmount: Money;
|
|
// };
|
|
items: FourthwallCartItem[];
|
|
};
|
|
|
|
export type FourthwallCartItem = {
|
|
variant: FourthwallProductVariant;
|
|
quantity: number;
|
|
};
|