From 4a866f5352a51916ddb9849b2d68213856196c9c Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Tue, 23 Dec 2025 21:33:17 +0100 Subject: Full real-time page, coruña real time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/app/api/schema.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (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 bb1e96c..9cc5bd4 100644 --- a/src/frontend/app/api/schema.ts +++ b/src/frontend/app/api/schema.ts @@ -33,17 +33,30 @@ export const ShiftBadgeSchema = z.object({ shiftTrip: z.string(), }); +export const PositionSchema = z.object({ + latitude: z.number(), + longitude: z.number(), + orientationDegrees: z.number(), + shapeIndex: z.number(), +}); + export const ArrivalSchema = z.object({ + tripId: z.string(), route: RouteInfoSchema, headsign: HeadsignInfoSchema, estimate: ArrivalDetailsSchema, delay: DelayBadgeSchema.optional().nullable(), shift: ShiftBadgeSchema.optional().nullable(), + shape: z.any().optional().nullable(), + currentPosition: PositionSchema.optional().nullable(), + stopShapeIndex: z.number().optional().nullable(), }); export const StopArrivalsResponseSchema = z.object({ stopCode: z.string(), stopName: z.string(), + stopLocation: PositionSchema.optional().nullable(), + routes: z.array(RouteInfoSchema), arrivals: z.array(ArrivalSchema), }); @@ -53,6 +66,7 @@ export type ArrivalPrecision = z.infer; export type ArrivalDetails = z.infer; export type DelayBadge = z.infer; export type ShiftBadge = z.infer; +export type Position = z.infer; export type Arrival = z.infer; export type StopArrivalsResponse = z.infer; -- cgit v1.3