Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 7b176a7

Browse files
Haroenvshortcuts
andauthored
feat(ts): document renderingContent (#823)
* feat(ts): document renderingContent Note: while the format will not change, it's not yet live * Apply suggestions from code review Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 52939cd commit 7b176a7

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

index.d.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,45 @@ declare namespace algoliasearchHelper {
12341234
*/
12351235
userData: any[];
12361236

1237+
/**
1238+
* Content defining how the search interface should be rendered.
1239+
* This is set via the settings for a default value and can be overridden via rules
1240+
*/
1241+
renderingContent?: {
1242+
/**
1243+
* defining how facets should be ordered
1244+
*/
1245+
facetOrdering?: {
1246+
/**
1247+
* the ordering of facets (widgets)
1248+
*/
1249+
facet?: {
1250+
/**
1251+
* Ordered facet lists
1252+
*/
1253+
order: string[];
1254+
};
1255+
/**
1256+
* the ordering of facet values, within an individual list
1257+
*/
1258+
values?: {
1259+
[facet: string]: {
1260+
/**
1261+
* Ordered facet values
1262+
*/
1263+
order: string[];
1264+
/**
1265+
* How to display the remaining items.
1266+
* - facet count (descending)
1267+
* - alphabetical (ascending)
1268+
* - hidden (show only pinned values)
1269+
*/
1270+
sortRemainingBy: 'count' | 'alpha' | 'hidden';
1271+
};
1272+
};
1273+
};
1274+
};
1275+
12371276
/**
12381277
* queryID is the unique identifier of the query used to generate the current search results.
12391278
* This value is only available if the `clickAnalytics` search parameter is set to `true`.

0 commit comments

Comments
 (0)