interface ItineraryRecommendationsService {
    countDocuments(
        query?: FilterQuery<BaseItineraryRecommendation>,
    ): Promise<number>;
    create(
        itineraryRecommendation: CreateItineraryRecommendationInput,
    ): Promise<SavedItineraryRecommendation>;
    findById(
        id: string,
        listQueryOptions?: ListQueryOptions<SavedItineraryRecommendation>,
    ): Promise<null | SavedItineraryRecommendation>;
    findOne(
        query: Query<BaseItineraryRecommendation>,
        fields?: SelectQuery<BaseItineraryRecommendation>[],
    ): Promise<null | SavedItineraryRecommendation>;
    getHostRecommendations(
        hostUserId?: string,
        months?: (
            | "January"
            | "February"
            | "March"
            | "April"
            | "May"
            | "June"
            | "July"
            | "August"
            | "September"
            | "October"
            | "November"
            | "December"
        )[],
        limit?: number,
    ): Promise<null | SavedItineraryRecommendation>;
    list(
        query?: FilterQuery<BaseItineraryRecommendation>,
        listQueryOptions?: ListQueryOptions<BaseItineraryRecommendation>,
    ): Promise<SavedItineraryRecommendation[]>;
    listAutomaticRecommendations(
        input?: AutomaticRecommendationsInput,
    ): Promise<AutomaticRecommendationsOutput[]>;
    listByRecommendedTo(
        recommendedToId: string,
        listQueryOptions?: ListQueryOptions<BaseItineraryRecommendation>,
    ): Promise<SavedItineraryRecommendation[]>;
    listRecommendationsForSorting(
        input?: RecommendationsForSortingInput,
    ): Promise<RecommendationsForSortingOutput[]>;
    listTopAutomaticRecommendations(
        input?: AutomaticRecommendationsInput,
    ): Promise<AutomaticRecommendationsOutput[]>;
    update(
        id: string,
        entity: CreateItineraryRecommendationInput,
    ): Promise<null | SavedItineraryRecommendation>;
}

Methods

  • Get itinerary recommendations based on the provided query and options.

    Parameters

    • OptionalhostUserId: string

      The ID of the host user.

    • Optionalmonths: (
          | "January"
          | "February"
          | "March"
          | "April"
          | "May"
          | "June"
          | "July"
          | "August"
          | "September"
          | "October"
          | "November"
          | "December"
      )[]

      The months to filter recommendations.

    • Optionallimit: number

      The maximum number of recommendations to return.

    Returns Promise<null | SavedItineraryRecommendation>

    A promise that resolves to the saved itinerary recommendation.