From ac366d04cd54869c9a2b090aae24a276c32a85a6 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Sat, 14 Feb 2026 01:35:54 +0100 Subject: feat: Implemen experimental bus stop usage display --- src/frontend/app/api/schema.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/frontend/app/api/schema.ts') 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; @@ -77,6 +84,7 @@ export type DelayBadge = z.infer; export type ShiftBadge = z.infer; export type Position = z.infer; export type Arrival = z.infer; +export type BusStopUsagePoint = z.infer; export type StopArrivalsResponse = z.infer; // Transit Routes -- cgit v1.3