The recommendations action creators.

interface RecommendationsActionCreator {
    fetchMoreRecommendations(
        payload: FetchRecommendationsPayload,
    ): AsyncThunkAction<
        null
        | QueryRecommendationsCommerceAPIThunkReturn,
        FetchRecommendationsPayload,
        AsyncThunkCommerceOptions<StateNeededByFetchRecommendations>,
    >;
    fetchRecommendations(
        payload: FetchRecommendationsPayload,
    ): AsyncThunkAction<
        QueryRecommendationsCommerceAPIThunkReturn,
        FetchRecommendationsPayload,
        AsyncThunkCommerceOptions<StateNeededByFetchRecommendations>,
    >;
    promoteChildToParent(
        payload: PromoteChildToParentPayload,
    ): { payload: PromoteChildToParentPayload; type: string };
    registerRecommendationsSlot(
        payload: SlotIdPayload,
    ): { payload: SlotIdPayload; type: string };
}

Methods

  • Fetches an additional page of recommendations and appends it to the current list.

    Parameters

    Returns AsyncThunkAction<
        null
        | QueryRecommendationsCommerceAPIThunkReturn,
        FetchRecommendationsPayload,
        AsyncThunkCommerceOptions<StateNeededByFetchRecommendations>,
    >

    A dispatchable action.

  • Fetches recommendations.

    Parameters

    Returns AsyncThunkAction<
        QueryRecommendationsCommerceAPIThunkReturn,
        FetchRecommendationsPayload,
        AsyncThunkCommerceOptions<StateNeededByFetchRecommendations>,
    >

    A dispatchable action.

  • Promotes a child product to a parent product.

    Parameters

    • payload: PromoteChildToParentPayload

      The action creator payload.

    Returns { payload: PromoteChildToParentPayload; type: string }

    A dispatchable action.

  • Registers a recommendations slot.

    Parameters

    • payload: SlotIdPayload

      The action creator payload.

    Returns { payload: SlotIdPayload; type: string }

    A dispatchable action.