-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.d.ts
65 lines (57 loc) · 1.16 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
export interface Navigate {
title: string;
link: string;
}
export interface BcSuggestion {
slug: string;
name: string;
}
export type Market =
| 'tiki'
| 'tiki-shopee'
| 'tiki-lazada'
| 'shopee'
| 'shopee-tiki'
| 'shopee-lazada'
| 'lazada'
| 'lazada-tiki'
| 'lazada-shopee'
| 'all';
export interface ProductPreview {
name: string;
img: string;
price: string;
totalSales: string;
link: string;
market: Market;
priceBeforeDiscount?: number;
discountPercent?: number;
qtyRemainPercent?: number;
product_base_id?: string;
}
export interface ItemsWithKeyword {
keyword: string;
items: ProductPreview[];
}
export interface ItemHistory {
price: number[];
priceTs: number[];
}
export interface Subscription {
endpoint: string;
keys: {
p256dh: string;
auth: string;
};
}
export interface Product
extends Pick<
ProductPreview,
'name' | 'price' | 'totalSales' | 'market' | 'link'
> {
brand: string;
description: string;
images: string[];
priceBeforeDiscount?: string | null;
product_base_id?: string;
}