ifixkart-storefront/types/index.ts

68 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export interface Product {
id: string;
/** Real catalog product id when available (for cart / checkout) */
product_id?: string;
/** First sellable variant id when available */
first_variant_id?: string;
name: string;
price: number;
/** Highest variant price — enables "$min $max" range display */
priceMax?: number;
oldPrice?: number;
rating: number;
reviewsCount?: number;
image: string;
imageHover?: string;
discount?: number;
category: string;
hasTimer?: boolean;
timeRemaining?: {
days: number;
hours: number;
minutes: number;
seconds: number;
};
features?: string[];
description?: string;
isHot?: boolean;
isFeatured?: boolean;
isNewArrival?: boolean;
isRecentlyLaunched?: boolean;
isTechGadget?: boolean;
soldCount?: number;
totalStock?: number;
color?: string;
brand?: string;
slug?: string;
}
export interface Category {
id: string;
name: string;
slug: string;
iconName: string;
productCount: number;
image: string;
}
export interface BlogArticle {
id: string;
title: string;
excerpt: string;
date: string;
author: string;
image: string;
readTime: string;
}
export interface PromoCardData {
id: string;
badge: string;
title: string;
subtitle: string;
priceText: string;
image: string;
bgColor: string;
textColor: string;
badgeBg: string;
}