Spaces:
Build error
Build error
Upload types/index.ts with huggingface_hub
Browse files- types/index.ts +29 -0
types/index.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export type Status = 'available' | 'pending' | 'sold';
|
| 2 |
+
|
| 3 |
+
export interface Defect {
|
| 4 |
+
x: number;
|
| 5 |
+
y: number;
|
| 6 |
+
type: 'scratch' | 'dent';
|
| 7 |
+
label: string;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
export interface Kit {
|
| 11 |
+
box: boolean;
|
| 12 |
+
papers: boolean;
|
| 13 |
+
warranty: boolean;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
export interface Product {
|
| 17 |
+
id: number;
|
| 18 |
+
brand: string;
|
| 19 |
+
model: string;
|
| 20 |
+
price: number;
|
| 21 |
+
status: Status;
|
| 22 |
+
images: string[];
|
| 23 |
+
defects: Defect[];
|
| 24 |
+
aiScore: number;
|
| 25 |
+
seller: string;
|
| 26 |
+
kit: Kit;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
export type View = 'home' | 'search' | 'sell' | 'chat' | 'profile';
|