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 '.' ;
2
2
3
3
export type Rule = {
4
4
/**
@@ -125,6 +125,12 @@ export type ConsequenceParams = {
125
125
* Behaves like optionalFilters.
126
126
*/
127
127
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' ] ;
128
134
} ;
129
135
130
136
export type Condition = {
@@ -186,12 +192,12 @@ export type Consequence = {
186
192
187
193
export type TimeRange = {
188
194
/**
189
- * DateTime with UTC offset for Serialization/Deserialization in unix timespam .
195
+ * DateTime with UTC offset for Serialization/Deserialization in unix timespan .
190
196
*/
191
197
readonly from : number ;
192
198
193
199
/**
194
- * DateTime with UTC offset for Serialization/Deserialization in unix timespam .
200
+ * DateTime with UTC offset for Serialization/Deserialization in unix timespan .
195
201
*/
196
202
readonly until : number ;
197
203
} ;
Original file line number Diff line number Diff line change 1
- import { Hit } from '.' ;
1
+ import { Hit , Settings } from '.' ;
2
2
3
3
export type SearchResponse < TObject = { } > = {
4
4
/**
@@ -225,4 +225,6 @@ export type SearchResponse<TObject = {}> = {
225
225
* The relevancy threshold applied to search in a virtual index.
226
226
*/
227
227
appliedRelevancyStrictness ?: number ;
228
+
229
+ renderingContent ?: Settings [ 'renderingContent' ] ;
228
230
} ;
Original file line number Diff line number Diff line change @@ -304,4 +304,43 @@ export type Settings = {
304
304
* less relevant results.
305
305
*/
306
306
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
+ } ;
307
346
} ;
You can’t perform that action at this time.
0 commit comments