@coveo/headless
    Preparing search index...

    Interface ResultPreviewActionCreators

    The result preview action creators.

    See Dispatch actions.

    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>,
        >;
    }
    Index

    Methods

    • Fetch the content of a preview

      Parameters

      • opts: HtmlRequestOptions

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

      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.