added new types
This commit is contained in:
Vendored
+42
-1
@@ -88,7 +88,10 @@ declare global {
|
||||
colors: string[];
|
||||
};
|
||||
|
||||
type ProductListItem = Pick<Product, "id" | "variants" | "name" | "rating" | "slug" | "category" | "colors">
|
||||
type ProductListItem = Pick<
|
||||
Product,
|
||||
"id" | "variants" | "name" | "rating" | "slug" | "category" | "colors"
|
||||
>;
|
||||
|
||||
type Article = {
|
||||
id: number;
|
||||
@@ -176,6 +179,44 @@ declare global {
|
||||
address: Address | null;
|
||||
};
|
||||
|
||||
type DiscountCode = {
|
||||
code: string;
|
||||
percent: number;
|
||||
amount: string;
|
||||
};
|
||||
|
||||
type CartItem = {
|
||||
id: number;
|
||||
product: {
|
||||
title: string;
|
||||
product_attributes: {
|
||||
id: number;
|
||||
attribute_type: {
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
value: string;
|
||||
}[];
|
||||
category: string;
|
||||
in_stock: number;
|
||||
price: string;
|
||||
discount: number;
|
||||
color: string;
|
||||
image: string;
|
||||
discount_amount: string;
|
||||
final_price: string;
|
||||
};
|
||||
quantity: number;
|
||||
};
|
||||
|
||||
type Cart = {
|
||||
discount_code: DiscountCode;
|
||||
items: CartItem[];
|
||||
cart_total: string;
|
||||
tax: string;
|
||||
final_price: string;
|
||||
};
|
||||
|
||||
type ServerFile = {
|
||||
id: number;
|
||||
file_link: string;
|
||||
|
||||
Reference in New Issue
Block a user