@wix/search 1.0.23 → 1.0.25
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/package.json +4 -5
- package/type-bundles/context.bundle.d.ts +310 -58
- package/type-bundles/index.bundle.d.ts +262 -60
- package/type-bundles/meta.bundle.d.ts +573 -109
|
@@ -1,32 +1,48 @@
|
|
|
1
1
|
interface SiteDocument$1 {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Results ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
3
6
|
id?: string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
7
|
+
/** The docuement payload. */
|
|
8
|
+
data?: Record<string, any> | null;
|
|
6
9
|
}
|
|
7
10
|
interface SearchRequest$3 {
|
|
8
|
-
/** Search query */
|
|
11
|
+
/** Search query and aggregation information. */
|
|
9
12
|
search: Search$1;
|
|
10
|
-
/** Document type of documents to search
|
|
13
|
+
/** Document type of the documents to search in. */
|
|
11
14
|
documentType: DocumentType$1;
|
|
12
15
|
/** Language to search in. */
|
|
13
16
|
language?: string | null;
|
|
14
17
|
}
|
|
15
18
|
interface Search$1 extends SearchPagingMethodOneOf$1 {
|
|
16
|
-
/**
|
|
19
|
+
/** Paging options to limit and skip the number of items. */
|
|
17
20
|
paging?: Paging$1;
|
|
18
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Filter object in the following format:
|
|
23
|
+
* `"filter" : {
|
|
24
|
+
* "fieldName1": "value1",
|
|
25
|
+
* "fieldName2":{"$operator":"value2"}
|
|
26
|
+
* }`
|
|
27
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
28
|
+
*/
|
|
19
29
|
filter?: Record<string, any> | null;
|
|
20
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Sort object in the following format:
|
|
32
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
33
|
+
*/
|
|
21
34
|
sort?: Sorting$1[];
|
|
22
|
-
/**
|
|
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
|
+
*/
|
|
23
39
|
aggregations?: Aggregation$3[];
|
|
24
|
-
/** Free text to match in searchable fields */
|
|
40
|
+
/** Free text to match in searchable fields. */
|
|
25
41
|
search?: SearchDetails$1;
|
|
26
42
|
}
|
|
27
43
|
/** @oneof */
|
|
28
44
|
interface SearchPagingMethodOneOf$1 {
|
|
29
|
-
/**
|
|
45
|
+
/** Paging options to limit and skip the number of items. */
|
|
30
46
|
paging?: Paging$1;
|
|
31
47
|
}
|
|
32
48
|
interface Sorting$1 {
|
|
@@ -40,26 +56,32 @@ declare enum SortOrder$1 {
|
|
|
40
56
|
DESC = "DESC"
|
|
41
57
|
}
|
|
42
58
|
interface Aggregation$3 extends AggregationKindOneOf$1 {
|
|
43
|
-
/**
|
|
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. */
|
|
44
60
|
value?: ValueAggregation$1;
|
|
45
|
-
/**
|
|
61
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
46
62
|
scalar?: ScalarAggregation$1;
|
|
47
|
-
/**
|
|
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
|
+
*/
|
|
48
67
|
nested?: NestedAggregation$1;
|
|
49
|
-
/**
|
|
68
|
+
/** Aggregation name displayed in the return. */
|
|
50
69
|
name?: string | null;
|
|
51
|
-
/** Type of aggregation
|
|
70
|
+
/** Type of aggregation to perform. */
|
|
52
71
|
type?: AggregationType$1;
|
|
53
|
-
/** Field to aggregate by
|
|
72
|
+
/** Field to aggregate by. */
|
|
54
73
|
fieldPath?: string;
|
|
55
74
|
}
|
|
56
75
|
/** @oneof */
|
|
57
76
|
interface AggregationKindOneOf$1 {
|
|
58
|
-
/**
|
|
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. */
|
|
59
78
|
value?: ValueAggregation$1;
|
|
60
|
-
/**
|
|
79
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
61
80
|
scalar?: ScalarAggregation$1;
|
|
62
|
-
/**
|
|
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
|
+
*/
|
|
63
85
|
nested?: NestedAggregation$1;
|
|
64
86
|
}
|
|
65
87
|
declare enum ScalarType$1 {
|
|
@@ -79,30 +101,35 @@ declare enum NestedAggregationType$1 {
|
|
|
79
101
|
SCALAR = "SCALAR"
|
|
80
102
|
}
|
|
81
103
|
interface ValueAggregation$1 {
|
|
82
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Number of aggregation results to return.
|
|
106
|
+
* Min: `1`
|
|
107
|
+
* Max: `250`
|
|
108
|
+
* Default: `10`
|
|
109
|
+
*/
|
|
83
110
|
limit?: number | null;
|
|
84
111
|
}
|
|
85
112
|
interface ScalarAggregation$1 {
|
|
86
|
-
/**
|
|
113
|
+
/** Operation type for the scalar aggregation. */
|
|
87
114
|
type?: ScalarType$1;
|
|
88
115
|
}
|
|
89
116
|
interface NestedAggregationItem$1 extends NestedAggregationItemKindOneOf$1 {
|
|
90
|
-
/**
|
|
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. */
|
|
91
118
|
value?: ValueAggregation$1;
|
|
92
|
-
/**
|
|
119
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
93
120
|
scalar?: ScalarAggregation$1;
|
|
94
|
-
/**
|
|
121
|
+
/** Aggregation name displayed in the return. */
|
|
95
122
|
name?: string | null;
|
|
96
|
-
/** Type of aggregation
|
|
123
|
+
/** Type of aggregation to perform. */
|
|
97
124
|
type?: NestedAggregationType$1;
|
|
98
|
-
/** Field to aggregate by
|
|
125
|
+
/** Field to aggregate by. */
|
|
99
126
|
fieldPath?: string;
|
|
100
127
|
}
|
|
101
128
|
/** @oneof */
|
|
102
129
|
interface NestedAggregationItemKindOneOf$1 {
|
|
103
|
-
/**
|
|
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. */
|
|
104
131
|
value?: ValueAggregation$1;
|
|
105
|
-
/**
|
|
132
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
106
133
|
scalar?: ScalarAggregation$1;
|
|
107
134
|
}
|
|
108
135
|
declare enum AggregationType$1 {
|
|
@@ -116,15 +143,21 @@ declare enum AggregationType$1 {
|
|
|
116
143
|
}
|
|
117
144
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
118
145
|
interface NestedAggregation$1 {
|
|
119
|
-
/** Flattened list of aggregations, where each
|
|
146
|
+
/** Flattened list of aggregations, where each aggregation is nested within previous one. */
|
|
120
147
|
nestedAggregations?: NestedAggregationItem$1[];
|
|
121
148
|
}
|
|
122
149
|
interface SearchDetails$1 {
|
|
123
|
-
/** Search term or expression */
|
|
150
|
+
/** Search term or expression. */
|
|
124
151
|
expression?: string | null;
|
|
125
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* Fields to search in.
|
|
154
|
+
* If the array is empty, all fields are searched.
|
|
155
|
+
*/
|
|
126
156
|
fields?: string[];
|
|
127
|
-
/**
|
|
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
|
+
*/
|
|
128
161
|
fuzzy?: boolean;
|
|
129
162
|
}
|
|
130
163
|
interface Paging$1 {
|
|
@@ -146,9 +179,9 @@ declare enum DocumentType$1 {
|
|
|
146
179
|
interface SearchResponse$3 extends SearchResponsePagingOneOf$1 {
|
|
147
180
|
/** Paging metadata for the next page of results. */
|
|
148
181
|
pagingOffsetMetadata?: PagingMetadata$1;
|
|
149
|
-
/** Documents matching
|
|
150
|
-
|
|
151
|
-
/**
|
|
182
|
+
/** Documents matching the search query. */
|
|
183
|
+
siteDocumentItems?: SiteDocument$1[];
|
|
184
|
+
/** Aggregated data. */
|
|
152
185
|
aggregationData?: AggregationData$1;
|
|
153
186
|
}
|
|
154
187
|
/** @oneof */
|
|
@@ -157,7 +190,7 @@ interface SearchResponsePagingOneOf$1 {
|
|
|
157
190
|
pagingOffsetMetadata?: PagingMetadata$1;
|
|
158
191
|
}
|
|
159
192
|
interface AggregationData$1 {
|
|
160
|
-
/**
|
|
193
|
+
/** List of the aggregated data results. */
|
|
161
194
|
results?: AggregationResults$1[];
|
|
162
195
|
}
|
|
163
196
|
interface ValueAggregationResult$1 {
|
|
@@ -182,24 +215,24 @@ interface ValueResult$1 {
|
|
|
182
215
|
count?: number | null;
|
|
183
216
|
}
|
|
184
217
|
interface ScalarResult$1 {
|
|
185
|
-
/**
|
|
218
|
+
/** Scalar aggregation results. */
|
|
186
219
|
value?: number;
|
|
187
220
|
}
|
|
188
221
|
interface NestedResultValue$1 extends NestedResultValueResultOneOf$1 {
|
|
189
|
-
/** Value aggregation
|
|
222
|
+
/** Value aggregation results. */
|
|
190
223
|
value?: ValueResult$1;
|
|
191
|
-
/** Scalar aggregation
|
|
224
|
+
/** Scalar aggregation results. */
|
|
192
225
|
scalar?: ScalarResult$1;
|
|
193
226
|
}
|
|
194
227
|
/** @oneof */
|
|
195
228
|
interface NestedResultValueResultOneOf$1 {
|
|
196
|
-
/** Value aggregation
|
|
229
|
+
/** Value aggregation results. */
|
|
197
230
|
value?: ValueResult$1;
|
|
198
|
-
/** Scalar aggregation
|
|
231
|
+
/** Scalar aggregation results. */
|
|
199
232
|
scalar?: ScalarResult$1;
|
|
200
233
|
}
|
|
201
234
|
interface Results$1 {
|
|
202
|
-
/** List of nested
|
|
235
|
+
/** List of nested aggregation results. */
|
|
203
236
|
results?: Record<string, NestedResultValue$1>;
|
|
204
237
|
}
|
|
205
238
|
/**
|
|
@@ -207,30 +240,30 @@ interface Results$1 {
|
|
|
207
240
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
208
241
|
*/
|
|
209
242
|
interface NestedResults$1 {
|
|
210
|
-
/** List of nested
|
|
243
|
+
/** List of nested aggregation results. */
|
|
211
244
|
results?: Results$1[];
|
|
212
245
|
}
|
|
213
246
|
interface AggregationResults$1 extends AggregationResultsResultOneOf$1 {
|
|
214
|
-
/** Value aggregation results */
|
|
247
|
+
/** Value aggregation results. */
|
|
215
248
|
values?: ValueResults$1;
|
|
216
|
-
/** Scalar aggregation results */
|
|
249
|
+
/** Scalar aggregation results. */
|
|
217
250
|
scalar?: AggregationResultsScalarResult$1;
|
|
218
|
-
/** Nested aggregation results */
|
|
251
|
+
/** Nested aggregation results. */
|
|
219
252
|
nested?: NestedResults$1;
|
|
220
|
-
/**
|
|
253
|
+
/** Aggregation name defined in the request. */
|
|
221
254
|
name?: string;
|
|
222
|
-
/** Type of aggregation that
|
|
255
|
+
/** Type of aggregation that was performed. */
|
|
223
256
|
type?: AggregationType$1;
|
|
224
|
-
/** Field
|
|
257
|
+
/** Field the data was aggregated by. */
|
|
225
258
|
fieldPath?: string;
|
|
226
259
|
}
|
|
227
260
|
/** @oneof */
|
|
228
261
|
interface AggregationResultsResultOneOf$1 {
|
|
229
|
-
/** Value aggregation results */
|
|
262
|
+
/** Value aggregation results. */
|
|
230
263
|
values?: ValueResults$1;
|
|
231
|
-
/** Scalar aggregation results */
|
|
264
|
+
/** Scalar aggregation results. */
|
|
232
265
|
scalar?: AggregationResultsScalarResult$1;
|
|
233
|
-
/** Nested aggregation results */
|
|
266
|
+
/** Nested aggregation results. */
|
|
234
267
|
nested?: NestedResults$1;
|
|
235
268
|
}
|
|
236
269
|
interface PagingMetadata$1 {
|
|
@@ -244,7 +277,7 @@ interface PagingMetadata$1 {
|
|
|
244
277
|
tooManyToCount?: boolean | null;
|
|
245
278
|
}
|
|
246
279
|
interface SearchResponseNonNullableFields$3 {
|
|
247
|
-
|
|
280
|
+
siteDocumentItems: {
|
|
248
281
|
id: string;
|
|
249
282
|
}[];
|
|
250
283
|
aggregationData?: {
|
|
@@ -279,34 +312,50 @@ interface SearchResponseNonNullableFields$3 {
|
|
|
279
312
|
}
|
|
280
313
|
|
|
281
314
|
interface SiteDocument {
|
|
282
|
-
/**
|
|
315
|
+
/**
|
|
316
|
+
* Results ID.
|
|
317
|
+
* @readonly
|
|
318
|
+
*/
|
|
283
319
|
_id?: string;
|
|
284
|
-
/**
|
|
285
|
-
|
|
320
|
+
/** The docuement payload. */
|
|
321
|
+
data?: Record<string, any> | null;
|
|
286
322
|
}
|
|
287
323
|
interface SearchRequest$2 {
|
|
288
|
-
/** Search query */
|
|
324
|
+
/** Search query and aggregation information. */
|
|
289
325
|
search: Search;
|
|
290
|
-
/** Document type of documents to search
|
|
326
|
+
/** Document type of the documents to search in. */
|
|
291
327
|
documentType: DocumentType;
|
|
292
328
|
/** Language to search in. */
|
|
293
329
|
language?: string | null;
|
|
294
330
|
}
|
|
295
331
|
interface Search extends SearchPagingMethodOneOf {
|
|
296
|
-
/**
|
|
332
|
+
/** Paging options to limit and skip the number of items. */
|
|
297
333
|
paging?: Paging;
|
|
298
|
-
/**
|
|
334
|
+
/**
|
|
335
|
+
* Filter object in the following format:
|
|
336
|
+
* `"filter" : {
|
|
337
|
+
* "fieldName1": "value1",
|
|
338
|
+
* "fieldName2":{"$operator":"value2"}
|
|
339
|
+
* }`
|
|
340
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
341
|
+
*/
|
|
299
342
|
filter?: Record<string, any> | null;
|
|
300
|
-
/**
|
|
343
|
+
/**
|
|
344
|
+
* Sort object in the following format:
|
|
345
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
346
|
+
*/
|
|
301
347
|
sort?: Sorting[];
|
|
302
|
-
/**
|
|
348
|
+
/**
|
|
349
|
+
* A search method for grouping data into various categories (facets) and providing summaries for each category.
|
|
350
|
+
* 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.
|
|
351
|
+
*/
|
|
303
352
|
aggregations?: Aggregation$2[];
|
|
304
|
-
/** Free text to match in searchable fields */
|
|
353
|
+
/** Free text to match in searchable fields. */
|
|
305
354
|
search?: SearchDetails;
|
|
306
355
|
}
|
|
307
356
|
/** @oneof */
|
|
308
357
|
interface SearchPagingMethodOneOf {
|
|
309
|
-
/**
|
|
358
|
+
/** Paging options to limit and skip the number of items. */
|
|
310
359
|
paging?: Paging;
|
|
311
360
|
}
|
|
312
361
|
interface Sorting {
|
|
@@ -320,26 +369,32 @@ declare enum SortOrder {
|
|
|
320
369
|
DESC = "DESC"
|
|
321
370
|
}
|
|
322
371
|
interface Aggregation$2 extends AggregationKindOneOf {
|
|
323
|
-
/**
|
|
372
|
+
/** 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. */
|
|
324
373
|
value?: ValueAggregation;
|
|
325
|
-
/**
|
|
374
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
326
375
|
scalar?: ScalarAggregation;
|
|
327
|
-
/**
|
|
376
|
+
/**
|
|
377
|
+
* 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.
|
|
378
|
+
* 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`.
|
|
379
|
+
*/
|
|
328
380
|
nested?: NestedAggregation;
|
|
329
|
-
/**
|
|
381
|
+
/** Aggregation name displayed in the return. */
|
|
330
382
|
name?: string | null;
|
|
331
|
-
/** Type of aggregation
|
|
383
|
+
/** Type of aggregation to perform. */
|
|
332
384
|
type?: AggregationType;
|
|
333
|
-
/** Field to aggregate by
|
|
385
|
+
/** Field to aggregate by. */
|
|
334
386
|
fieldPath?: string;
|
|
335
387
|
}
|
|
336
388
|
/** @oneof */
|
|
337
389
|
interface AggregationKindOneOf {
|
|
338
|
-
/**
|
|
390
|
+
/** 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. */
|
|
339
391
|
value?: ValueAggregation;
|
|
340
|
-
/**
|
|
392
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
341
393
|
scalar?: ScalarAggregation;
|
|
342
|
-
/**
|
|
394
|
+
/**
|
|
395
|
+
* 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.
|
|
396
|
+
* 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`.
|
|
397
|
+
*/
|
|
343
398
|
nested?: NestedAggregation;
|
|
344
399
|
}
|
|
345
400
|
declare enum ScalarType {
|
|
@@ -359,30 +414,35 @@ declare enum NestedAggregationType {
|
|
|
359
414
|
SCALAR = "SCALAR"
|
|
360
415
|
}
|
|
361
416
|
interface ValueAggregation {
|
|
362
|
-
/**
|
|
417
|
+
/**
|
|
418
|
+
* Number of aggregation results to return.
|
|
419
|
+
* Min: `1`
|
|
420
|
+
* Max: `250`
|
|
421
|
+
* Default: `10`
|
|
422
|
+
*/
|
|
363
423
|
limit?: number | null;
|
|
364
424
|
}
|
|
365
425
|
interface ScalarAggregation {
|
|
366
|
-
/**
|
|
426
|
+
/** Operation type for the scalar aggregation. */
|
|
367
427
|
type?: ScalarType;
|
|
368
428
|
}
|
|
369
429
|
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
370
|
-
/**
|
|
430
|
+
/** 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. */
|
|
371
431
|
value?: ValueAggregation;
|
|
372
|
-
/**
|
|
432
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
373
433
|
scalar?: ScalarAggregation;
|
|
374
|
-
/**
|
|
434
|
+
/** Aggregation name displayed in the return. */
|
|
375
435
|
name?: string | null;
|
|
376
|
-
/** Type of aggregation
|
|
436
|
+
/** Type of aggregation to perform. */
|
|
377
437
|
type?: NestedAggregationType;
|
|
378
|
-
/** Field to aggregate by
|
|
438
|
+
/** Field to aggregate by. */
|
|
379
439
|
fieldPath?: string;
|
|
380
440
|
}
|
|
381
441
|
/** @oneof */
|
|
382
442
|
interface NestedAggregationItemKindOneOf {
|
|
383
|
-
/**
|
|
443
|
+
/** 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. */
|
|
384
444
|
value?: ValueAggregation;
|
|
385
|
-
/**
|
|
445
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
386
446
|
scalar?: ScalarAggregation;
|
|
387
447
|
}
|
|
388
448
|
declare enum AggregationType {
|
|
@@ -396,15 +456,21 @@ declare enum AggregationType {
|
|
|
396
456
|
}
|
|
397
457
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
398
458
|
interface NestedAggregation {
|
|
399
|
-
/** Flattened list of aggregations, where each
|
|
459
|
+
/** Flattened list of aggregations, where each aggregation is nested within previous one. */
|
|
400
460
|
nestedAggregations?: NestedAggregationItem[];
|
|
401
461
|
}
|
|
402
462
|
interface SearchDetails {
|
|
403
|
-
/** Search term or expression */
|
|
463
|
+
/** Search term or expression. */
|
|
404
464
|
expression?: string | null;
|
|
405
|
-
/**
|
|
465
|
+
/**
|
|
466
|
+
* Fields to search in.
|
|
467
|
+
* If the array is empty, all fields are searched.
|
|
468
|
+
*/
|
|
406
469
|
fields?: string[];
|
|
407
|
-
/**
|
|
470
|
+
/**
|
|
471
|
+
* Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.
|
|
472
|
+
* The search function uses an algorithm to find results that are close to what the site visitor typed.
|
|
473
|
+
*/
|
|
408
474
|
fuzzy?: boolean;
|
|
409
475
|
}
|
|
410
476
|
interface Paging {
|
|
@@ -426,9 +492,9 @@ declare enum DocumentType {
|
|
|
426
492
|
interface SearchResponse$2 extends SearchResponsePagingOneOf {
|
|
427
493
|
/** Paging metadata for the next page of results. */
|
|
428
494
|
pagingOffsetMetadata?: PagingMetadata;
|
|
429
|
-
/** Documents matching
|
|
430
|
-
|
|
431
|
-
/**
|
|
495
|
+
/** Documents matching the search query. */
|
|
496
|
+
siteDocumentItems?: SiteDocument[];
|
|
497
|
+
/** Aggregated data. */
|
|
432
498
|
aggregationData?: AggregationData;
|
|
433
499
|
}
|
|
434
500
|
/** @oneof */
|
|
@@ -437,7 +503,7 @@ interface SearchResponsePagingOneOf {
|
|
|
437
503
|
pagingOffsetMetadata?: PagingMetadata;
|
|
438
504
|
}
|
|
439
505
|
interface AggregationData {
|
|
440
|
-
/**
|
|
506
|
+
/** List of the aggregated data results. */
|
|
441
507
|
results?: AggregationResults[];
|
|
442
508
|
}
|
|
443
509
|
interface ValueAggregationResult {
|
|
@@ -462,24 +528,24 @@ interface ValueResult {
|
|
|
462
528
|
count?: number | null;
|
|
463
529
|
}
|
|
464
530
|
interface ScalarResult {
|
|
465
|
-
/**
|
|
531
|
+
/** Scalar aggregation results. */
|
|
466
532
|
value?: number;
|
|
467
533
|
}
|
|
468
534
|
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
469
|
-
/** Value aggregation
|
|
535
|
+
/** Value aggregation results. */
|
|
470
536
|
value?: ValueResult;
|
|
471
|
-
/** Scalar aggregation
|
|
537
|
+
/** Scalar aggregation results. */
|
|
472
538
|
scalar?: ScalarResult;
|
|
473
539
|
}
|
|
474
540
|
/** @oneof */
|
|
475
541
|
interface NestedResultValueResultOneOf {
|
|
476
|
-
/** Value aggregation
|
|
542
|
+
/** Value aggregation results. */
|
|
477
543
|
value?: ValueResult;
|
|
478
|
-
/** Scalar aggregation
|
|
544
|
+
/** Scalar aggregation results. */
|
|
479
545
|
scalar?: ScalarResult;
|
|
480
546
|
}
|
|
481
547
|
interface Results {
|
|
482
|
-
/** List of nested
|
|
548
|
+
/** List of nested aggregation results. */
|
|
483
549
|
results?: Record<string, NestedResultValue>;
|
|
484
550
|
}
|
|
485
551
|
/**
|
|
@@ -487,30 +553,30 @@ interface Results {
|
|
|
487
553
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
488
554
|
*/
|
|
489
555
|
interface NestedResults {
|
|
490
|
-
/** List of nested
|
|
556
|
+
/** List of nested aggregation results. */
|
|
491
557
|
results?: Results[];
|
|
492
558
|
}
|
|
493
559
|
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
494
|
-
/** Value aggregation results */
|
|
560
|
+
/** Value aggregation results. */
|
|
495
561
|
values?: ValueResults;
|
|
496
|
-
/** Scalar aggregation results */
|
|
562
|
+
/** Scalar aggregation results. */
|
|
497
563
|
scalar?: AggregationResultsScalarResult;
|
|
498
|
-
/** Nested aggregation results */
|
|
564
|
+
/** Nested aggregation results. */
|
|
499
565
|
nested?: NestedResults;
|
|
500
|
-
/**
|
|
566
|
+
/** Aggregation name defined in the request. */
|
|
501
567
|
name?: string;
|
|
502
|
-
/** Type of aggregation that
|
|
568
|
+
/** Type of aggregation that was performed. */
|
|
503
569
|
type?: AggregationType;
|
|
504
|
-
/** Field
|
|
570
|
+
/** Field the data was aggregated by. */
|
|
505
571
|
fieldPath?: string;
|
|
506
572
|
}
|
|
507
573
|
/** @oneof */
|
|
508
574
|
interface AggregationResultsResultOneOf {
|
|
509
|
-
/** Value aggregation results */
|
|
575
|
+
/** Value aggregation results. */
|
|
510
576
|
values?: ValueResults;
|
|
511
|
-
/** Scalar aggregation results */
|
|
577
|
+
/** Scalar aggregation results. */
|
|
512
578
|
scalar?: AggregationResultsScalarResult;
|
|
513
|
-
/** Nested aggregation results */
|
|
579
|
+
/** Nested aggregation results. */
|
|
514
580
|
nested?: NestedResults;
|
|
515
581
|
}
|
|
516
582
|
interface PagingMetadata {
|
|
@@ -524,7 +590,7 @@ interface PagingMetadata {
|
|
|
524
590
|
tooManyToCount?: boolean | null;
|
|
525
591
|
}
|
|
526
592
|
interface SearchResponseNonNullableFields$2 {
|
|
527
|
-
|
|
593
|
+
siteDocumentItems: {
|
|
528
594
|
_id: string;
|
|
529
595
|
}[];
|
|
530
596
|
aggregationData?: {
|
|
@@ -753,6 +819,173 @@ interface SumAggregationResponse$1 {
|
|
|
753
819
|
/** The sum value across all documents */
|
|
754
820
|
value?: number | null;
|
|
755
821
|
}
|
|
822
|
+
interface FederatedSearchRequest$1 {
|
|
823
|
+
/** Query phrase to use. */
|
|
824
|
+
query?: string | null;
|
|
825
|
+
/** Language to search in. */
|
|
826
|
+
language?: string | null;
|
|
827
|
+
/** Limit of documents to return per document type. */
|
|
828
|
+
limit?: number | null;
|
|
829
|
+
/** Enable fuzzy search (for example query 'kalvin clein' will match document with 'calvin klein' in title). */
|
|
830
|
+
fuzzy?: boolean | null;
|
|
831
|
+
/** Highlight texts matching the query. Highlighted text will be wrapped with <mark/> tag. Defaults to true if not provided. */
|
|
832
|
+
highlight?: boolean | null;
|
|
833
|
+
/** Searchable fields to search in. If not provided, search is executed on all searchable fields in schemas */
|
|
834
|
+
searchFields?: string[];
|
|
835
|
+
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
836
|
+
documentTypes?: string[];
|
|
837
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
838
|
+
includeSeoHidden?: boolean | null;
|
|
839
|
+
}
|
|
840
|
+
interface FederatedSearchResponse$1 {
|
|
841
|
+
/** Search results from multiple indexes. */
|
|
842
|
+
results?: FederatedSearchDocuments$1[];
|
|
843
|
+
}
|
|
844
|
+
interface FederatedSearchDocuments$1 {
|
|
845
|
+
/** Document type of documents */
|
|
846
|
+
documentType?: string | null;
|
|
847
|
+
/** Documents of document type */
|
|
848
|
+
documents?: Record<string, any>[] | null;
|
|
849
|
+
/** Total count of matching documents for document type */
|
|
850
|
+
total?: number;
|
|
851
|
+
}
|
|
852
|
+
interface SuggestRequest$1 {
|
|
853
|
+
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
854
|
+
query?: string | null;
|
|
855
|
+
/** Document type of documents to search for. All document types are searched if not provided. */
|
|
856
|
+
documentType?: string | null;
|
|
857
|
+
/** Fields to order by. */
|
|
858
|
+
ordering?: OrderingClauses$1;
|
|
859
|
+
/** Number of suggested document to return. */
|
|
860
|
+
limit?: number;
|
|
861
|
+
/** Language to search in. */
|
|
862
|
+
language?: string | null;
|
|
863
|
+
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */
|
|
864
|
+
filter?: Record<string, any> | null;
|
|
865
|
+
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schema */
|
|
866
|
+
searchFields?: string[];
|
|
867
|
+
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
868
|
+
fields?: string[];
|
|
869
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
870
|
+
includeSeoHidden?: boolean | null;
|
|
871
|
+
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
872
|
+
properties?: SearchProperty$1[];
|
|
873
|
+
}
|
|
874
|
+
interface SuggestResponse$1 {
|
|
875
|
+
/** Suggested documents. */
|
|
876
|
+
documents?: Record<string, any>[] | null;
|
|
877
|
+
}
|
|
878
|
+
interface FederatedSuggestRequest$1 {
|
|
879
|
+
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
880
|
+
query?: string | null;
|
|
881
|
+
/** Language to search in. */
|
|
882
|
+
language?: string | null;
|
|
883
|
+
/** Number of suggested document to return per document type. */
|
|
884
|
+
limit?: number;
|
|
885
|
+
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schemas */
|
|
886
|
+
searchFields?: string[];
|
|
887
|
+
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
888
|
+
documentTypes?: string[];
|
|
889
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
890
|
+
includeSeoHidden?: boolean | null;
|
|
891
|
+
}
|
|
892
|
+
interface FederatedSuggestResponse$1 {
|
|
893
|
+
/** Suggest results from multiple indexes. */
|
|
894
|
+
results?: FederatedSuggestDocuments$1[];
|
|
895
|
+
}
|
|
896
|
+
interface FederatedSuggestDocuments$1 {
|
|
897
|
+
/** Document type of documents */
|
|
898
|
+
documentType?: string | null;
|
|
899
|
+
/** Documents of document type */
|
|
900
|
+
documents?: Record<string, any>[] | null;
|
|
901
|
+
}
|
|
902
|
+
interface RelatedRequest$1 {
|
|
903
|
+
/** ID of the document to fetch related documents for. */
|
|
904
|
+
documentId?: string | null;
|
|
905
|
+
/** Document type of the document. */
|
|
906
|
+
documentType?: string | null;
|
|
907
|
+
/** Fields to order by. */
|
|
908
|
+
ordering?: OrderingClauses$1;
|
|
909
|
+
/** Language to search in. */
|
|
910
|
+
language?: string | null;
|
|
911
|
+
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}). */
|
|
912
|
+
filter?: Record<string, any> | null;
|
|
913
|
+
/** Searchable fields to compare documents by. If not provided, all searchable fields in schema are used */
|
|
914
|
+
searchFields?: string[];
|
|
915
|
+
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
916
|
+
fields?: string[];
|
|
917
|
+
/** Number of related documents to return */
|
|
918
|
+
limit?: number;
|
|
919
|
+
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
920
|
+
properties?: SearchProperty$1[];
|
|
921
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
922
|
+
includeSeoHidden?: boolean | null;
|
|
923
|
+
}
|
|
924
|
+
interface RelatedResponse$1 {
|
|
925
|
+
/** Documents matching filter and query. */
|
|
926
|
+
documents?: Record<string, any>[] | null;
|
|
927
|
+
}
|
|
928
|
+
interface AutocompleteRequest$1 {
|
|
929
|
+
/** Query phrase to fetch completions for. */
|
|
930
|
+
query?: string | null;
|
|
931
|
+
/** Document type to use to search for phrases. */
|
|
932
|
+
documentType?: string | null;
|
|
933
|
+
/** Limit of phrases to fetch. */
|
|
934
|
+
limit?: number;
|
|
935
|
+
/** Language to search in. */
|
|
936
|
+
language?: string | null;
|
|
937
|
+
/** Filter in platfromized query language (for example {'field': {'$eq': 'value'}}) */
|
|
938
|
+
filter?: Record<string, any> | null;
|
|
939
|
+
/** Searchable fields to use for query completion. If not provided, all searchable fields in schema are used */
|
|
940
|
+
searchFields?: string[];
|
|
941
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
942
|
+
includeSeoHidden?: boolean | null;
|
|
943
|
+
}
|
|
944
|
+
interface AutocompleteResponse$1 {
|
|
945
|
+
/** Suggested phrases. */
|
|
946
|
+
values?: AutocompleteResponseValue$1[];
|
|
947
|
+
}
|
|
948
|
+
interface AutocompleteResponseValue$1 {
|
|
949
|
+
/** Suggested phrase. */
|
|
950
|
+
query?: string;
|
|
951
|
+
}
|
|
952
|
+
interface FederatedAutocompleteRequest$1 {
|
|
953
|
+
/** Query phrase to fetch completions for. */
|
|
954
|
+
query?: string | null;
|
|
955
|
+
/** Language to search in. */
|
|
956
|
+
language?: string | null;
|
|
957
|
+
/** Number of queries to return per document type. */
|
|
958
|
+
limit?: number;
|
|
959
|
+
/** Searchable fields to search in. If not provided, search is executed on all autocompletable fields in schemas */
|
|
960
|
+
searchFields?: string[];
|
|
961
|
+
/** Document types to autocomplete in. If not provided, autocomplete is executed on all document types enabled for the site */
|
|
962
|
+
documentTypes?: string[];
|
|
963
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
964
|
+
includeSeoHidden?: boolean | null;
|
|
965
|
+
}
|
|
966
|
+
interface FederatedAutocompleteResponse$1 {
|
|
967
|
+
/** Suggested phrases from multiple indexes */
|
|
968
|
+
results?: FederatedAutocompleteResults$1[];
|
|
969
|
+
}
|
|
970
|
+
interface FederatedAutocompleteResults$1 {
|
|
971
|
+
/** Document type of queries */
|
|
972
|
+
documentType?: string | null;
|
|
973
|
+
/** Suggested phrases */
|
|
974
|
+
values?: AutocompleteResponseValue$1[];
|
|
975
|
+
}
|
|
976
|
+
interface TrendingRequest$1 {
|
|
977
|
+
documentTypes?: string[];
|
|
978
|
+
language?: string | null;
|
|
979
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
980
|
+
includeSeoHidden?: boolean | null;
|
|
981
|
+
}
|
|
982
|
+
interface TrendingResponse$1 {
|
|
983
|
+
results?: TrendingItems$1[];
|
|
984
|
+
}
|
|
985
|
+
interface TrendingItems$1 {
|
|
986
|
+
documentType?: string;
|
|
987
|
+
documents?: Record<string, any>[] | null;
|
|
988
|
+
}
|
|
756
989
|
interface SearchResponseNonNullableFields$1 {
|
|
757
990
|
nextPage?: {
|
|
758
991
|
total: number;
|
|
@@ -788,6 +1021,31 @@ interface SearchResponseNonNullableFields$1 {
|
|
|
788
1021
|
};
|
|
789
1022
|
}[];
|
|
790
1023
|
}
|
|
1024
|
+
interface FederatedSearchResponseNonNullableFields$1 {
|
|
1025
|
+
results: {
|
|
1026
|
+
total: number;
|
|
1027
|
+
}[];
|
|
1028
|
+
}
|
|
1029
|
+
interface FederatedSuggestResponseNonNullableFields$1 {
|
|
1030
|
+
results: FederatedSuggestDocuments$1[];
|
|
1031
|
+
}
|
|
1032
|
+
interface AutocompleteResponseNonNullableFields$1 {
|
|
1033
|
+
values: {
|
|
1034
|
+
query: string;
|
|
1035
|
+
}[];
|
|
1036
|
+
}
|
|
1037
|
+
interface FederatedAutocompleteResponseNonNullableFields$1 {
|
|
1038
|
+
results: {
|
|
1039
|
+
values: {
|
|
1040
|
+
query: string;
|
|
1041
|
+
}[];
|
|
1042
|
+
}[];
|
|
1043
|
+
}
|
|
1044
|
+
interface TrendingResponseNonNullableFields$1 {
|
|
1045
|
+
results: {
|
|
1046
|
+
documentType: string;
|
|
1047
|
+
}[];
|
|
1048
|
+
}
|
|
791
1049
|
|
|
792
1050
|
interface SearchRequest {
|
|
793
1051
|
/** Text to search for. All searchable fields will be searched. */
|
|
@@ -968,6 +1226,173 @@ interface SumAggregationResponse {
|
|
|
968
1226
|
/** The sum value across all documents */
|
|
969
1227
|
value?: number | null;
|
|
970
1228
|
}
|
|
1229
|
+
interface FederatedSearchRequest {
|
|
1230
|
+
/** Query phrase to use. */
|
|
1231
|
+
query?: string | null;
|
|
1232
|
+
/** Language to search in. */
|
|
1233
|
+
language?: string | null;
|
|
1234
|
+
/** Limit of documents to return per document type. */
|
|
1235
|
+
limit?: number | null;
|
|
1236
|
+
/** Enable fuzzy search (for example query 'kalvin clein' will match document with 'calvin klein' in title). */
|
|
1237
|
+
fuzzy?: boolean | null;
|
|
1238
|
+
/** Highlight texts matching the query. Highlighted text will be wrapped with <mark/> tag. Defaults to true if not provided. */
|
|
1239
|
+
highlight?: boolean | null;
|
|
1240
|
+
/** Searchable fields to search in. If not provided, search is executed on all searchable fields in schemas */
|
|
1241
|
+
searchFields?: string[];
|
|
1242
|
+
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
1243
|
+
documentTypes?: string[];
|
|
1244
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1245
|
+
includeSeoHidden?: boolean | null;
|
|
1246
|
+
}
|
|
1247
|
+
interface FederatedSearchResponse {
|
|
1248
|
+
/** Search results from multiple indexes. */
|
|
1249
|
+
results?: FederatedSearchDocuments[];
|
|
1250
|
+
}
|
|
1251
|
+
interface FederatedSearchDocuments {
|
|
1252
|
+
/** Document type of documents */
|
|
1253
|
+
documentType?: string | null;
|
|
1254
|
+
/** Documents of document type */
|
|
1255
|
+
documents?: Record<string, any>[] | null;
|
|
1256
|
+
/** Total count of matching documents for document type */
|
|
1257
|
+
total?: number;
|
|
1258
|
+
}
|
|
1259
|
+
interface SuggestRequest {
|
|
1260
|
+
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
1261
|
+
query?: string | null;
|
|
1262
|
+
/** Document type of documents to search for. All document types are searched if not provided. */
|
|
1263
|
+
documentType?: string | null;
|
|
1264
|
+
/** Fields to order by. */
|
|
1265
|
+
ordering?: OrderingClauses;
|
|
1266
|
+
/** Number of suggested document to return. */
|
|
1267
|
+
limit?: number;
|
|
1268
|
+
/** Language to search in. */
|
|
1269
|
+
language?: string | null;
|
|
1270
|
+
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */
|
|
1271
|
+
filter?: Record<string, any> | null;
|
|
1272
|
+
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schema */
|
|
1273
|
+
searchFields?: string[];
|
|
1274
|
+
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
1275
|
+
fields?: string[];
|
|
1276
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1277
|
+
includeSeoHidden?: boolean | null;
|
|
1278
|
+
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
1279
|
+
properties?: SearchProperty[];
|
|
1280
|
+
}
|
|
1281
|
+
interface SuggestResponse {
|
|
1282
|
+
/** Suggested documents. */
|
|
1283
|
+
documents?: Record<string, any>[] | null;
|
|
1284
|
+
}
|
|
1285
|
+
interface FederatedSuggestRequest {
|
|
1286
|
+
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
1287
|
+
query?: string | null;
|
|
1288
|
+
/** Language to search in. */
|
|
1289
|
+
language?: string | null;
|
|
1290
|
+
/** Number of suggested document to return per document type. */
|
|
1291
|
+
limit?: number;
|
|
1292
|
+
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schemas */
|
|
1293
|
+
searchFields?: string[];
|
|
1294
|
+
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
1295
|
+
documentTypes?: string[];
|
|
1296
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1297
|
+
includeSeoHidden?: boolean | null;
|
|
1298
|
+
}
|
|
1299
|
+
interface FederatedSuggestResponse {
|
|
1300
|
+
/** Suggest results from multiple indexes. */
|
|
1301
|
+
results?: FederatedSuggestDocuments[];
|
|
1302
|
+
}
|
|
1303
|
+
interface FederatedSuggestDocuments {
|
|
1304
|
+
/** Document type of documents */
|
|
1305
|
+
documentType?: string | null;
|
|
1306
|
+
/** Documents of document type */
|
|
1307
|
+
documents?: Record<string, any>[] | null;
|
|
1308
|
+
}
|
|
1309
|
+
interface RelatedRequest {
|
|
1310
|
+
/** ID of the document to fetch related documents for. */
|
|
1311
|
+
documentId?: string | null;
|
|
1312
|
+
/** Document type of the document. */
|
|
1313
|
+
documentType?: string | null;
|
|
1314
|
+
/** Fields to order by. */
|
|
1315
|
+
ordering?: OrderingClauses;
|
|
1316
|
+
/** Language to search in. */
|
|
1317
|
+
language?: string | null;
|
|
1318
|
+
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}). */
|
|
1319
|
+
filter?: Record<string, any> | null;
|
|
1320
|
+
/** Searchable fields to compare documents by. If not provided, all searchable fields in schema are used */
|
|
1321
|
+
searchFields?: string[];
|
|
1322
|
+
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
1323
|
+
fields?: string[];
|
|
1324
|
+
/** Number of related documents to return */
|
|
1325
|
+
limit?: number;
|
|
1326
|
+
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
1327
|
+
properties?: SearchProperty[];
|
|
1328
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1329
|
+
includeSeoHidden?: boolean | null;
|
|
1330
|
+
}
|
|
1331
|
+
interface RelatedResponse {
|
|
1332
|
+
/** Documents matching filter and query. */
|
|
1333
|
+
documents?: Record<string, any>[] | null;
|
|
1334
|
+
}
|
|
1335
|
+
interface AutocompleteRequest {
|
|
1336
|
+
/** Query phrase to fetch completions for. */
|
|
1337
|
+
query?: string | null;
|
|
1338
|
+
/** Document type to use to search for phrases. */
|
|
1339
|
+
documentType?: string | null;
|
|
1340
|
+
/** Limit of phrases to fetch. */
|
|
1341
|
+
limit?: number;
|
|
1342
|
+
/** Language to search in. */
|
|
1343
|
+
language?: string | null;
|
|
1344
|
+
/** Filter in platfromized query language (for example {'field': {'$eq': 'value'}}) */
|
|
1345
|
+
filter?: Record<string, any> | null;
|
|
1346
|
+
/** Searchable fields to use for query completion. If not provided, all searchable fields in schema are used */
|
|
1347
|
+
searchFields?: string[];
|
|
1348
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1349
|
+
includeSeoHidden?: boolean | null;
|
|
1350
|
+
}
|
|
1351
|
+
interface AutocompleteResponse {
|
|
1352
|
+
/** Suggested phrases. */
|
|
1353
|
+
values?: AutocompleteResponseValue[];
|
|
1354
|
+
}
|
|
1355
|
+
interface AutocompleteResponseValue {
|
|
1356
|
+
/** Suggested phrase. */
|
|
1357
|
+
query?: string;
|
|
1358
|
+
}
|
|
1359
|
+
interface FederatedAutocompleteRequest {
|
|
1360
|
+
/** Query phrase to fetch completions for. */
|
|
1361
|
+
query?: string | null;
|
|
1362
|
+
/** Language to search in. */
|
|
1363
|
+
language?: string | null;
|
|
1364
|
+
/** Number of queries to return per document type. */
|
|
1365
|
+
limit?: number;
|
|
1366
|
+
/** Searchable fields to search in. If not provided, search is executed on all autocompletable fields in schemas */
|
|
1367
|
+
searchFields?: string[];
|
|
1368
|
+
/** Document types to autocomplete in. If not provided, autocomplete is executed on all document types enabled for the site */
|
|
1369
|
+
documentTypes?: string[];
|
|
1370
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1371
|
+
includeSeoHidden?: boolean | null;
|
|
1372
|
+
}
|
|
1373
|
+
interface FederatedAutocompleteResponse {
|
|
1374
|
+
/** Suggested phrases from multiple indexes */
|
|
1375
|
+
results?: FederatedAutocompleteResults[];
|
|
1376
|
+
}
|
|
1377
|
+
interface FederatedAutocompleteResults {
|
|
1378
|
+
/** Document type of queries */
|
|
1379
|
+
documentType?: string | null;
|
|
1380
|
+
/** Suggested phrases */
|
|
1381
|
+
values?: AutocompleteResponseValue[];
|
|
1382
|
+
}
|
|
1383
|
+
interface TrendingRequest {
|
|
1384
|
+
documentTypes?: string[];
|
|
1385
|
+
language?: string | null;
|
|
1386
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1387
|
+
includeSeoHidden?: boolean | null;
|
|
1388
|
+
}
|
|
1389
|
+
interface TrendingResponse {
|
|
1390
|
+
results?: TrendingItems[];
|
|
1391
|
+
}
|
|
1392
|
+
interface TrendingItems {
|
|
1393
|
+
documentType?: string;
|
|
1394
|
+
documents?: Record<string, any>[] | null;
|
|
1395
|
+
}
|
|
971
1396
|
interface SearchResponseNonNullableFields {
|
|
972
1397
|
nextPage?: {
|
|
973
1398
|
total: number;
|
|
@@ -1003,6 +1428,31 @@ interface SearchResponseNonNullableFields {
|
|
|
1003
1428
|
};
|
|
1004
1429
|
}[];
|
|
1005
1430
|
}
|
|
1431
|
+
interface FederatedSearchResponseNonNullableFields {
|
|
1432
|
+
results: {
|
|
1433
|
+
total: number;
|
|
1434
|
+
}[];
|
|
1435
|
+
}
|
|
1436
|
+
interface FederatedSuggestResponseNonNullableFields {
|
|
1437
|
+
results: FederatedSuggestDocuments[];
|
|
1438
|
+
}
|
|
1439
|
+
interface AutocompleteResponseNonNullableFields {
|
|
1440
|
+
values: {
|
|
1441
|
+
query: string;
|
|
1442
|
+
}[];
|
|
1443
|
+
}
|
|
1444
|
+
interface FederatedAutocompleteResponseNonNullableFields {
|
|
1445
|
+
results: {
|
|
1446
|
+
values: {
|
|
1447
|
+
query: string;
|
|
1448
|
+
}[];
|
|
1449
|
+
}[];
|
|
1450
|
+
}
|
|
1451
|
+
interface TrendingResponseNonNullableFields {
|
|
1452
|
+
results: {
|
|
1453
|
+
documentType: string;
|
|
1454
|
+
}[];
|
|
1455
|
+
}
|
|
1006
1456
|
|
|
1007
1457
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
1008
1458
|
getUrl: (context: any) => string;
|
|
@@ -1015,11 +1465,25 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
1015
1465
|
__originalResponseType: R;
|
|
1016
1466
|
};
|
|
1017
1467
|
declare function search(): __PublicMethodMetaInfo<'POST', {}, SearchRequest, SearchRequest$1, SearchResponse & SearchResponseNonNullableFields, SearchResponse$1 & SearchResponseNonNullableFields$1>;
|
|
1468
|
+
declare function federatedSearch(): __PublicMethodMetaInfo<'POST', {}, FederatedSearchRequest, FederatedSearchRequest$1, FederatedSearchResponse & FederatedSearchResponseNonNullableFields, FederatedSearchResponse$1 & FederatedSearchResponseNonNullableFields$1>;
|
|
1469
|
+
declare function suggest(): __PublicMethodMetaInfo<'POST', {}, SuggestRequest, SuggestRequest$1, SuggestResponse, SuggestResponse$1>;
|
|
1470
|
+
declare function federatedSuggest(): __PublicMethodMetaInfo<'POST', {}, FederatedSuggestRequest, FederatedSuggestRequest$1, FederatedSuggestResponse & FederatedSuggestResponseNonNullableFields, FederatedSuggestResponse$1 & FederatedSuggestResponseNonNullableFields$1>;
|
|
1471
|
+
declare function related(): __PublicMethodMetaInfo<'POST', {}, RelatedRequest, RelatedRequest$1, RelatedResponse, RelatedResponse$1>;
|
|
1472
|
+
declare function autocomplete(): __PublicMethodMetaInfo<'POST', {}, AutocompleteRequest, AutocompleteRequest$1, AutocompleteResponse & AutocompleteResponseNonNullableFields, AutocompleteResponse$1 & AutocompleteResponseNonNullableFields$1>;
|
|
1473
|
+
declare function federatedAutocomplete(): __PublicMethodMetaInfo<'POST', {}, FederatedAutocompleteRequest, FederatedAutocompleteRequest$1, FederatedAutocompleteResponse & FederatedAutocompleteResponseNonNullableFields, FederatedAutocompleteResponse$1 & FederatedAutocompleteResponseNonNullableFields$1>;
|
|
1474
|
+
declare function trending(): __PublicMethodMetaInfo<'POST', {}, TrendingRequest, TrendingRequest$1, TrendingResponse & TrendingResponseNonNullableFields, TrendingResponse$1 & TrendingResponseNonNullableFields$1>;
|
|
1018
1475
|
|
|
1019
1476
|
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
1477
|
+
declare const meta_autocomplete: typeof autocomplete;
|
|
1478
|
+
declare const meta_federatedAutocomplete: typeof federatedAutocomplete;
|
|
1479
|
+
declare const meta_federatedSearch: typeof federatedSearch;
|
|
1480
|
+
declare const meta_federatedSuggest: typeof federatedSuggest;
|
|
1481
|
+
declare const meta_related: typeof related;
|
|
1020
1482
|
declare const meta_search: typeof search;
|
|
1483
|
+
declare const meta_suggest: typeof suggest;
|
|
1484
|
+
declare const meta_trending: typeof trending;
|
|
1021
1485
|
declare namespace meta {
|
|
1022
|
-
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_search as search };
|
|
1486
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_autocomplete as autocomplete, meta_federatedAutocomplete as federatedAutocomplete, meta_federatedSearch as federatedSearch, meta_federatedSuggest as federatedSuggest, meta_related as related, meta_search as search, meta_suggest as suggest, meta_trending as trending };
|
|
1023
1487
|
}
|
|
1024
1488
|
|
|
1025
1489
|
export { meta as siteSearch, meta$1 as wixSiteSearch };
|