interface TripsService {
    addTimelineEvent(
        trip: string | SavedTrip,
        event: TripTimelineEvent,
    ): Promise<SavedTrip>;
    cancelTrip(
        tripId: string,
        internalCancellationReason: TripInternalCancellationReason,
    ): Promise<SavedTrip>;
    create(entity: BaseTrip): Promise<SavedTrip>;
    createTripPageScreenshotURL(
        tripId: string,
        options?: ScreenshotOptions,
    ): Promise<undefined | string>;
    findById(
        id: string,
        listQueryOptions?: ListQueryOptions<models.trips.Trip>,
    ): Promise<null | SavedTrip>;
    findByRezdyTripId(rezdyTripId: string): Promise<null | SavedTrip>;
    findWithServicesById(
        tripId: string,
    ): Promise<null | TripWithPopulatedServices>;
    findWithServicesByRezdyId(rezdyTripId: string): Promise<null | SavedTrip>;
    flagTripForBookedTravelerRestoration(
        tripId: string,
        flag: boolean,
    ): Promise<void>;
    getAvailableSpotsForTrips(
        trips: SavedTrip[],
    ): Promise<Record<string, number>>;
    getBookedEmailList(tripId: string): Promise<BaseListUser[]>;
    getHostTrips(
        hostId: string,
        query?: FilterQuery<HostTripResponse>,
    ): Promise<HostTripResponse[]>;
    getInventory(tripId: string): Promise<Inventory>;
    getTripsForGuide(
        tripFilterQuery?: FilterQuery<
            Required<Omit<BaseBooking, bookingFieldToOmit>>,
        >,
        sortOptions?: SortOptions<models.trips.Trip>,
    ): Promise<SavedTrip[]>;
    getTripsForHost(
        tripFilterQuery?: FilterQuery<
            Required<Omit<BaseBooking, bookingFieldToOmit>>,
        >,
        sortOptions?: SortOptions<models.trips.Trip>,
    ): Promise<SavedTrip[]>;
    getTripsForTraveler(
        travelerFilterQuery?: FilterQuery<models.travelers.Traveler>,
        bookingFilterQuery?: FilterQuery<
            Required<Omit<BaseBooking, bookingFieldToOmit>>,
        >,
        tripFilterQuery?: FilterQuery<
            Required<Omit<BaseBooking, bookingFieldToOmit>>,
        >,
        sortOptions?: SortOptions<models.trips.Trip>,
    ): Promise<SavedTrip[]>;
    getTripsForTravelerEmailRestoration(): Promise<SavedTrip[]>;
    getUsdTripWithServices(tripId: string): Promise<TripWithPopulatedServices>;
    list(
        query?: FilterQuery<models.trips.Trip>,
        fields?: SelectQuery<models.trips.Trip>[],
        listQueryOptions?: ListQueryOptions<models.trips.Trip>,
    ): Promise<SavedTrip[]>;
    listCacheableTripDetails(
        query?: FilterQuery<SavedTrip>,
        fields?: SelectQuery<SavedTrip>[],
        listQueryOptions?: ListQueryOptions<SavedTrip>,
    ): Promise<CacheableTripDetails[]>;
    listTripsToLaunch(launchWindowMinutes: number): Promise<SavedTrip[]>;
    populateTripHostSelectedServices(trip: SavedTrip): Promise<PopulatedTrip>;
    update(id: string, entity: PartialTrip): Promise<SavedTrip>;
    updateSingleSupplementInventory(
        tripId: string,
        total: number,
    ): Promise<SavedTrip>;
}

Methods

  • Create a URL that points to a screenshot of the specified trip.

    Parameters

    • tripId: string

      The id of the trip to screenshot.

    • Optionaloptions: ScreenshotOptions

      Options for the screenshot.

    Returns Promise<undefined | string>

  • Flag the trip to be picked up by the restore booked travelers to marketing list job.

    Parameters

    • tripId: string

      The id of the trip to flag.

    • flag: boolean

      The flag value.

    Returns Promise<void>