@wix/search 1.0.35 → 1.0.37
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/build/cjs/index.d.ts +3 -2
- package/build/cjs/index.js +4 -2
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.ts +3 -2
- package/build/es/index.js +3 -2
- package/build/es/index.js.map +1 -1
- package/package.json +6 -5
- package/type-bundles/context.bundle.d.ts +177 -94
- package/type-bundles/index.bundle.d.ts +177 -94
- package/type-bundles/meta.bundle.d.ts +75 -97
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
interface SiteDocument$1 {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Result ID.
|
|
4
4
|
* @readonly
|
|
5
5
|
*/
|
|
6
6
|
id?: string;
|
|
7
|
-
/** The
|
|
7
|
+
/** The document payload. */
|
|
8
8
|
data?: Record<string, any> | null;
|
|
9
9
|
}
|
|
10
10
|
interface SearchRequest$3 {
|
|
11
11
|
/** Search query and aggregation information. */
|
|
12
12
|
search: Search$1;
|
|
13
|
-
/** Document type
|
|
13
|
+
/** Document type to search in. */
|
|
14
14
|
documentType: DocumentType$1;
|
|
15
15
|
/** Language to search in. */
|
|
16
16
|
language?: string | null;
|
|
@@ -32,12 +32,9 @@ interface Search$1 extends SearchPagingMethodOneOf$1 {
|
|
|
32
32
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
33
33
|
*/
|
|
34
34
|
sort?: Sorting$1[];
|
|
35
|
-
/**
|
|
36
|
-
* A search method for grouping data into various categories (facets) and providing summaries for each category.
|
|
37
|
-
* For example, use aggregations to allow site visitors to narrow down their search results by selecting specific categories such as price ranges, brand names, and ratings.
|
|
38
|
-
*/
|
|
35
|
+
/** A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings. */
|
|
39
36
|
aggregations?: Aggregation$3[];
|
|
40
|
-
/**
|
|
37
|
+
/** Search information. */
|
|
41
38
|
search?: SearchDetails$1;
|
|
42
39
|
}
|
|
43
40
|
/** @oneof */
|
|
@@ -56,14 +53,11 @@ declare enum SortOrder$1 {
|
|
|
56
53
|
DESC = "DESC"
|
|
57
54
|
}
|
|
58
55
|
interface Aggregation$3 extends AggregationKindOneOf$1 {
|
|
59
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
56
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
60
57
|
value?: ValueAggregation$1;
|
|
61
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
58
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
62
59
|
scalar?: ScalarAggregation$1;
|
|
63
|
-
/**
|
|
64
|
-
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
65
|
-
* For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
|
|
66
|
-
*/
|
|
60
|
+
/** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */
|
|
67
61
|
nested?: NestedAggregation$1;
|
|
68
62
|
/** Aggregation name displayed in the return. */
|
|
69
63
|
name?: string | null;
|
|
@@ -74,23 +68,20 @@ interface Aggregation$3 extends AggregationKindOneOf$1 {
|
|
|
74
68
|
}
|
|
75
69
|
/** @oneof */
|
|
76
70
|
interface AggregationKindOneOf$1 {
|
|
77
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
71
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
78
72
|
value?: ValueAggregation$1;
|
|
79
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
73
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
80
74
|
scalar?: ScalarAggregation$1;
|
|
81
|
-
/**
|
|
82
|
-
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
83
|
-
* For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
|
|
84
|
-
*/
|
|
75
|
+
/** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */
|
|
85
76
|
nested?: NestedAggregation$1;
|
|
86
77
|
}
|
|
87
78
|
declare enum ScalarType$1 {
|
|
88
79
|
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
89
|
-
/** Minimum value */
|
|
80
|
+
/** Minimum value. */
|
|
90
81
|
MIN = "MIN",
|
|
91
|
-
/** Maximum value */
|
|
82
|
+
/** Maximum value. */
|
|
92
83
|
MAX = "MAX",
|
|
93
|
-
/** Sum of values */
|
|
84
|
+
/** Sum of values. */
|
|
94
85
|
SUM = "SUM"
|
|
95
86
|
}
|
|
96
87
|
declare enum NestedAggregationType$1 {
|
|
@@ -102,7 +93,7 @@ declare enum NestedAggregationType$1 {
|
|
|
102
93
|
}
|
|
103
94
|
interface ValueAggregation$1 {
|
|
104
95
|
/**
|
|
105
|
-
*
|
|
96
|
+
* Maximum number of aggregation results to return.
|
|
106
97
|
* Min: `1`
|
|
107
98
|
* Max: `250`
|
|
108
99
|
* Default: `10`
|
|
@@ -110,13 +101,13 @@ interface ValueAggregation$1 {
|
|
|
110
101
|
limit?: number | null;
|
|
111
102
|
}
|
|
112
103
|
interface ScalarAggregation$1 {
|
|
113
|
-
/**
|
|
104
|
+
/** Type of scalar aggregation. */
|
|
114
105
|
type?: ScalarType$1;
|
|
115
106
|
}
|
|
116
107
|
interface NestedAggregationItem$1 extends NestedAggregationItemKindOneOf$1 {
|
|
117
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
108
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
118
109
|
value?: ValueAggregation$1;
|
|
119
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
110
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
120
111
|
scalar?: ScalarAggregation$1;
|
|
121
112
|
/** Aggregation name displayed in the return. */
|
|
122
113
|
name?: string | null;
|
|
@@ -127,9 +118,9 @@ interface NestedAggregationItem$1 extends NestedAggregationItemKindOneOf$1 {
|
|
|
127
118
|
}
|
|
128
119
|
/** @oneof */
|
|
129
120
|
interface NestedAggregationItemKindOneOf$1 {
|
|
130
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
121
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
131
122
|
value?: ValueAggregation$1;
|
|
132
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
123
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
133
124
|
scalar?: ScalarAggregation$1;
|
|
134
125
|
}
|
|
135
126
|
declare enum AggregationType$1 {
|
|
@@ -141,9 +132,9 @@ declare enum AggregationType$1 {
|
|
|
141
132
|
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
142
133
|
NESTED = "NESTED"
|
|
143
134
|
}
|
|
144
|
-
/**
|
|
135
|
+
/** List of aggregations. Each aggregation is nested within the previous one. */
|
|
145
136
|
interface NestedAggregation$1 {
|
|
146
|
-
/**
|
|
137
|
+
/** List of aggregations, where each aggregation is nested within previous one. */
|
|
147
138
|
nestedAggregations?: NestedAggregationItem$1[];
|
|
148
139
|
}
|
|
149
140
|
interface SearchDetails$1 {
|
|
@@ -154,10 +145,7 @@ interface SearchDetails$1 {
|
|
|
154
145
|
* If the array is empty, all fields are searched.
|
|
155
146
|
*/
|
|
156
147
|
fields?: string[];
|
|
157
|
-
/**
|
|
158
|
-
* Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.
|
|
159
|
-
* The search function uses an algorithm to find results that are close to what the site visitor typed.
|
|
160
|
-
*/
|
|
148
|
+
/** Whether to allow the search function to automatically correct typos or minor mistakes in the search expression. The search function uses an algorithm to find results that are close to the text provided. */
|
|
161
149
|
fuzzy?: boolean;
|
|
162
150
|
}
|
|
163
151
|
interface Paging$1 {
|
|
@@ -177,7 +165,7 @@ declare enum DocumentType$1 {
|
|
|
177
165
|
STORES_PRODUCTS = "STORES_PRODUCTS"
|
|
178
166
|
}
|
|
179
167
|
interface SearchResponse$3 extends SearchResponsePagingOneOf$1 {
|
|
180
|
-
/** Paging metadata
|
|
168
|
+
/** Paging metadata. */
|
|
181
169
|
pagingOffsetMetadata?: PagingMetadata$1;
|
|
182
170
|
/** Documents matching the search query. */
|
|
183
171
|
siteDocumentItems?: SiteDocument$1[];
|
|
@@ -186,7 +174,7 @@ interface SearchResponse$3 extends SearchResponsePagingOneOf$1 {
|
|
|
186
174
|
}
|
|
187
175
|
/** @oneof */
|
|
188
176
|
interface SearchResponsePagingOneOf$1 {
|
|
189
|
-
/** Paging metadata
|
|
177
|
+
/** Paging metadata. */
|
|
190
178
|
pagingOffsetMetadata?: PagingMetadata$1;
|
|
191
179
|
}
|
|
192
180
|
interface AggregationData$1 {
|
|
@@ -194,24 +182,25 @@ interface AggregationData$1 {
|
|
|
194
182
|
results?: AggregationResults$1[];
|
|
195
183
|
}
|
|
196
184
|
interface ValueAggregationResult$1 {
|
|
197
|
-
/** Value
|
|
185
|
+
/** Value contained in the field specified in `fieldPath` for this aggregation in the request. */
|
|
198
186
|
value?: string;
|
|
187
|
+
/** Number of documents containing the specified value in the specified field. */
|
|
199
188
|
count?: number;
|
|
200
189
|
}
|
|
201
190
|
interface ValueResults$1 {
|
|
202
|
-
/** List of value
|
|
191
|
+
/** List of value aggregation results. */
|
|
203
192
|
results?: ValueAggregationResult$1[];
|
|
204
193
|
}
|
|
205
194
|
interface AggregationResultsScalarResult$1 {
|
|
206
|
-
/** Type of scalar aggregation */
|
|
195
|
+
/** Type of scalar aggregation. */
|
|
207
196
|
type?: ScalarType$1;
|
|
208
|
-
/** Value of the scalar aggregation */
|
|
197
|
+
/** Value of the scalar aggregation. For example, the minimum, maximum, or total value for the specified field. */
|
|
209
198
|
value?: number;
|
|
210
199
|
}
|
|
211
200
|
interface ValueResult$1 {
|
|
212
|
-
/** Value
|
|
201
|
+
/** Value contained in the field specified in `fieldPath` for this aggregation in the request. */
|
|
213
202
|
value?: string;
|
|
214
|
-
/**
|
|
203
|
+
/** Number of documents containing the specified value in the specified field. */
|
|
215
204
|
count?: number | null;
|
|
216
205
|
}
|
|
217
206
|
interface ScalarResult$1 {
|
|
@@ -232,7 +221,7 @@ interface NestedResultValueResultOneOf$1 {
|
|
|
232
221
|
scalar?: ScalarResult$1;
|
|
233
222
|
}
|
|
234
223
|
interface Results$1 {
|
|
235
|
-
/**
|
|
224
|
+
/** Aggregation results. */
|
|
236
225
|
results?: Record<string, NestedResultValue$1>;
|
|
237
226
|
}
|
|
238
227
|
/**
|
|
@@ -273,7 +262,7 @@ interface PagingMetadata$1 {
|
|
|
273
262
|
offset?: number | null;
|
|
274
263
|
/** Total number of items that match the query. */
|
|
275
264
|
total?: number | null;
|
|
276
|
-
/**
|
|
265
|
+
/** Whether the server failed to calculate the `total` field. */
|
|
277
266
|
tooManyToCount?: boolean | null;
|
|
278
267
|
}
|
|
279
268
|
interface SiteDocumentNonNullableFields$1 {
|
|
@@ -305,23 +294,23 @@ interface SearchResponseNonNullableFields$3 {
|
|
|
305
294
|
aggregationData?: AggregationDataNonNullableFields$1;
|
|
306
295
|
}
|
|
307
296
|
|
|
308
|
-
interface SearchRequest$2 {
|
|
309
|
-
/** Search query and aggregation information. */
|
|
310
|
-
search: Search;
|
|
311
|
-
/** Document type of the documents to search in. */
|
|
312
|
-
documentType: DocumentType;
|
|
313
|
-
/** Language to search in. */
|
|
314
|
-
language?: string | null;
|
|
315
|
-
}
|
|
316
297
|
interface SiteDocument {
|
|
317
298
|
/**
|
|
318
|
-
*
|
|
299
|
+
* Result ID.
|
|
319
300
|
* @readonly
|
|
320
301
|
*/
|
|
321
302
|
_id?: string;
|
|
322
|
-
/** The
|
|
303
|
+
/** The document payload. */
|
|
323
304
|
data?: Record<string, any> | null;
|
|
324
305
|
}
|
|
306
|
+
interface SearchRequest$2 {
|
|
307
|
+
/** Search query and aggregation information. */
|
|
308
|
+
search: Search;
|
|
309
|
+
/** Document type to search in. */
|
|
310
|
+
documentType: DocumentType;
|
|
311
|
+
/** Language to search in. */
|
|
312
|
+
language?: string | null;
|
|
313
|
+
}
|
|
325
314
|
interface Search extends SearchPagingMethodOneOf {
|
|
326
315
|
/** Paging options to limit and skip the number of items. */
|
|
327
316
|
paging?: Paging;
|
|
@@ -339,12 +328,9 @@ interface Search extends SearchPagingMethodOneOf {
|
|
|
339
328
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
340
329
|
*/
|
|
341
330
|
sort?: Sorting[];
|
|
342
|
-
/**
|
|
343
|
-
* A search method for grouping data into various categories (facets) and providing summaries for each category.
|
|
344
|
-
* For example, use aggregations to allow site visitors to narrow down their search results by selecting specific categories such as price ranges, brand names, and ratings.
|
|
345
|
-
*/
|
|
331
|
+
/** A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings. */
|
|
346
332
|
aggregations?: Aggregation$2[];
|
|
347
|
-
/**
|
|
333
|
+
/** Search information. */
|
|
348
334
|
search?: SearchDetails;
|
|
349
335
|
}
|
|
350
336
|
/** @oneof */
|
|
@@ -363,14 +349,11 @@ declare enum SortOrder {
|
|
|
363
349
|
DESC = "DESC"
|
|
364
350
|
}
|
|
365
351
|
interface Aggregation$2 extends AggregationKindOneOf {
|
|
366
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
352
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
367
353
|
value?: ValueAggregation;
|
|
368
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
354
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
369
355
|
scalar?: ScalarAggregation;
|
|
370
|
-
/**
|
|
371
|
-
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
372
|
-
* For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
|
|
373
|
-
*/
|
|
356
|
+
/** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */
|
|
374
357
|
nested?: NestedAggregation;
|
|
375
358
|
/** Aggregation name displayed in the return. */
|
|
376
359
|
name?: string | null;
|
|
@@ -381,23 +364,20 @@ interface Aggregation$2 extends AggregationKindOneOf {
|
|
|
381
364
|
}
|
|
382
365
|
/** @oneof */
|
|
383
366
|
interface AggregationKindOneOf {
|
|
384
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
367
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
385
368
|
value?: ValueAggregation;
|
|
386
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
369
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
387
370
|
scalar?: ScalarAggregation;
|
|
388
|
-
/**
|
|
389
|
-
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
390
|
-
* For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
|
|
391
|
-
*/
|
|
371
|
+
/** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */
|
|
392
372
|
nested?: NestedAggregation;
|
|
393
373
|
}
|
|
394
374
|
declare enum ScalarType {
|
|
395
375
|
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
396
|
-
/** Minimum value */
|
|
376
|
+
/** Minimum value. */
|
|
397
377
|
MIN = "MIN",
|
|
398
|
-
/** Maximum value */
|
|
378
|
+
/** Maximum value. */
|
|
399
379
|
MAX = "MAX",
|
|
400
|
-
/** Sum of values */
|
|
380
|
+
/** Sum of values. */
|
|
401
381
|
SUM = "SUM"
|
|
402
382
|
}
|
|
403
383
|
declare enum NestedAggregationType {
|
|
@@ -409,7 +389,7 @@ declare enum NestedAggregationType {
|
|
|
409
389
|
}
|
|
410
390
|
interface ValueAggregation {
|
|
411
391
|
/**
|
|
412
|
-
*
|
|
392
|
+
* Maximum number of aggregation results to return.
|
|
413
393
|
* Min: `1`
|
|
414
394
|
* Max: `250`
|
|
415
395
|
* Default: `10`
|
|
@@ -417,13 +397,13 @@ interface ValueAggregation {
|
|
|
417
397
|
limit?: number | null;
|
|
418
398
|
}
|
|
419
399
|
interface ScalarAggregation {
|
|
420
|
-
/**
|
|
400
|
+
/** Type of scalar aggregation. */
|
|
421
401
|
type?: ScalarType;
|
|
422
402
|
}
|
|
423
403
|
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
424
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
404
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
425
405
|
value?: ValueAggregation;
|
|
426
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
406
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
427
407
|
scalar?: ScalarAggregation;
|
|
428
408
|
/** Aggregation name displayed in the return. */
|
|
429
409
|
name?: string | null;
|
|
@@ -434,9 +414,9 @@ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
434
414
|
}
|
|
435
415
|
/** @oneof */
|
|
436
416
|
interface NestedAggregationItemKindOneOf {
|
|
437
|
-
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
417
|
+
/** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
438
418
|
value?: ValueAggregation;
|
|
439
|
-
/** A scalar aggregation calculates a single numerical value from a dataset, such as the
|
|
419
|
+
/** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the tota, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */
|
|
440
420
|
scalar?: ScalarAggregation;
|
|
441
421
|
}
|
|
442
422
|
declare enum AggregationType {
|
|
@@ -448,9 +428,9 @@ declare enum AggregationType {
|
|
|
448
428
|
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
449
429
|
NESTED = "NESTED"
|
|
450
430
|
}
|
|
451
|
-
/**
|
|
431
|
+
/** List of aggregations. Each aggregation is nested within the previous one. */
|
|
452
432
|
interface NestedAggregation {
|
|
453
|
-
/**
|
|
433
|
+
/** List of aggregations, where each aggregation is nested within previous one. */
|
|
454
434
|
nestedAggregations?: NestedAggregationItem[];
|
|
455
435
|
}
|
|
456
436
|
interface SearchDetails {
|
|
@@ -461,10 +441,7 @@ interface SearchDetails {
|
|
|
461
441
|
* If the array is empty, all fields are searched.
|
|
462
442
|
*/
|
|
463
443
|
fields?: string[];
|
|
464
|
-
/**
|
|
465
|
-
* Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.
|
|
466
|
-
* The search function uses an algorithm to find results that are close to what the site visitor typed.
|
|
467
|
-
*/
|
|
444
|
+
/** Whether to allow the search function to automatically correct typos or minor mistakes in the search expression. The search function uses an algorithm to find results that are close to the text provided. */
|
|
468
445
|
fuzzy?: boolean;
|
|
469
446
|
}
|
|
470
447
|
interface Paging {
|
|
@@ -484,7 +461,7 @@ declare enum DocumentType {
|
|
|
484
461
|
STORES_PRODUCTS = "STORES_PRODUCTS"
|
|
485
462
|
}
|
|
486
463
|
interface SearchResponse$2 extends SearchResponsePagingOneOf {
|
|
487
|
-
/** Paging metadata
|
|
464
|
+
/** Paging metadata. */
|
|
488
465
|
pagingOffsetMetadata?: PagingMetadata;
|
|
489
466
|
/** Documents matching the search query. */
|
|
490
467
|
siteDocumentItems?: SiteDocument[];
|
|
@@ -493,7 +470,7 @@ interface SearchResponse$2 extends SearchResponsePagingOneOf {
|
|
|
493
470
|
}
|
|
494
471
|
/** @oneof */
|
|
495
472
|
interface SearchResponsePagingOneOf {
|
|
496
|
-
/** Paging metadata
|
|
473
|
+
/** Paging metadata. */
|
|
497
474
|
pagingOffsetMetadata?: PagingMetadata;
|
|
498
475
|
}
|
|
499
476
|
interface AggregationData {
|
|
@@ -501,24 +478,25 @@ interface AggregationData {
|
|
|
501
478
|
results?: AggregationResults[];
|
|
502
479
|
}
|
|
503
480
|
interface ValueAggregationResult {
|
|
504
|
-
/** Value
|
|
481
|
+
/** Value contained in the field specified in `fieldPath` for this aggregation in the request. */
|
|
505
482
|
value?: string;
|
|
483
|
+
/** Number of documents containing the specified value in the specified field. */
|
|
506
484
|
count?: number;
|
|
507
485
|
}
|
|
508
486
|
interface ValueResults {
|
|
509
|
-
/** List of value
|
|
487
|
+
/** List of value aggregation results. */
|
|
510
488
|
results?: ValueAggregationResult[];
|
|
511
489
|
}
|
|
512
490
|
interface AggregationResultsScalarResult {
|
|
513
|
-
/** Type of scalar aggregation */
|
|
491
|
+
/** Type of scalar aggregation. */
|
|
514
492
|
type?: ScalarType;
|
|
515
|
-
/** Value of the scalar aggregation */
|
|
493
|
+
/** Value of the scalar aggregation. For example, the minimum, maximum, or total value for the specified field. */
|
|
516
494
|
value?: number;
|
|
517
495
|
}
|
|
518
496
|
interface ValueResult {
|
|
519
|
-
/** Value
|
|
497
|
+
/** Value contained in the field specified in `fieldPath` for this aggregation in the request. */
|
|
520
498
|
value?: string;
|
|
521
|
-
/**
|
|
499
|
+
/** Number of documents containing the specified value in the specified field. */
|
|
522
500
|
count?: number | null;
|
|
523
501
|
}
|
|
524
502
|
interface ScalarResult {
|
|
@@ -539,7 +517,7 @@ interface NestedResultValueResultOneOf {
|
|
|
539
517
|
scalar?: ScalarResult;
|
|
540
518
|
}
|
|
541
519
|
interface Results {
|
|
542
|
-
/**
|
|
520
|
+
/** Aggregation results. */
|
|
543
521
|
results?: Record<string, NestedResultValue>;
|
|
544
522
|
}
|
|
545
523
|
/**
|
|
@@ -580,7 +558,7 @@ interface PagingMetadata {
|
|
|
580
558
|
offset?: number | null;
|
|
581
559
|
/** Total number of items that match the query. */
|
|
582
560
|
total?: number | null;
|
|
583
|
-
/**
|
|
561
|
+
/** Whether the server failed to calculate the `total` field. */
|
|
584
562
|
tooManyToCount?: boolean | null;
|
|
585
563
|
}
|
|
586
564
|
interface SiteDocumentNonNullableFields {
|