Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

types: incoming_leg_transport_mode on assignment schema + rows

Ida Rogalskabb6b94686855
diff --git a/server/src/types.ts b/server/src/types.ts
index f24f2dea7..1f0f601ce 100644
--- a/server/src/types.ts
+++ b/server/src/types.ts
@@ -111,6 +111,7 @@ export interface DayAssignment {
assignment_time?: string | null;
assignment_end_time?: string | null;
leg_transport_mode?: string | null;
+ incoming_leg_transport_mode?: string | null;
created_at?: string;
}
diff --git a/shared/src/assignment/assignment.schema.ts b/shared/src/assignment/assignment.schema.ts
index abf6bdf02..0a70fe069 100644
--- a/shared/src/assignment/assignment.schema.ts
+++ b/shared/src/assignment/assignment.schema.ts
@@ -43,6 +43,10 @@ export const assignmentSchema = z.object({
// Per-segment travel mode (#1281): the transport mode of the leg LEAVING this
// stop for the next one. null = inherit the day's default_transport_mode.
leg_transport_mode: z.string().nullable().optional(),
+ // Per-segment travel mode of the leg ENTERING this stop when its origin is
+ // not a place (booking arrival / morning hotel). null = inherit the day default.
+ // Inert when the previous timeline element is a place.
+ incoming_leg_transport_mode: z.string().nullable().optional(),
participants: z.array(assignmentParticipantSchema).optional(),
created_at: z.string().optional(),
place: assignmentPlaceSchema,