93 lines
1.6 KiB
TypeScript
93 lines
1.6 KiB
TypeScript
export interface User {
|
|
id: string;
|
|
mobileNumber: string;
|
|
name?: string;
|
|
email?: string;
|
|
locationLabels?: string[];
|
|
}
|
|
|
|
export interface Location {
|
|
latitude: number;
|
|
longitude: number;
|
|
address: string;
|
|
city: string;
|
|
pincode: string;
|
|
label?: string;
|
|
}
|
|
|
|
export interface Provider {
|
|
id: string;
|
|
imageUrl: string;
|
|
name: string;
|
|
rating: number;
|
|
deliveryTime: string;
|
|
tag: string;
|
|
discountText?: string;
|
|
serviceType: string;
|
|
}
|
|
|
|
export interface CatalogItem {
|
|
id: string;
|
|
imageUrl: string;
|
|
title: string;
|
|
description: string;
|
|
price: number;
|
|
category: string;
|
|
}
|
|
|
|
export interface CartItem {
|
|
id: string;
|
|
providerId: string;
|
|
providerName: string;
|
|
item: CatalogItem;
|
|
quantity: number;
|
|
}
|
|
|
|
export type OrderStatus =
|
|
| 'placed'
|
|
| 'confirmed'
|
|
| 'dispatched'
|
|
| 'delivered'
|
|
| 'cancelled';
|
|
|
|
export interface Order {
|
|
id: string;
|
|
providerId: string;
|
|
providerName: string;
|
|
providerImage: string;
|
|
items: CartItem[];
|
|
status: OrderStatus;
|
|
total: number;
|
|
deliveryFee: number;
|
|
platformFee: number;
|
|
discount: number;
|
|
couponCode?: string;
|
|
createdAt: string;
|
|
estimatedDelivery: string;
|
|
deliveryAddress: Location;
|
|
}
|
|
|
|
export interface TrackingStep {
|
|
key: OrderStatus;
|
|
label: string;
|
|
timestamp?: string;
|
|
isCompleted: boolean;
|
|
isActive: boolean;
|
|
}
|
|
|
|
export interface DeliveryAgent {
|
|
name: string;
|
|
rating: number;
|
|
vehicleDetails: string;
|
|
phoneNumber: string;
|
|
}
|
|
|
|
export interface PaymentMethod {
|
|
id: string;
|
|
type: 'UPI' | 'Card' | 'Wallet' | 'COD';
|
|
label: string;
|
|
icon?: string;
|
|
}
|
|
|
|
export * from './auth';
|