mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 23:28:11 +00:00
Merge branch 'alpha' of https://github.com/Tria-plc/edr-platform into alpha
This commit is contained in:
@@ -265,6 +265,56 @@ export interface IConsignment extends BaseEntity {
|
||||
destinationStation: string;
|
||||
}
|
||||
|
||||
/** One station along the train's corridor (origin → milestones → destination). */
|
||||
export interface ITrackingStation {
|
||||
sequenceNo: number;
|
||||
yardId: string;
|
||||
label: string;
|
||||
code: string;
|
||||
}
|
||||
|
||||
/** A logged checkpoint as the train passes a station. */
|
||||
export interface ITrackingCheckpoint {
|
||||
id: string;
|
||||
sequenceNo: number;
|
||||
yardId: string;
|
||||
label: string | null;
|
||||
kind: TrainCheckpointKind;
|
||||
occurredAt: string;
|
||||
note: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customer-facing shipment tracking payload for a single booking, derived from
|
||||
* the train schedule the booking is assigned to and the live checkpoint log.
|
||||
*
|
||||
* `hasSchedule` is false when the booking has not been assigned to a train yet
|
||||
* (still pre-dispatch) — the UI shows a "not on the rails yet" state.
|
||||
*/
|
||||
export interface IBookingTracking {
|
||||
bookingId: string;
|
||||
bookingReference: string;
|
||||
hasSchedule: boolean;
|
||||
scheduleId: string | null;
|
||||
trainNumber: string | null;
|
||||
/** Operational status of the assigned schedule (DRAFT/SCHEDULED/DISPATCHED/ARRIVED). */
|
||||
scheduleStatus: TrainScheduleStatus | null;
|
||||
direction: string | null;
|
||||
origin: string | null;
|
||||
destination: string | null;
|
||||
/** Ordered stations forming the corridor. */
|
||||
stations: ITrackingStation[];
|
||||
/** Logged checkpoints, ordered by sequence then time. */
|
||||
checkpoints: ITrackingCheckpoint[];
|
||||
/** Highest reached station sequence (−1 = not departed). */
|
||||
currentSequenceNo: number;
|
||||
actualDepartureAt: string | null;
|
||||
actualArrivalAt: string | null;
|
||||
/** Planned departure/arrival from the schedule, used as ETA hints. */
|
||||
scheduledDepartureAt: string | null;
|
||||
scheduledArrivalAt: string | null;
|
||||
}
|
||||
|
||||
export interface IYard extends BaseEntity {
|
||||
code: string;
|
||||
label: string;
|
||||
@@ -447,6 +497,20 @@ export interface BookableSchedulesQuery {
|
||||
destinationYardId?: string;
|
||||
}
|
||||
|
||||
export interface AvailableDaysQuery {
|
||||
originYardId?: string;
|
||||
destinationYardId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Day-level booking pool: the EAT calendar days that have at least one OPEN
|
||||
* departure on a route. `days` are `yyyy-MM-dd` strings, e.g. `["2026-06-20"]`.
|
||||
* No capacity is exposed — customers pick a day, not a train.
|
||||
*/
|
||||
export interface AvailableDaysResponse {
|
||||
days: string[];
|
||||
}
|
||||
|
||||
export interface BookableScheduleLocomotive {
|
||||
id: string;
|
||||
code: string;
|
||||
|
||||
Reference in New Issue
Block a user