UNPKG

@golemio/pid

Version:
36 lines (35 loc) 1.37 kB
import { IPublicDepartureTransformInputDto } from "../../domain/IPublicDepartureTransformInputDto"; import { IPublicApiDeparture, IPublicApiDepartureVehicle } from "../../domain/PublicApiDepartureInterfaces"; import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation"; export declare class PublicDepartureTransformation extends AbstractTransformation<IPublicDepartureTransformInputDto, IPublicApiDeparture> { name: string; protected transformInternal: (inputDto: IPublicDepartureTransformInputDto) => { departure: { timestamp_scheduled: string; timestamp_predicted: string; delay_seconds: number | null; minutes: number; }; stop: { id: string; sequence: number; platform_code: string | null; }; route: { type: string; short_name: string; }; trip: { id: string; headsign: string; is_canceled: boolean; }; vehicle: IPublicApiDepartureVehicle; }; /** * Determine platform code based on the following rules: * if current stop time is known, use its RT CIS platform code (if available) * otherwise use GTFS schedule platform code */ private determinePlatformCode; }