The result preview action creators.

interface ResultPreviewActionCreators {
    fetchResultContent(
        opts: HtmlRequestOptions,
    ): AsyncThunkAction<
        FetchResultContentThunkReturn,
        HtmlRequestOptions,
        AsyncThunkGlobalOptions<StateNeededByHtmlEndpoint>,
    >;
    nextPreview(): { payload: void; type: string };
    preparePreviewPagination(
        payload: PreparePreviewPaginationActionPayload,
    ): { payload: PreparePreviewPaginationActionPayload; type: string };
    previousPreview(): { payload: void; type: string };
    updateContentURL(
        opts: UpdateContentURLOptions,
    ): AsyncThunkAction<
        UpdateContentURLThunkReturn,
        UpdateContentURLOptions,
        AsyncThunkGlobalOptions<StateNeededByHtmlEndpoint>,
    >;
}

Methods

  • Fetch the content of a preview

    Parameters

    • opts: HtmlRequestOptions

    Returns AsyncThunkAction<
        FetchResultContentThunkReturn,
        HtmlRequestOptions,
        AsyncThunkGlobalOptions<StateNeededByHtmlEndpoint>,
    >

    A dispatchable action.

  • Update the position of the current result preview for pagination purposes.

    Returns { payload: void; type: string }

    A dispatchable action.

  • Parameters

    • payload: PreparePreviewPaginationActionPayload

    Returns { payload: PreparePreviewPaginationActionPayload; type: string }

  • Update the position of the current result preview for pagination purposes.

    Returns { payload: void; type: string }

    A dispatchable action.

  • Compute and update the content URL for the result preview

    Parameters

    • opts: UpdateContentURLOptions

    Returns AsyncThunkAction<
        UpdateContentURLThunkReturn,
        UpdateContentURLOptions,
        AsyncThunkGlobalOptions<StateNeededByHtmlEndpoint>,
    >

    A dispatchable action.