api: PUT /assignments/:id/transport gains direction (outgoing|incoming)

This commit is contained in:
Ida Rogalska
2026-08-11 19:06:02 +02:00
committed by Maurice
parent edb21b681f
commit cedbe39b35
4 changed files with 87 additions and 1 deletions
@@ -83,6 +83,9 @@ export const assignmentTransportRequestSchema = z.object({
// The legacy route read `body.transport_mode ?? null`, so an absent key
// behaves like an explicit null — keep it optional on the wire.
transport_mode: z.string().nullable().optional(),
// Which leg this write targets: the one leaving this stop (default, and the
// legacy behaviour) or the one arriving at it (#1281 boundary legs).
direction: z.enum(['outgoing', 'incoming']).default('outgoing'),
});
export type AssignmentTransportRequest = z.infer<typeof assignmentTransportRequestSchema>;