mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-31 18:28:55 +00:00
ADD - define garage frontend contracts
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
export type GarageVehicleStatus = 'garaged' | 'out' | 'impounded'
|
||||
export type GarageVehicleKind = 'car' | 'bike' | 'boat' | 'plane' | 'helicopter'
|
||||
export type GarageValetStatus =
|
||||
| 'ordering'
|
||||
| 'preparing'
|
||||
| 'en_route'
|
||||
| 'arriving'
|
||||
| 'delivered'
|
||||
| 'cancelled'
|
||||
| 'failed'
|
||||
|
||||
export type GarageVehicle = {
|
||||
body: number | null
|
||||
engine: number | null
|
||||
fuel: number | null
|
||||
id: string
|
||||
kind: GarageVehicleKind
|
||||
location: string
|
||||
model: number | string | null
|
||||
name?: string
|
||||
nickname: string
|
||||
plate: string
|
||||
status: GarageVehicleStatus
|
||||
vin: string
|
||||
}
|
||||
|
||||
export type GarageValetConfig = {
|
||||
account: string
|
||||
enabled: boolean
|
||||
price: number
|
||||
vehicleTypes: Record<GarageVehicleKind, boolean>
|
||||
}
|
||||
|
||||
export type GarageValetState = {
|
||||
canCancel: boolean
|
||||
cost: number
|
||||
distance: number | null
|
||||
etaSeconds: number | null
|
||||
orderId: string
|
||||
plate: string
|
||||
status: GarageValetStatus
|
||||
vehicleName: string
|
||||
}
|
||||
|
||||
export type GarageOverview = {
|
||||
system: string
|
||||
valet: GarageValetConfig
|
||||
vehicles: GarageVehicle[]
|
||||
}
|
||||
Reference in New Issue
Block a user