Skip to content

Commit

Permalink
fix(types): update UiState type (#3777)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour authored May 14, 2019
1 parent 1e6be79 commit 36e3a3d
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/types/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ interface DisposeOptions {

export type UiState = {
query?: string;
refinementList?: {
[attribute: string]: string[];
};
menu?: {
[attribute: string]: string;
};
Expand All @@ -44,13 +47,17 @@ export type UiState = {
hierarchicalMenu?: {
[attribute: string]: string[];
};
refinementList?: {
[attribute: string]: string[];
};
numericRefinementList?: {
[attribute: string]: number;
/**
* The numeric menu as a tuple.
*
* @example ':5'
* @example '5:10'
* @example '10:'
*/
numericMenu?: {
[attribute: string]: string;
};
numericSelector?: {
ratingMenu?: {
[attribute: string]: number;
};
/**
Expand All @@ -61,12 +68,18 @@ export type UiState = {
range?: {
[attribute: string]: string;
};
starRating?: {
[attribute: string]: number;
};
toggle?: {
[attribute: string]: boolean;
};
geoSearch?: {
/**
* The rectangular area in geo coordinates.
* The rectangle is defined by two diagonally opposite points, hence by 4 floats separated by commas.
*
* @example '47.3165,4.9665,47.3424,5.0201'
*/
boundingBox: string;
};
sortBy?: string;
page?: number;
hitsPerPage?: number;
Expand Down

0 comments on commit 36e3a3d

Please sign in to comment.