@constructor-io/constructorio-client-javascript 2.34.3 → 2.34.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/types/browse.d.ts +2 -1
- package/lib/types/index.d.ts +28 -0
- package/lib/types/search.d.ts +2 -0
- package/package.json +1 -1
package/lib/types/browse.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ConstructorClientOptions,
|
|
4
4
|
Facet,
|
|
5
5
|
Feature,
|
|
6
|
+
FilterExpression,
|
|
6
7
|
Group,
|
|
7
8
|
NetworkParameters,
|
|
8
9
|
RequestFeature,
|
|
@@ -23,7 +24,7 @@ export interface IBrowseParameters {
|
|
|
23
24
|
sortOrder?: string;
|
|
24
25
|
section?: string;
|
|
25
26
|
fmtOptions?: Record<string, any>;
|
|
26
|
-
preFilterExpression:
|
|
27
|
+
preFilterExpression: FilterExpression;
|
|
27
28
|
hiddenFields?: string[];
|
|
28
29
|
hiddenFacets?: string[];
|
|
29
30
|
variationsMap?: Record<string, any>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -152,3 +152,31 @@ export interface BaseGroup extends Record<string, any> {
|
|
|
152
152
|
export interface FmtOptions extends Record<string, any> {}
|
|
153
153
|
|
|
154
154
|
export type Nullable<T> = T | null;
|
|
155
|
+
|
|
156
|
+
export type FilterExpression =
|
|
157
|
+
| FilterExpressionGroup
|
|
158
|
+
| FilterExpressionNot
|
|
159
|
+
| FilterExpressionValue
|
|
160
|
+
| FilterExpressionRange;
|
|
161
|
+
|
|
162
|
+
export type FilterExpressionGroup =
|
|
163
|
+
| FilterExpressionGroupOr
|
|
164
|
+
| FilterExpressionGroupAnd;
|
|
165
|
+
|
|
166
|
+
export type FilterExpressionGroupOr = { or: FilterExpression[] };
|
|
167
|
+
export type FilterExpressionGroupAnd = { and: FilterExpression[] };
|
|
168
|
+
export type FilterExpressionCondition = 'or' | 'and';
|
|
169
|
+
|
|
170
|
+
export type FilterExpressionNot = { not: FilterExpression };
|
|
171
|
+
|
|
172
|
+
export type FilterExpressionValue = {
|
|
173
|
+
name: string;
|
|
174
|
+
value: string;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export type FilterExpressionRange = {
|
|
178
|
+
name: string;
|
|
179
|
+
range: FilterExpressionRangeValue;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export type FilterExpressionRangeValue = ['-inf' | number, 'inf' | number];
|
package/lib/types/search.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
ConstructorClientOptions,
|
|
3
3
|
Facet,
|
|
4
4
|
Feature,
|
|
5
|
+
FilterExpression,
|
|
5
6
|
FmtOption,
|
|
6
7
|
Group,
|
|
7
8
|
NetworkParameters,
|
|
@@ -23,6 +24,7 @@ export interface SearchParameters {
|
|
|
23
24
|
sortOrder?: string;
|
|
24
25
|
section?: string;
|
|
25
26
|
fmtOptions?: Record<string, any>;
|
|
27
|
+
preFilterExpression: FilterExpression;
|
|
26
28
|
hiddenFields?: string[];
|
|
27
29
|
hiddenFacets?: string[];
|
|
28
30
|
variationsMap?: Record<string, any>;
|