QuerySuggestActions (Commerce Engine)
QuerySuggestActions (Commerce Engine)
This is for:
DeveloperThe query suggest action creators.
See Dispatch Actions.
Loader Function
loadQuerySuggestActions
Loads the query suggest reducer and returns the available query suggest action creators.
Parameters
-
engine:
CommerceEngine
The headless engine.
Returns QuerySuggestActionCreators
: The query suggest action creators.
QuerySuggestActionCreators
clearQuerySuggest
Clears the query suggest entity.
Parameters
-
payload:
ClearQuerySuggestActionCreatorPayload
The action creator payload.
Returns PayloadAction<ClearQuerySuggestPayload>
: A dispatchable action.
fetchQuerySuggestions
Fetches a list of query suggestions for a specific query suggest entity according to the current headless state.
Parameters
-
payload:
FetchQuerySuggestionsActionCreatorPayload
The action creator payload.
Returns AsyncThunkAction<FetchQuerySuggestionsThunkReturn, FetchQuerySuggestionsPayload, AsyncThunkCommerceOptions<StateNeededByQuerySuggest>>
: A dispatchable action.
registerQuerySuggest
Registers a query suggest entity.
Parameters
-
payload:
RegisterQuerySuggestActionCreatorPayload
The action creator payload.
Returns PayloadAction<RegisterQuerySuggestPayload>
: A dispatchable action.
selectQuerySuggestion
Selects a query suggestion.
Parameters
-
payload:
SelectQuerySuggestionActionCreatorPayload
The action creator payload.
Returns PayloadAction<SelectQuerySuggestionPayload>
: A dispatchable action.