Skip to content

Commit 36e3a3d

Browse files
fix(types): update UiState type (#3777)
1 parent 1e6be79 commit 36e3a3d

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

src/types/widget.ts

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ interface DisposeOptions {
3232

3333
export type UiState = {
3434
query?: string;
35+
refinementList?: {
36+
[attribute: string]: string[];
37+
};
3538
menu?: {
3639
[attribute: string]: string;
3740
};
@@ -44,13 +47,17 @@ export type UiState = {
4447
hierarchicalMenu?: {
4548
[attribute: string]: string[];
4649
};
47-
refinementList?: {
48-
[attribute: string]: string[];
49-
};
50-
numericRefinementList?: {
51-
[attribute: string]: number;
50+
/**
51+
* The numeric menu as a tuple.
52+
*
53+
* @example ':5'
54+
* @example '5:10'
55+
* @example '10:'
56+
*/
57+
numericMenu?: {
58+
[attribute: string]: string;
5259
};
53-
numericSelector?: {
60+
ratingMenu?: {
5461
[attribute: string]: number;
5562
};
5663
/**
@@ -61,12 +68,18 @@ export type UiState = {
6168
range?: {
6269
[attribute: string]: string;
6370
};
64-
starRating?: {
65-
[attribute: string]: number;
66-
};
6771
toggle?: {
6872
[attribute: string]: boolean;
6973
};
74+
geoSearch?: {
75+
/**
76+
* The rectangular area in geo coordinates.
77+
* The rectangle is defined by two diagonally opposite points, hence by 4 floats separated by commas.
78+
*
79+
* @example '47.3165,4.9665,47.3424,5.0201'
80+
*/
81+
boundingBox: string;
82+
};
7083
sortBy?: string;
7184
page?: number;
7285
hitsPerPage?: number;

0 commit comments

Comments
 (0)