added new types
This commit is contained in:
Vendored
+81
-51
@@ -25,71 +25,73 @@ declare global {
|
||||
};
|
||||
|
||||
type ProductVariantAttribute = {
|
||||
"id": number,
|
||||
"attribute_type": {
|
||||
"id": number,
|
||||
"name": string
|
||||
},
|
||||
"value": string
|
||||
}
|
||||
id: number;
|
||||
attribute_type: {
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
value: string;
|
||||
};
|
||||
|
||||
type ProductImage = {
|
||||
"id": number,
|
||||
"name": string,
|
||||
"image": string
|
||||
}
|
||||
|
||||
id: number;
|
||||
name: string;
|
||||
image: string;
|
||||
};
|
||||
|
||||
type ProductDetailItem = {
|
||||
"id": number,
|
||||
"title": string,
|
||||
"detail_text1": string,
|
||||
"detail_text2": string,
|
||||
"detail_text3": string,
|
||||
"detail_text4": string
|
||||
}
|
||||
id: number;
|
||||
title: string;
|
||||
detail_text1: string;
|
||||
detail_text2: string;
|
||||
detail_text3: string;
|
||||
detail_text4: string;
|
||||
};
|
||||
|
||||
type ProductDetail = {
|
||||
"id": number,
|
||||
"detail": ProductDetailItem[],
|
||||
"detail_category": number
|
||||
}
|
||||
id: number;
|
||||
detail: ProductDetailItem[];
|
||||
detail_category: number;
|
||||
};
|
||||
|
||||
type ProductInPackItem = {
|
||||
"id": number,
|
||||
"item_title": string,
|
||||
"cover": string
|
||||
}
|
||||
id: number;
|
||||
item_title: string;
|
||||
cover: string;
|
||||
};
|
||||
|
||||
type ProductVariant = {
|
||||
"id": number,
|
||||
"product_attributes": ProductVariantAttribute[],
|
||||
"price": string,
|
||||
"in_pack_items": ProductInPackItem[],
|
||||
"details": ProductDetail[],
|
||||
"images": ProductImage[],
|
||||
"in_stock": number,
|
||||
"discount": number,
|
||||
"color": string,
|
||||
"video": string | null
|
||||
id: number;
|
||||
product_attributes: ProductVariantAttribute[];
|
||||
price: string;
|
||||
in_pack_items: ProductInPackItem[];
|
||||
details: ProductDetail[];
|
||||
images: ProductImage[];
|
||||
in_stock: number;
|
||||
discount: number;
|
||||
color: string;
|
||||
video: string | null;
|
||||
};
|
||||
|
||||
type Product = {
|
||||
"id": number,
|
||||
"variants": ProductVariant[],
|
||||
"related_products": ProductListItem[],
|
||||
"name": string,
|
||||
"description": string,
|
||||
"rating": number,
|
||||
"slug": string,
|
||||
"meta_description": string | null,
|
||||
"meta_keywords": string | null,
|
||||
"meta_rating": number,
|
||||
"category": number,
|
||||
"colors": string[]
|
||||
}
|
||||
id: number;
|
||||
variants: ProductVariant[];
|
||||
related_products: ProductListItem[];
|
||||
name: string;
|
||||
description: string;
|
||||
rating: number;
|
||||
slug: string;
|
||||
meta_description: string | null;
|
||||
meta_keywords: string | null;
|
||||
meta_rating: number;
|
||||
category: number;
|
||||
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;
|
||||
@@ -166,12 +168,40 @@ declare global {
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
type Order = {
|
||||
id: number;
|
||||
count: number;
|
||||
images: string[];
|
||||
discount_code: string | null;
|
||||
status: string;
|
||||
is_paid: boolean;
|
||||
created_at: string | null;
|
||||
address: Address | null;
|
||||
};
|
||||
|
||||
type ServerFile = {
|
||||
id: number;
|
||||
file_link: string;
|
||||
date: string;
|
||||
size: number;
|
||||
name: string;
|
||||
};
|
||||
|
||||
type TicketMessage = {
|
||||
id: number;
|
||||
content: string;
|
||||
created_at: string;
|
||||
attachments: ServerFile[];
|
||||
};
|
||||
|
||||
type Ticket = {
|
||||
id: number;
|
||||
messages: TicketMessage[];
|
||||
subject: string;
|
||||
ticket_category: string;
|
||||
status: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
order: Order;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user