interface Journey {
    _id?: string;
    approxDurationAndDistance: {
        distance: number;
        distanceUnit: string;
        durationInSeconds: number;
    };
    cancellationDetails: {
        cancellable: boolean;
        freeCancellationUntil: string;
        freeCancellationWindowHours: number;
    };
    code: string;
    destination: JourneyLocation;
    driver?: JourneyDriver;
    externalId: number;
    meetingPoint?: {
        description: string;
        files: [{ fileType: FileType; id: number; url: string }];
        id: number;
        lat: number;
        lng: number;
        name: string;
        type: MeetingPointType;
    };
    origin: JourneyLocation;
    pickup: { localTime: string; timeZone: string };
    priceSummary: JourneyPriceSummary;
    status: JourneyStatus;
    transferCompany?: { externalId: number; name: string; phoneNumber: string };
    traveler: models.groundTransfers.Traveler;
    travelerAppUrl: string;
    type: JourneyType;
    vehicleCategory: string;
}

Properties

_id?: string
approxDurationAndDistance: {
    distance: number;
    distanceUnit: string;
    durationInSeconds: number;
}
cancellationDetails: {
    cancellable: boolean;
    freeCancellationUntil: string;
    freeCancellationWindowHours: number;
}

Type declaration

  • cancellable: boolean
  • freeCancellationUntil: string

    UTC date/time in ISO 8601 format with no offset.

    "2023-04-19T09:00:00"
    
  • freeCancellationWindowHours: number
code: string
destination: JourneyLocation
driver?: JourneyDriver
externalId: number
meetingPoint?: {
    description: string;
    files: [{ fileType: FileType; id: number; url: string }];
    id: number;
    lat: number;
    lng: number;
    name: string;
    type: MeetingPointType;
}
pickup: { localTime: string; timeZone: string }

Type declaration

  • localTime: string

    ISO 8601 format with no offset. (Use the timeZone property and createDateForTimeZone from trova-common to convert to a Date.)

    "2023-04-20T11:00:00"
    
    // Convert it to a Date object by using the timeZone property.
    const pickupDate = createDateForTimeZone(pickup.timeZone, pickup.localTime);
  • timeZone: string

    IANA time zone name.

    "Europe/Amsterdam"
    
priceSummary: JourneyPriceSummary
transferCompany?: { externalId: number; name: string; phoneNumber: string }
travelerAppUrl: string
vehicleCategory: string