import { Mode } from "./Leg"; import { CallingPoint, OperatorID, ServiceID, TimetableLeg } from "./TimetableLeg"; import { Stop } from "./Journey"; /** * A service that runs from an origin to a destination. This is a direct representation of a GTFS trip. */ export declare class Trip { readonly id: ServiceID; readonly name: string; readonly operator: OperatorID; readonly mode: Mode; readonly callingPoints: CallingPoint[]; readonly calendar: CalendarDate; readonly firstClassAvailable: boolean; readonly reservationPossible: boolean; constructor(id: ServiceID, name: string, operator: OperatorID, mode: Mode, callingPoints: CallingPoint[], calendar: CalendarDate, firstClassAvailable: boolean, reservationPossible: boolean); /** * Departure point of the service */ readonly origin: CallingPoint; /** * Destination of the service */ readonly destination: CallingPoint; /** * Extract a subsection of the trip as a Leg */ toLeg(origin: Stop, destination: Stop): TimetableLeg; private getCallingPoints; } /** * Calendar dates that a Trip will run on */ export declare class CalendarDate { private readonly from; private readonly to; private readonly exclude; private readonly days; constructor(from: DaysSinceEpoch, to: DaysSinceEpoch, exclude: DaysSinceEpoch[], days: { [day: number]: boolean; }); /** * Returns true if the given date is between the from and to date, not exclude and the day of week (dow) matches. */ runsOn(date: DaysSinceEpoch, dow: number): boolean; } /** * Number of days since the epoch */ export declare type DaysSinceEpoch = number;