diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-02-14 01:35:54 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-02-14 01:36:09 +0100 |
| commit | ac366d04cd54869c9a2b090aae24a276c32a85a6 (patch) | |
| tree | 64a5c5903b07646a5c58b1b7e4c9704022549245 /src/frontend/app/api | |
| parent | 3f8fb6fda07f97c9fd676cff67c637c0df0f7029 (diff) | |
feat: Implemen experimental bus stop usage display
Diffstat (limited to 'src/frontend/app/api')
| -rw-r--r-- | src/frontend/app/api/schema.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/frontend/app/api/schema.ts b/src/frontend/app/api/schema.ts index d9aec89..c0c97a4 100644 --- a/src/frontend/app/api/schema.ts +++ b/src/frontend/app/api/schema.ts @@ -36,8 +36,14 @@ export const ShiftBadgeSchema = z.object({ export const PositionSchema = z.object({ latitude: z.number(), longitude: z.number(), - orientationDegrees: z.number(), - shapeIndex: z.number(), + orientationDegrees: z.number().optional().nullable(), + shapeIndex: z.number().optional().nullable(), +}); + +export const BusStopUsagePointSchema = z.object({ + h: z.number().int(), + t: z.number().int(), + d: z.number().int(), }); export const VehicleInformationSchema = z.object({ @@ -67,6 +73,7 @@ export const StopArrivalsResponseSchema = z.object({ stopLocation: PositionSchema.optional().nullable(), routes: z.array(RouteInfoSchema), arrivals: z.array(ArrivalSchema), + usage: z.array(BusStopUsagePointSchema).optional().nullable(), }); export type RouteInfo = z.infer<typeof RouteInfoSchema>; @@ -77,6 +84,7 @@ export type DelayBadge = z.infer<typeof DelayBadgeSchema>; export type ShiftBadge = z.infer<typeof ShiftBadgeSchema>; export type Position = z.infer<typeof PositionSchema>; export type Arrival = z.infer<typeof ArrivalSchema>; +export type BusStopUsagePoint = z.infer<typeof BusStopUsagePointSchema>; export type StopArrivalsResponse = z.infer<typeof StopArrivalsResponseSchema>; // Transit Routes |
