File tree Expand file tree Collapse file tree 3 files changed +51
-4
lines changed
packages/client-search/src/types Expand file tree Collapse file tree 3 files changed +51
-4
lines changed Original file line number Diff line number Diff line change 1- import { SearchOptions } from '.' ;
1+ import { SearchOptions , Settings } from '.' ;
22
33export type Rule = {
44 /**
@@ -125,6 +125,12 @@ export type ConsequenceParams = {
125125 * Behaves like optionalFilters.
126126 */
127127 readonly automaticOptionalFacetFilters ?: readonly AutomaticFacetFilter [ ] ;
128+
129+ /**
130+ * Content defining how the search interface should be rendered.
131+ * A default value for this can be set via settings
132+ */
133+ readonly renderingContent ?: Settings [ 'renderingContent' ] ;
128134} ;
129135
130136export type Condition = {
@@ -186,12 +192,12 @@ export type Consequence = {
186192
187193export type TimeRange = {
188194 /**
189- * DateTime with UTC offset for Serialization/Deserialization in unix timespam .
195+ * DateTime with UTC offset for Serialization/Deserialization in unix timespan .
190196 */
191197 readonly from : number ;
192198
193199 /**
194- * DateTime with UTC offset for Serialization/Deserialization in unix timespam .
200+ * DateTime with UTC offset for Serialization/Deserialization in unix timespan .
195201 */
196202 readonly until : number ;
197203} ;
Original file line number Diff line number Diff line change 1- import { Hit } from '.' ;
1+ import { Hit , Settings } from '.' ;
22
33export type SearchResponse < TObject = { } > = {
44 /**
@@ -225,4 +225,6 @@ export type SearchResponse<TObject = {}> = {
225225 * The relevancy threshold applied to search in a virtual index.
226226 */
227227 appliedRelevancyStrictness ?: number ;
228+
229+ renderingContent ?: Settings [ 'renderingContent' ] ;
228230} ;
Original file line number Diff line number Diff line change @@ -304,4 +304,43 @@ export type Settings = {
304304 * less relevant results.
305305 */
306306 readonly relevancyStrictness ?: number ;
307+
308+ /**
309+ * Content defining how the search interface should be rendered.
310+ * This is set via the settings for a default value and can be overridden via rules
311+ */
312+ readonly renderingContent ?: {
313+ /**
314+ * defining how facets should be ordered
315+ */
316+ readonly facetOrdering ?: {
317+ /**
318+ * the ordering of facets (widgets)
319+ */
320+ readonly facet ?: {
321+ /**
322+ * pinned order of facet lists
323+ */
324+ readonly order : readonly string [ ] ;
325+ } ;
326+ /**
327+ * the ordering of facet values, within an individual list
328+ */
329+ readonly values ?: {
330+ readonly [ facet : string ] : {
331+ /**
332+ * pinned order of facet values
333+ */
334+ readonly order : readonly string [ ] ;
335+ /**
336+ * How to display the remaining items.
337+ * - facet count (descending)
338+ * - alphabetical (ascending)
339+ * - hidden (show only pinned values)
340+ */
341+ readonly sortRemainingBy : 'count' | 'alpha' | 'hidden' ;
342+ } ;
343+ } ;
344+ } ;
345+ } ;
307346} ;
You can’t perform that action at this time.
0 commit comments