generated from google-gemini/aistudio-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
41 lines (36 loc) · 1.02 KB
/
types.ts
File metadata and controls
41 lines (36 loc) · 1.02 KB
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
export interface Product {
id: string;
name: string;
description: string;
price: number;
image: string;
category: 'Phone' | 'Laptop' | 'Tablet' | 'Watch' | 'Audio' | 'Gaming' | 'Camera' | 'Drone' | 'Smart Home';
condition: 'Mint' | 'Good' | 'Fair' | 'Poor';
location: string; // Simplified for demo (e.g., "City, State")
sellerId: string;
sellerName: string;
marketBadge?: string; // AI-generated badge like "Great Deal", "Trending"
}
export interface SwapAssessment {
estimatedCondition: string;
marketValue: number;
tradeInValue: number;
topUpAmount: number;
reasoning: string;
sellerProfitMargin: number; // Internal metric
}
export interface Message {
id: string;
sender: 'buyer' | 'seller';
text: string;
timestamp: number;
isOffer?: boolean;
offerAmount?: number;
}
export interface Negotiation {
id: string;
productId: string;
messages: Message[];
status: 'active' | 'accepted' | 'rejected';
}
export type ViewState = 'market' | 'sell' | 'negotiations' | 'cart' | 'profile';