@wix/search 1.0.35 → 1.0.36
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 +80 -63
- package/type-bundles/index.bundle.d.ts +80 -63
- package/type-bundles/meta.bundle.d.ts +75 -97
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as wixSiteSearch from '@wix/search_wix-site-search';
|
|
2
|
+
import * as siteSearch from '@wix/search_site-search';
|
|
3
|
+
export { wixSiteSearch, siteSearch };
|
package/build/cjs/index.js
CHANGED
|
@@ -24,6 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.siteSearch = exports.wixSiteSearch = void 0;
|
|
27
|
-
|
|
28
|
-
exports.
|
|
27
|
+
const wixSiteSearch = __importStar(require("@wix/search_wix-site-search"));
|
|
28
|
+
exports.wixSiteSearch = wixSiteSearch;
|
|
29
|
+
const siteSearch = __importStar(require("@wix/search_site-search"));
|
|
30
|
+
exports.siteSearch = siteSearch;
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAA6D;AAGpD,sCAAa;AAFtB,oEAAsD;AAE9B,gCAAU"}
|
package/build/es/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as wixSiteSearch from '@wix/search_wix-site-search';
|
|
2
|
+
import * as siteSearch from '@wix/search_site-search';
|
|
3
|
+
export { wixSiteSearch, siteSearch };
|
package/build/es/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as wixSiteSearch from '@wix/search_wix-site-search';
|
|
2
|
+
import * as siteSearch from '@wix/search_site-search';
|
|
3
|
+
export { wixSiteSearch, siteSearch };
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/search",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/search_site-search": "1.0.
|
|
22
|
-
"@wix/search_wix-site-search": "1.0.
|
|
21
|
+
"@wix/search_site-search": "1.0.23",
|
|
22
|
+
"@wix/search_wix-site-search": "1.0.14"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"glob": "^10.4.1",
|
|
@@ -28,8 +28,9 @@
|
|
|
28
28
|
"typescript": "^5.3.2"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
|
31
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
|
|
32
32
|
"build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
|
33
|
+
"build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
|
|
33
34
|
"test": ":"
|
|
34
35
|
},
|
|
35
36
|
"wix": {
|
|
@@ -43,5 +44,5 @@
|
|
|
43
44
|
"fqdn": ""
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
|
-
"falconPackageHash": "
|
|
47
|
+
"falconPackageHash": "b0479d3a057bc39aacafaae456145287a381bf362346fa0e2f2052f5"
|
|
47
48
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
interface SearchRequest$1 {
|
|
2
|
-
/** Search query and aggregation information. */
|
|
3
|
-
search: Search;
|
|
4
|
-
/** Document type of the documents to search in. */
|
|
5
|
-
documentType: DocumentType;
|
|
6
|
-
/** Language to search in. */
|
|
7
|
-
language?: string | null;
|
|
8
|
-
}
|
|
9
1
|
interface SiteDocument$1 {
|
|
10
2
|
/**
|
|
11
|
-
*
|
|
3
|
+
* Result ID.
|
|
12
4
|
* @readonly
|
|
13
5
|
*/
|
|
14
6
|
_id?: string;
|
|
15
|
-
/** The
|
|
7
|
+
/** The document payload. */
|
|
16
8
|
data?: Record<string, any> | null;
|
|
17
9
|
}
|
|
10
|
+
interface SearchRequest$1 {
|
|
11
|
+
/** Search query and aggregation information. */
|
|
12
|
+
search: Search;
|
|
13
|
+
/** Document type to search in. */
|
|
14
|
+
documentType: DocumentType;
|
|
15
|
+
/** Language to search in. */
|
|
16
|
+
language?: string | null;
|
|
17
|
+
}
|
|
18
18
|
interface Search extends SearchPagingMethodOneOf {
|
|
19
19
|
/** Paging options to limit and skip the number of items. */
|
|
20
20
|
paging?: Paging;
|
|
@@ -32,12 +32,9 @@ interface Search extends SearchPagingMethodOneOf {
|
|
|
32
32
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
33
33
|
*/
|
|
34
34
|
sort?: Sorting[];
|
|
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$1[];
|
|
40
|
-
/**
|
|
37
|
+
/** Search information. */
|
|
41
38
|
search?: SearchDetails;
|
|
42
39
|
}
|
|
43
40
|
/** @oneof */
|
|
@@ -56,14 +53,11 @@ declare enum SortOrder {
|
|
|
56
53
|
DESC = "DESC"
|
|
57
54
|
}
|
|
58
55
|
interface Aggregation$1 extends AggregationKindOneOf {
|
|
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;
|
|
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;
|
|
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;
|
|
68
62
|
/** Aggregation name displayed in the return. */
|
|
69
63
|
name?: string | null;
|
|
@@ -74,23 +68,20 @@ interface Aggregation$1 extends AggregationKindOneOf {
|
|
|
74
68
|
}
|
|
75
69
|
/** @oneof */
|
|
76
70
|
interface AggregationKindOneOf {
|
|
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;
|
|
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;
|
|
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;
|
|
86
77
|
}
|
|
87
78
|
declare enum ScalarType {
|
|
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 {
|
|
@@ -102,7 +93,7 @@ declare enum NestedAggregationType {
|
|
|
102
93
|
}
|
|
103
94
|
interface ValueAggregation {
|
|
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 {
|
|
|
110
101
|
limit?: number | null;
|
|
111
102
|
}
|
|
112
103
|
interface ScalarAggregation {
|
|
113
|
-
/**
|
|
104
|
+
/** Type of scalar aggregation. */
|
|
114
105
|
type?: ScalarType;
|
|
115
106
|
}
|
|
116
107
|
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
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;
|
|
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;
|
|
121
112
|
/** Aggregation name displayed in the return. */
|
|
122
113
|
name?: string | null;
|
|
@@ -127,9 +118,9 @@ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
127
118
|
}
|
|
128
119
|
/** @oneof */
|
|
129
120
|
interface NestedAggregationItemKindOneOf {
|
|
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;
|
|
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;
|
|
134
125
|
}
|
|
135
126
|
declare enum AggregationType {
|
|
@@ -141,9 +132,9 @@ declare enum AggregationType {
|
|
|
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 {
|
|
146
|
-
/**
|
|
137
|
+
/** List of aggregations, where each aggregation is nested within previous one. */
|
|
147
138
|
nestedAggregations?: NestedAggregationItem[];
|
|
148
139
|
}
|
|
149
140
|
interface SearchDetails {
|
|
@@ -154,10 +145,7 @@ interface SearchDetails {
|
|
|
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 {
|
|
@@ -177,7 +165,7 @@ declare enum DocumentType {
|
|
|
177
165
|
STORES_PRODUCTS = "STORES_PRODUCTS"
|
|
178
166
|
}
|
|
179
167
|
interface SearchResponse$1 extends SearchResponsePagingOneOf {
|
|
180
|
-
/** Paging metadata
|
|
168
|
+
/** Paging metadata. */
|
|
181
169
|
pagingOffsetMetadata?: PagingMetadata;
|
|
182
170
|
/** Documents matching the search query. */
|
|
183
171
|
siteDocumentItems?: SiteDocument$1[];
|
|
@@ -186,7 +174,7 @@ interface SearchResponse$1 extends SearchResponsePagingOneOf {
|
|
|
186
174
|
}
|
|
187
175
|
/** @oneof */
|
|
188
176
|
interface SearchResponsePagingOneOf {
|
|
189
|
-
/** Paging metadata
|
|
177
|
+
/** Paging metadata. */
|
|
190
178
|
pagingOffsetMetadata?: PagingMetadata;
|
|
191
179
|
}
|
|
192
180
|
interface AggregationData {
|
|
@@ -194,24 +182,25 @@ interface AggregationData {
|
|
|
194
182
|
results?: AggregationResults[];
|
|
195
183
|
}
|
|
196
184
|
interface ValueAggregationResult {
|
|
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 {
|
|
202
|
-
/** List of value
|
|
191
|
+
/** List of value aggregation results. */
|
|
203
192
|
results?: ValueAggregationResult[];
|
|
204
193
|
}
|
|
205
194
|
interface AggregationResultsScalarResult {
|
|
206
|
-
/** Type of scalar aggregation */
|
|
195
|
+
/** Type of scalar aggregation. */
|
|
207
196
|
type?: ScalarType;
|
|
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 {
|
|
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 {
|
|
@@ -232,7 +221,7 @@ interface NestedResultValueResultOneOf {
|
|
|
232
221
|
scalar?: ScalarResult;
|
|
233
222
|
}
|
|
234
223
|
interface Results {
|
|
235
|
-
/**
|
|
224
|
+
/** Aggregation results. */
|
|
236
225
|
results?: Record<string, NestedResultValue>;
|
|
237
226
|
}
|
|
238
227
|
/**
|
|
@@ -273,7 +262,7 @@ interface PagingMetadata {
|
|
|
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 {
|
|
@@ -343,9 +332,12 @@ declare global {
|
|
|
343
332
|
}
|
|
344
333
|
}
|
|
345
334
|
|
|
335
|
+
declare function search$3(httpClient: HttpClient): (search: Search, documentType: DocumentType, options?: SearchOptions$1) => Promise<SearchResponse$1 & SearchResponseNonNullableFields$1>;
|
|
336
|
+
|
|
346
337
|
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
347
338
|
|
|
348
|
-
|
|
339
|
+
type _publicSearchType$1 = typeof search$3;
|
|
340
|
+
declare const search$2: ReturnType<typeof createRESTModule$1<_publicSearchType>>;
|
|
349
341
|
|
|
350
342
|
type context$1_AggregationData = AggregationData;
|
|
351
343
|
type context$1_AggregationKindOneOf = AggregationKindOneOf;
|
|
@@ -383,7 +375,7 @@ type context$1_ValueAggregationResult = ValueAggregationResult;
|
|
|
383
375
|
type context$1_ValueResult = ValueResult;
|
|
384
376
|
type context$1_ValueResults = ValueResults;
|
|
385
377
|
declare namespace context$1 {
|
|
386
|
-
export { type Aggregation$1 as Aggregation, type context$1_AggregationData as AggregationData, type context$1_AggregationKindOneOf as AggregationKindOneOf, type context$1_AggregationResults as AggregationResults, type context$1_AggregationResultsResultOneOf as AggregationResultsResultOneOf, type context$1_AggregationResultsScalarResult as AggregationResultsScalarResult, context$1_AggregationType as AggregationType, context$1_DocumentType as DocumentType, type context$1_NestedAggregation as NestedAggregation, type context$1_NestedAggregationItem as NestedAggregationItem, type context$1_NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOf, context$1_NestedAggregationType as NestedAggregationType, type context$1_NestedResultValue as NestedResultValue, type context$1_NestedResultValueResultOneOf as NestedResultValueResultOneOf, type context$1_NestedResults as NestedResults, type context$1_Paging as Paging, type context$1_PagingMetadata as PagingMetadata, type context$1_Results as Results, type context$1_ScalarAggregation as ScalarAggregation, type context$1_ScalarResult as ScalarResult, context$1_ScalarType as ScalarType, type context$1_Search as Search, type context$1_SearchDetails as SearchDetails, type SearchOptions$1 as SearchOptions, type context$1_SearchPagingMethodOneOf as SearchPagingMethodOneOf, type SearchRequest$1 as SearchRequest, type SearchResponse$1 as SearchResponse, type SearchResponseNonNullableFields$1 as SearchResponseNonNullableFields, type context$1_SearchResponsePagingOneOf as SearchResponsePagingOneOf, type SiteDocument$1 as SiteDocument, context$1_SortOrder as SortOrder, type context$1_Sorting as Sorting, type context$1_ValueAggregation as ValueAggregation, type context$1_ValueAggregationResult as ValueAggregationResult, type context$1_ValueResult as ValueResult, type context$1_ValueResults as ValueResults,
|
|
378
|
+
export { type Aggregation$1 as Aggregation, type context$1_AggregationData as AggregationData, type context$1_AggregationKindOneOf as AggregationKindOneOf, type context$1_AggregationResults as AggregationResults, type context$1_AggregationResultsResultOneOf as AggregationResultsResultOneOf, type context$1_AggregationResultsScalarResult as AggregationResultsScalarResult, context$1_AggregationType as AggregationType, context$1_DocumentType as DocumentType, type context$1_NestedAggregation as NestedAggregation, type context$1_NestedAggregationItem as NestedAggregationItem, type context$1_NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOf, context$1_NestedAggregationType as NestedAggregationType, type context$1_NestedResultValue as NestedResultValue, type context$1_NestedResultValueResultOneOf as NestedResultValueResultOneOf, type context$1_NestedResults as NestedResults, type context$1_Paging as Paging, type context$1_PagingMetadata as PagingMetadata, type context$1_Results as Results, type context$1_ScalarAggregation as ScalarAggregation, type context$1_ScalarResult as ScalarResult, context$1_ScalarType as ScalarType, type context$1_Search as Search, type context$1_SearchDetails as SearchDetails, type SearchOptions$1 as SearchOptions, type context$1_SearchPagingMethodOneOf as SearchPagingMethodOneOf, type SearchRequest$1 as SearchRequest, type SearchResponse$1 as SearchResponse, type SearchResponseNonNullableFields$1 as SearchResponseNonNullableFields, type context$1_SearchResponsePagingOneOf as SearchResponsePagingOneOf, type SiteDocument$1 as SiteDocument, context$1_SortOrder as SortOrder, type context$1_Sorting as Sorting, type context$1_ValueAggregation as ValueAggregation, type context$1_ValueAggregationResult as ValueAggregationResult, type context$1_ValueResult as ValueResult, type context$1_ValueResults as ValueResults, type _publicSearchType$1 as _publicSearchType, search$2 as search };
|
|
387
379
|
}
|
|
388
380
|
|
|
389
381
|
/** API is not yet fully migrated to FQDN entity */
|
|
@@ -1188,16 +1180,33 @@ interface TrendingOptions {
|
|
|
1188
1180
|
includeSeoHidden?: boolean | null;
|
|
1189
1181
|
}
|
|
1190
1182
|
|
|
1183
|
+
declare function search$1(httpClient: HttpClient): (options?: SearchOptions) => Promise<SearchResponse & SearchResponseNonNullableFields>;
|
|
1184
|
+
declare function federatedSearch$1(httpClient: HttpClient): (options?: FederatedSearchOptions) => Promise<FederatedSearchResponse & FederatedSearchResponseNonNullableFields>;
|
|
1185
|
+
declare function suggest$1(httpClient: HttpClient): (options?: SuggestOptions) => Promise<SuggestResponse>;
|
|
1186
|
+
declare function federatedSuggest$1(httpClient: HttpClient): (options?: FederatedSuggestOptions) => Promise<FederatedSuggestResponse>;
|
|
1187
|
+
declare function related$1(httpClient: HttpClient): (options?: RelatedOptions) => Promise<RelatedResponse>;
|
|
1188
|
+
declare function autocomplete$1(httpClient: HttpClient): (options?: AutocompleteOptions) => Promise<AutocompleteResponse & AutocompleteResponseNonNullableFields>;
|
|
1189
|
+
declare function federatedAutocomplete$1(httpClient: HttpClient): (options?: FederatedAutocompleteOptions) => Promise<FederatedAutocompleteResponse & FederatedAutocompleteResponseNonNullableFields>;
|
|
1190
|
+
declare function trending$1(httpClient: HttpClient): (options?: TrendingOptions) => Promise<TrendingResponse & TrendingResponseNonNullableFields>;
|
|
1191
|
+
|
|
1191
1192
|
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
1192
1193
|
|
|
1193
|
-
|
|
1194
|
-
declare const
|
|
1195
|
-
|
|
1196
|
-
declare const
|
|
1197
|
-
|
|
1198
|
-
declare const
|
|
1199
|
-
|
|
1200
|
-
declare const
|
|
1194
|
+
type _publicSearchType = typeof search$1;
|
|
1195
|
+
declare const search: ReturnType<typeof createRESTModule<_publicSearchType>>;
|
|
1196
|
+
type _publicFederatedSearchType = typeof federatedSearch$1;
|
|
1197
|
+
declare const federatedSearch: ReturnType<typeof createRESTModule<_publicFederatedSearchType>>;
|
|
1198
|
+
type _publicSuggestType = typeof suggest$1;
|
|
1199
|
+
declare const suggest: ReturnType<typeof createRESTModule<_publicSuggestType>>;
|
|
1200
|
+
type _publicFederatedSuggestType = typeof federatedSuggest$1;
|
|
1201
|
+
declare const federatedSuggest: ReturnType<typeof createRESTModule<_publicFederatedSuggestType>>;
|
|
1202
|
+
type _publicRelatedType = typeof related$1;
|
|
1203
|
+
declare const related: ReturnType<typeof createRESTModule<_publicRelatedType>>;
|
|
1204
|
+
type _publicAutocompleteType = typeof autocomplete$1;
|
|
1205
|
+
declare const autocomplete: ReturnType<typeof createRESTModule<_publicAutocompleteType>>;
|
|
1206
|
+
type _publicFederatedAutocompleteType = typeof federatedAutocomplete$1;
|
|
1207
|
+
declare const federatedAutocomplete: ReturnType<typeof createRESTModule<_publicFederatedAutocompleteType>>;
|
|
1208
|
+
type _publicTrendingType = typeof trending$1;
|
|
1209
|
+
declare const trending: ReturnType<typeof createRESTModule<_publicTrendingType>>;
|
|
1201
1210
|
|
|
1202
1211
|
type context_Aggregation = Aggregation;
|
|
1203
1212
|
declare const context_Aggregation: typeof Aggregation;
|
|
@@ -1291,6 +1300,14 @@ type context_VersioningMode = VersioningMode;
|
|
|
1291
1300
|
declare const context_VersioningMode: typeof VersioningMode;
|
|
1292
1301
|
type context_WebhookIdentityType = WebhookIdentityType;
|
|
1293
1302
|
declare const context_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1303
|
+
type context__publicAutocompleteType = _publicAutocompleteType;
|
|
1304
|
+
type context__publicFederatedAutocompleteType = _publicFederatedAutocompleteType;
|
|
1305
|
+
type context__publicFederatedSearchType = _publicFederatedSearchType;
|
|
1306
|
+
type context__publicFederatedSuggestType = _publicFederatedSuggestType;
|
|
1307
|
+
type context__publicRelatedType = _publicRelatedType;
|
|
1308
|
+
type context__publicSearchType = _publicSearchType;
|
|
1309
|
+
type context__publicSuggestType = _publicSuggestType;
|
|
1310
|
+
type context__publicTrendingType = _publicTrendingType;
|
|
1294
1311
|
declare const context_autocomplete: typeof autocomplete;
|
|
1295
1312
|
declare const context_federatedAutocomplete: typeof federatedAutocomplete;
|
|
1296
1313
|
declare const context_federatedSearch: typeof federatedSearch;
|
|
@@ -1300,7 +1317,7 @@ declare const context_search: typeof search;
|
|
|
1300
1317
|
declare const context_suggest: typeof suggest;
|
|
1301
1318
|
declare const context_trending: typeof trending;
|
|
1302
1319
|
declare namespace context {
|
|
1303
|
-
export { context_Aggregation as Aggregation, type context_AggregationFacet as AggregationFacet, type context_AutocompleteOptions as AutocompleteOptions, type context_AutocompleteRequest as AutocompleteRequest, type context_AutocompleteResponse as AutocompleteResponse, type context_AutocompleteResponseNonNullableFields as AutocompleteResponseNonNullableFields, type context_AutocompleteResponseValue as AutocompleteResponseValue, type context_DeleteByFilterOperation as DeleteByFilterOperation, type context_DeleteByIdsOperation as DeleteByIdsOperation, context_Direction as Direction, type context_DocumentImage as DocumentImage, type context_DocumentPayload as DocumentPayload, type context_DocumentUpdateOperation as DocumentUpdateOperation, type context_Empty as Empty, context_Enum as Enum, type context_FacetClause as FacetClause, type context_FacetClauseClauseOneOf as FacetClauseClauseOneOf, type context_FacetClauses as FacetClauses, type context_FacetCountResponse as FacetCountResponse, type context_FacetsResponse as FacetsResponse, type context_FacetsResponseResponseOneOf as FacetsResponseResponseOneOf, type context_FederatedAutocompleteOptions as FederatedAutocompleteOptions, type context_FederatedAutocompleteRequest as FederatedAutocompleteRequest, type context_FederatedAutocompleteResponse as FederatedAutocompleteResponse, type context_FederatedAutocompleteResponseNonNullableFields as FederatedAutocompleteResponseNonNullableFields, type context_FederatedAutocompleteResults as FederatedAutocompleteResults, type context_FederatedSearchDocuments as FederatedSearchDocuments, type context_FederatedSearchOptions as FederatedSearchOptions, type context_FederatedSearchRequest as FederatedSearchRequest, type context_FederatedSearchResponse as FederatedSearchResponse, type context_FederatedSearchResponseNonNullableFields as FederatedSearchResponseNonNullableFields, type context_FederatedSuggestDocuments as FederatedSuggestDocuments, type context_FederatedSuggestOptions as FederatedSuggestOptions, type context_FederatedSuggestRequest as FederatedSuggestRequest, type context_FederatedSuggestResponse as FederatedSuggestResponse, type context_HierarchicalAggregationResponse as HierarchicalAggregationResponse, type context_HierarchicalFacet as HierarchicalFacet, type context_HierarchicalFacetClauseOneOf as HierarchicalFacetClauseOneOf, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_IndexDocument as IndexDocument, type context_InternalDocument as InternalDocument, type context_InternalDocumentUpdateByFilterOperation as InternalDocumentUpdateByFilterOperation, type context_InternalDocumentUpdateOperation as InternalDocumentUpdateOperation, type context_InternalUpdateExistingOperation as InternalUpdateExistingOperation, type context_MaxAggregationResponse as MaxAggregationResponse, type context_MessageEnvelope as MessageEnvelope, type context_MinAggregationResponse as MinAggregationResponse, type context_MinMaxAggregationResponse as MinMaxAggregationResponse, type context_NextPageResponse as NextPageResponse, type context_OrderingClause as OrderingClause, type context_OrderingClauses as OrderingClauses, type context_RelatedOptions as RelatedOptions, type context_RelatedRequest as RelatedRequest, type context_RelatedResponse as RelatedResponse, type context_SearchOptions as SearchOptions, type context_SearchPaging as SearchPaging, type context_SearchProperty as SearchProperty, type context_SearchRequest as SearchRequest, type context_SearchResponse as SearchResponse, type context_SearchResponseNonNullableFields as SearchResponseNonNullableFields, type context_SiteDocument as SiteDocument, type context_SuggestOptions as SuggestOptions, type context_SuggestRequest as SuggestRequest, type context_SuggestResponse as SuggestResponse, type context_SumAggregationResponse as SumAggregationResponse, type context_TermAggregationResponse as TermAggregationResponse, type context_TermFacet as TermFacet, type context_TrendingItems as TrendingItems, type context_TrendingOptions as TrendingOptions, type context_TrendingRequest as TrendingRequest, type context_TrendingResponse as TrendingResponse, type context_TrendingResponseNonNullableFields as TrendingResponseNonNullableFields, type context_UpdateByFilterOperation as UpdateByFilterOperation, type context_UpdateDocumentsEvent as UpdateDocumentsEvent, type context_UpdateDocumentsEventOperationOneOf as UpdateDocumentsEventOperationOneOf, type context_UpdateExistingOperation as UpdateExistingOperation, type context_UpdateInternalDocumentsEvent as UpdateInternalDocumentsEvent, type context_UpdateInternalDocumentsEventOperationOneOf as UpdateInternalDocumentsEventOperationOneOf, type context_V1DeleteByFilterOperation as V1DeleteByFilterOperation, type context_V1DeleteByIdsOperation as V1DeleteByIdsOperation, type context_Value as Value, type context_VersionedDeleteByIdsOperation as VersionedDeleteByIdsOperation, type context_VersionedDocumentId as VersionedDocumentId, type context_VersionedDocumentUpdateOperation as VersionedDocumentUpdateOperation, context_VersioningMode as VersioningMode, context_WebhookIdentityType as WebhookIdentityType, context_autocomplete as autocomplete, context_federatedAutocomplete as federatedAutocomplete, context_federatedSearch as federatedSearch, context_federatedSuggest as federatedSuggest, context_related as related, context_search as search, context_suggest as suggest, context_trending as trending };
|
|
1320
|
+
export { context_Aggregation as Aggregation, type context_AggregationFacet as AggregationFacet, type context_AutocompleteOptions as AutocompleteOptions, type context_AutocompleteRequest as AutocompleteRequest, type context_AutocompleteResponse as AutocompleteResponse, type context_AutocompleteResponseNonNullableFields as AutocompleteResponseNonNullableFields, type context_AutocompleteResponseValue as AutocompleteResponseValue, type context_DeleteByFilterOperation as DeleteByFilterOperation, type context_DeleteByIdsOperation as DeleteByIdsOperation, context_Direction as Direction, type context_DocumentImage as DocumentImage, type context_DocumentPayload as DocumentPayload, type context_DocumentUpdateOperation as DocumentUpdateOperation, type context_Empty as Empty, context_Enum as Enum, type context_FacetClause as FacetClause, type context_FacetClauseClauseOneOf as FacetClauseClauseOneOf, type context_FacetClauses as FacetClauses, type context_FacetCountResponse as FacetCountResponse, type context_FacetsResponse as FacetsResponse, type context_FacetsResponseResponseOneOf as FacetsResponseResponseOneOf, type context_FederatedAutocompleteOptions as FederatedAutocompleteOptions, type context_FederatedAutocompleteRequest as FederatedAutocompleteRequest, type context_FederatedAutocompleteResponse as FederatedAutocompleteResponse, type context_FederatedAutocompleteResponseNonNullableFields as FederatedAutocompleteResponseNonNullableFields, type context_FederatedAutocompleteResults as FederatedAutocompleteResults, type context_FederatedSearchDocuments as FederatedSearchDocuments, type context_FederatedSearchOptions as FederatedSearchOptions, type context_FederatedSearchRequest as FederatedSearchRequest, type context_FederatedSearchResponse as FederatedSearchResponse, type context_FederatedSearchResponseNonNullableFields as FederatedSearchResponseNonNullableFields, type context_FederatedSuggestDocuments as FederatedSuggestDocuments, type context_FederatedSuggestOptions as FederatedSuggestOptions, type context_FederatedSuggestRequest as FederatedSuggestRequest, type context_FederatedSuggestResponse as FederatedSuggestResponse, type context_HierarchicalAggregationResponse as HierarchicalAggregationResponse, type context_HierarchicalFacet as HierarchicalFacet, type context_HierarchicalFacetClauseOneOf as HierarchicalFacetClauseOneOf, type context_IdentificationData as IdentificationData, type context_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context_IndexDocument as IndexDocument, type context_InternalDocument as InternalDocument, type context_InternalDocumentUpdateByFilterOperation as InternalDocumentUpdateByFilterOperation, type context_InternalDocumentUpdateOperation as InternalDocumentUpdateOperation, type context_InternalUpdateExistingOperation as InternalUpdateExistingOperation, type context_MaxAggregationResponse as MaxAggregationResponse, type context_MessageEnvelope as MessageEnvelope, type context_MinAggregationResponse as MinAggregationResponse, type context_MinMaxAggregationResponse as MinMaxAggregationResponse, type context_NextPageResponse as NextPageResponse, type context_OrderingClause as OrderingClause, type context_OrderingClauses as OrderingClauses, type context_RelatedOptions as RelatedOptions, type context_RelatedRequest as RelatedRequest, type context_RelatedResponse as RelatedResponse, type context_SearchOptions as SearchOptions, type context_SearchPaging as SearchPaging, type context_SearchProperty as SearchProperty, type context_SearchRequest as SearchRequest, type context_SearchResponse as SearchResponse, type context_SearchResponseNonNullableFields as SearchResponseNonNullableFields, type context_SiteDocument as SiteDocument, type context_SuggestOptions as SuggestOptions, type context_SuggestRequest as SuggestRequest, type context_SuggestResponse as SuggestResponse, type context_SumAggregationResponse as SumAggregationResponse, type context_TermAggregationResponse as TermAggregationResponse, type context_TermFacet as TermFacet, type context_TrendingItems as TrendingItems, type context_TrendingOptions as TrendingOptions, type context_TrendingRequest as TrendingRequest, type context_TrendingResponse as TrendingResponse, type context_TrendingResponseNonNullableFields as TrendingResponseNonNullableFields, type context_UpdateByFilterOperation as UpdateByFilterOperation, type context_UpdateDocumentsEvent as UpdateDocumentsEvent, type context_UpdateDocumentsEventOperationOneOf as UpdateDocumentsEventOperationOneOf, type context_UpdateExistingOperation as UpdateExistingOperation, type context_UpdateInternalDocumentsEvent as UpdateInternalDocumentsEvent, type context_UpdateInternalDocumentsEventOperationOneOf as UpdateInternalDocumentsEventOperationOneOf, type context_V1DeleteByFilterOperation as V1DeleteByFilterOperation, type context_V1DeleteByIdsOperation as V1DeleteByIdsOperation, type context_Value as Value, type context_VersionedDeleteByIdsOperation as VersionedDeleteByIdsOperation, type context_VersionedDocumentId as VersionedDocumentId, type context_VersionedDocumentUpdateOperation as VersionedDocumentUpdateOperation, context_VersioningMode as VersioningMode, context_WebhookIdentityType as WebhookIdentityType, type context__publicAutocompleteType as _publicAutocompleteType, type context__publicFederatedAutocompleteType as _publicFederatedAutocompleteType, type context__publicFederatedSearchType as _publicFederatedSearchType, type context__publicFederatedSuggestType as _publicFederatedSuggestType, type context__publicRelatedType as _publicRelatedType, type context__publicSearchType as _publicSearchType, type context__publicSuggestType as _publicSuggestType, type context__publicTrendingType as _publicTrendingType, context_autocomplete as autocomplete, context_federatedAutocomplete as federatedAutocomplete, context_federatedSearch as federatedSearch, context_federatedSuggest as federatedSuggest, context_related as related, context_search as search, context_suggest as suggest, context_trending as trending };
|
|
1304
1321
|
}
|
|
1305
1322
|
|
|
1306
1323
|
export { context as siteSearch, context$1 as wixSiteSearch };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
interface SearchRequest$1 {
|
|
2
|
-
/** Search query and aggregation information. */
|
|
3
|
-
search: Search;
|
|
4
|
-
/** Document type of the documents to search in. */
|
|
5
|
-
documentType: DocumentType;
|
|
6
|
-
/** Language to search in. */
|
|
7
|
-
language?: string | null;
|
|
8
|
-
}
|
|
9
1
|
interface SiteDocument$1 {
|
|
10
2
|
/**
|
|
11
|
-
*
|
|
3
|
+
* Result ID.
|
|
12
4
|
* @readonly
|
|
13
5
|
*/
|
|
14
6
|
_id?: string;
|
|
15
|
-
/** The
|
|
7
|
+
/** The document payload. */
|
|
16
8
|
data?: Record<string, any> | null;
|
|
17
9
|
}
|
|
10
|
+
interface SearchRequest$1 {
|
|
11
|
+
/** Search query and aggregation information. */
|
|
12
|
+
search: Search;
|
|
13
|
+
/** Document type to search in. */
|
|
14
|
+
documentType: DocumentType;
|
|
15
|
+
/** Language to search in. */
|
|
16
|
+
language?: string | null;
|
|
17
|
+
}
|
|
18
18
|
interface Search extends SearchPagingMethodOneOf {
|
|
19
19
|
/** Paging options to limit and skip the number of items. */
|
|
20
20
|
paging?: Paging;
|
|
@@ -32,12 +32,9 @@ interface Search extends SearchPagingMethodOneOf {
|
|
|
32
32
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
33
33
|
*/
|
|
34
34
|
sort?: Sorting[];
|
|
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$1[];
|
|
40
|
-
/**
|
|
37
|
+
/** Search information. */
|
|
41
38
|
search?: SearchDetails;
|
|
42
39
|
}
|
|
43
40
|
/** @oneof */
|
|
@@ -56,14 +53,11 @@ declare enum SortOrder {
|
|
|
56
53
|
DESC = "DESC"
|
|
57
54
|
}
|
|
58
55
|
interface Aggregation$1 extends AggregationKindOneOf {
|
|
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;
|
|
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;
|
|
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;
|
|
68
62
|
/** Aggregation name displayed in the return. */
|
|
69
63
|
name?: string | null;
|
|
@@ -74,23 +68,20 @@ interface Aggregation$1 extends AggregationKindOneOf {
|
|
|
74
68
|
}
|
|
75
69
|
/** @oneof */
|
|
76
70
|
interface AggregationKindOneOf {
|
|
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;
|
|
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;
|
|
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;
|
|
86
77
|
}
|
|
87
78
|
declare enum ScalarType {
|
|
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 {
|
|
@@ -102,7 +93,7 @@ declare enum NestedAggregationType {
|
|
|
102
93
|
}
|
|
103
94
|
interface ValueAggregation {
|
|
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 {
|
|
|
110
101
|
limit?: number | null;
|
|
111
102
|
}
|
|
112
103
|
interface ScalarAggregation {
|
|
113
|
-
/**
|
|
104
|
+
/** Type of scalar aggregation. */
|
|
114
105
|
type?: ScalarType;
|
|
115
106
|
}
|
|
116
107
|
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
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;
|
|
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;
|
|
121
112
|
/** Aggregation name displayed in the return. */
|
|
122
113
|
name?: string | null;
|
|
@@ -127,9 +118,9 @@ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
127
118
|
}
|
|
128
119
|
/** @oneof */
|
|
129
120
|
interface NestedAggregationItemKindOneOf {
|
|
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;
|
|
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;
|
|
134
125
|
}
|
|
135
126
|
declare enum AggregationType {
|
|
@@ -141,9 +132,9 @@ declare enum AggregationType {
|
|
|
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 {
|
|
146
|
-
/**
|
|
137
|
+
/** List of aggregations, where each aggregation is nested within previous one. */
|
|
147
138
|
nestedAggregations?: NestedAggregationItem[];
|
|
148
139
|
}
|
|
149
140
|
interface SearchDetails {
|
|
@@ -154,10 +145,7 @@ interface SearchDetails {
|
|
|
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 {
|
|
@@ -177,7 +165,7 @@ declare enum DocumentType {
|
|
|
177
165
|
STORES_PRODUCTS = "STORES_PRODUCTS"
|
|
178
166
|
}
|
|
179
167
|
interface SearchResponse$1 extends SearchResponsePagingOneOf {
|
|
180
|
-
/** Paging metadata
|
|
168
|
+
/** Paging metadata. */
|
|
181
169
|
pagingOffsetMetadata?: PagingMetadata;
|
|
182
170
|
/** Documents matching the search query. */
|
|
183
171
|
siteDocumentItems?: SiteDocument$1[];
|
|
@@ -186,7 +174,7 @@ interface SearchResponse$1 extends SearchResponsePagingOneOf {
|
|
|
186
174
|
}
|
|
187
175
|
/** @oneof */
|
|
188
176
|
interface SearchResponsePagingOneOf {
|
|
189
|
-
/** Paging metadata
|
|
177
|
+
/** Paging metadata. */
|
|
190
178
|
pagingOffsetMetadata?: PagingMetadata;
|
|
191
179
|
}
|
|
192
180
|
interface AggregationData {
|
|
@@ -194,24 +182,25 @@ interface AggregationData {
|
|
|
194
182
|
results?: AggregationResults[];
|
|
195
183
|
}
|
|
196
184
|
interface ValueAggregationResult {
|
|
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 {
|
|
202
|
-
/** List of value
|
|
191
|
+
/** List of value aggregation results. */
|
|
203
192
|
results?: ValueAggregationResult[];
|
|
204
193
|
}
|
|
205
194
|
interface AggregationResultsScalarResult {
|
|
206
|
-
/** Type of scalar aggregation */
|
|
195
|
+
/** Type of scalar aggregation. */
|
|
207
196
|
type?: ScalarType;
|
|
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 {
|
|
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 {
|
|
@@ -232,7 +221,7 @@ interface NestedResultValueResultOneOf {
|
|
|
232
221
|
scalar?: ScalarResult;
|
|
233
222
|
}
|
|
234
223
|
interface Results {
|
|
235
|
-
/**
|
|
224
|
+
/** Aggregation results. */
|
|
236
225
|
results?: Record<string, NestedResultValue>;
|
|
237
226
|
}
|
|
238
227
|
/**
|
|
@@ -273,7 +262,7 @@ interface PagingMetadata {
|
|
|
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 {
|
|
@@ -343,9 +332,12 @@ declare global {
|
|
|
343
332
|
}
|
|
344
333
|
}
|
|
345
334
|
|
|
335
|
+
declare function search$3(httpClient: HttpClient): (search: Search, documentType: DocumentType, options?: SearchOptions$1) => Promise<SearchResponse$1 & SearchResponseNonNullableFields$1>;
|
|
336
|
+
|
|
346
337
|
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
347
338
|
|
|
348
|
-
|
|
339
|
+
type _publicSearchType$1 = typeof search$3;
|
|
340
|
+
declare const search$2: ReturnType<typeof createRESTModule$1<_publicSearchType>>;
|
|
349
341
|
|
|
350
342
|
type index_d$1_AggregationData = AggregationData;
|
|
351
343
|
type index_d$1_AggregationKindOneOf = AggregationKindOneOf;
|
|
@@ -383,7 +375,7 @@ type index_d$1_ValueAggregationResult = ValueAggregationResult;
|
|
|
383
375
|
type index_d$1_ValueResult = ValueResult;
|
|
384
376
|
type index_d$1_ValueResults = ValueResults;
|
|
385
377
|
declare namespace index_d$1 {
|
|
386
|
-
export { type Aggregation$1 as Aggregation, type index_d$1_AggregationData as AggregationData, type index_d$1_AggregationKindOneOf as AggregationKindOneOf, type index_d$1_AggregationResults as AggregationResults, type index_d$1_AggregationResultsResultOneOf as AggregationResultsResultOneOf, type index_d$1_AggregationResultsScalarResult as AggregationResultsScalarResult, index_d$1_AggregationType as AggregationType, index_d$1_DocumentType as DocumentType, type index_d$1_NestedAggregation as NestedAggregation, type index_d$1_NestedAggregationItem as NestedAggregationItem, type index_d$1_NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOf, index_d$1_NestedAggregationType as NestedAggregationType, type index_d$1_NestedResultValue as NestedResultValue, type index_d$1_NestedResultValueResultOneOf as NestedResultValueResultOneOf, type index_d$1_NestedResults as NestedResults, type index_d$1_Paging as Paging, type index_d$1_PagingMetadata as PagingMetadata, type index_d$1_Results as Results, type index_d$1_ScalarAggregation as ScalarAggregation, type index_d$1_ScalarResult as ScalarResult, index_d$1_ScalarType as ScalarType, type index_d$1_Search as Search, type index_d$1_SearchDetails as SearchDetails, type SearchOptions$1 as SearchOptions, type index_d$1_SearchPagingMethodOneOf as SearchPagingMethodOneOf, type SearchRequest$1 as SearchRequest, type SearchResponse$1 as SearchResponse, type SearchResponseNonNullableFields$1 as SearchResponseNonNullableFields, type index_d$1_SearchResponsePagingOneOf as SearchResponsePagingOneOf, type SiteDocument$1 as SiteDocument, index_d$1_SortOrder as SortOrder, type index_d$1_Sorting as Sorting, type index_d$1_ValueAggregation as ValueAggregation, type index_d$1_ValueAggregationResult as ValueAggregationResult, type index_d$1_ValueResult as ValueResult, type index_d$1_ValueResults as ValueResults,
|
|
378
|
+
export { type Aggregation$1 as Aggregation, type index_d$1_AggregationData as AggregationData, type index_d$1_AggregationKindOneOf as AggregationKindOneOf, type index_d$1_AggregationResults as AggregationResults, type index_d$1_AggregationResultsResultOneOf as AggregationResultsResultOneOf, type index_d$1_AggregationResultsScalarResult as AggregationResultsScalarResult, index_d$1_AggregationType as AggregationType, index_d$1_DocumentType as DocumentType, type index_d$1_NestedAggregation as NestedAggregation, type index_d$1_NestedAggregationItem as NestedAggregationItem, type index_d$1_NestedAggregationItemKindOneOf as NestedAggregationItemKindOneOf, index_d$1_NestedAggregationType as NestedAggregationType, type index_d$1_NestedResultValue as NestedResultValue, type index_d$1_NestedResultValueResultOneOf as NestedResultValueResultOneOf, type index_d$1_NestedResults as NestedResults, type index_d$1_Paging as Paging, type index_d$1_PagingMetadata as PagingMetadata, type index_d$1_Results as Results, type index_d$1_ScalarAggregation as ScalarAggregation, type index_d$1_ScalarResult as ScalarResult, index_d$1_ScalarType as ScalarType, type index_d$1_Search as Search, type index_d$1_SearchDetails as SearchDetails, type SearchOptions$1 as SearchOptions, type index_d$1_SearchPagingMethodOneOf as SearchPagingMethodOneOf, type SearchRequest$1 as SearchRequest, type SearchResponse$1 as SearchResponse, type SearchResponseNonNullableFields$1 as SearchResponseNonNullableFields, type index_d$1_SearchResponsePagingOneOf as SearchResponsePagingOneOf, type SiteDocument$1 as SiteDocument, index_d$1_SortOrder as SortOrder, type index_d$1_Sorting as Sorting, type index_d$1_ValueAggregation as ValueAggregation, type index_d$1_ValueAggregationResult as ValueAggregationResult, type index_d$1_ValueResult as ValueResult, type index_d$1_ValueResults as ValueResults, type _publicSearchType$1 as _publicSearchType, search$2 as search };
|
|
387
379
|
}
|
|
388
380
|
|
|
389
381
|
/** API is not yet fully migrated to FQDN entity */
|
|
@@ -1188,16 +1180,33 @@ interface TrendingOptions {
|
|
|
1188
1180
|
includeSeoHidden?: boolean | null;
|
|
1189
1181
|
}
|
|
1190
1182
|
|
|
1183
|
+
declare function search$1(httpClient: HttpClient): (options?: SearchOptions) => Promise<SearchResponse & SearchResponseNonNullableFields>;
|
|
1184
|
+
declare function federatedSearch$1(httpClient: HttpClient): (options?: FederatedSearchOptions) => Promise<FederatedSearchResponse & FederatedSearchResponseNonNullableFields>;
|
|
1185
|
+
declare function suggest$1(httpClient: HttpClient): (options?: SuggestOptions) => Promise<SuggestResponse>;
|
|
1186
|
+
declare function federatedSuggest$1(httpClient: HttpClient): (options?: FederatedSuggestOptions) => Promise<FederatedSuggestResponse>;
|
|
1187
|
+
declare function related$1(httpClient: HttpClient): (options?: RelatedOptions) => Promise<RelatedResponse>;
|
|
1188
|
+
declare function autocomplete$1(httpClient: HttpClient): (options?: AutocompleteOptions) => Promise<AutocompleteResponse & AutocompleteResponseNonNullableFields>;
|
|
1189
|
+
declare function federatedAutocomplete$1(httpClient: HttpClient): (options?: FederatedAutocompleteOptions) => Promise<FederatedAutocompleteResponse & FederatedAutocompleteResponseNonNullableFields>;
|
|
1190
|
+
declare function trending$1(httpClient: HttpClient): (options?: TrendingOptions) => Promise<TrendingResponse & TrendingResponseNonNullableFields>;
|
|
1191
|
+
|
|
1191
1192
|
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
1192
1193
|
|
|
1193
|
-
|
|
1194
|
-
declare const
|
|
1195
|
-
|
|
1196
|
-
declare const
|
|
1197
|
-
|
|
1198
|
-
declare const
|
|
1199
|
-
|
|
1200
|
-
declare const
|
|
1194
|
+
type _publicSearchType = typeof search$1;
|
|
1195
|
+
declare const search: ReturnType<typeof createRESTModule<_publicSearchType>>;
|
|
1196
|
+
type _publicFederatedSearchType = typeof federatedSearch$1;
|
|
1197
|
+
declare const federatedSearch: ReturnType<typeof createRESTModule<_publicFederatedSearchType>>;
|
|
1198
|
+
type _publicSuggestType = typeof suggest$1;
|
|
1199
|
+
declare const suggest: ReturnType<typeof createRESTModule<_publicSuggestType>>;
|
|
1200
|
+
type _publicFederatedSuggestType = typeof federatedSuggest$1;
|
|
1201
|
+
declare const federatedSuggest: ReturnType<typeof createRESTModule<_publicFederatedSuggestType>>;
|
|
1202
|
+
type _publicRelatedType = typeof related$1;
|
|
1203
|
+
declare const related: ReturnType<typeof createRESTModule<_publicRelatedType>>;
|
|
1204
|
+
type _publicAutocompleteType = typeof autocomplete$1;
|
|
1205
|
+
declare const autocomplete: ReturnType<typeof createRESTModule<_publicAutocompleteType>>;
|
|
1206
|
+
type _publicFederatedAutocompleteType = typeof federatedAutocomplete$1;
|
|
1207
|
+
declare const federatedAutocomplete: ReturnType<typeof createRESTModule<_publicFederatedAutocompleteType>>;
|
|
1208
|
+
type _publicTrendingType = typeof trending$1;
|
|
1209
|
+
declare const trending: ReturnType<typeof createRESTModule<_publicTrendingType>>;
|
|
1201
1210
|
|
|
1202
1211
|
type index_d_Aggregation = Aggregation;
|
|
1203
1212
|
declare const index_d_Aggregation: typeof Aggregation;
|
|
@@ -1291,6 +1300,14 @@ type index_d_VersioningMode = VersioningMode;
|
|
|
1291
1300
|
declare const index_d_VersioningMode: typeof VersioningMode;
|
|
1292
1301
|
type index_d_WebhookIdentityType = WebhookIdentityType;
|
|
1293
1302
|
declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1303
|
+
type index_d__publicAutocompleteType = _publicAutocompleteType;
|
|
1304
|
+
type index_d__publicFederatedAutocompleteType = _publicFederatedAutocompleteType;
|
|
1305
|
+
type index_d__publicFederatedSearchType = _publicFederatedSearchType;
|
|
1306
|
+
type index_d__publicFederatedSuggestType = _publicFederatedSuggestType;
|
|
1307
|
+
type index_d__publicRelatedType = _publicRelatedType;
|
|
1308
|
+
type index_d__publicSearchType = _publicSearchType;
|
|
1309
|
+
type index_d__publicSuggestType = _publicSuggestType;
|
|
1310
|
+
type index_d__publicTrendingType = _publicTrendingType;
|
|
1294
1311
|
declare const index_d_autocomplete: typeof autocomplete;
|
|
1295
1312
|
declare const index_d_federatedAutocomplete: typeof federatedAutocomplete;
|
|
1296
1313
|
declare const index_d_federatedSearch: typeof federatedSearch;
|
|
@@ -1300,7 +1317,7 @@ declare const index_d_search: typeof search;
|
|
|
1300
1317
|
declare const index_d_suggest: typeof suggest;
|
|
1301
1318
|
declare const index_d_trending: typeof trending;
|
|
1302
1319
|
declare namespace index_d {
|
|
1303
|
-
export { index_d_Aggregation as Aggregation, type index_d_AggregationFacet as AggregationFacet, type index_d_AutocompleteOptions as AutocompleteOptions, type index_d_AutocompleteRequest as AutocompleteRequest, type index_d_AutocompleteResponse as AutocompleteResponse, type index_d_AutocompleteResponseNonNullableFields as AutocompleteResponseNonNullableFields, type index_d_AutocompleteResponseValue as AutocompleteResponseValue, type index_d_DeleteByFilterOperation as DeleteByFilterOperation, type index_d_DeleteByIdsOperation as DeleteByIdsOperation, index_d_Direction as Direction, type index_d_DocumentImage as DocumentImage, type index_d_DocumentPayload as DocumentPayload, type index_d_DocumentUpdateOperation as DocumentUpdateOperation, type index_d_Empty as Empty, index_d_Enum as Enum, type index_d_FacetClause as FacetClause, type index_d_FacetClauseClauseOneOf as FacetClauseClauseOneOf, type index_d_FacetClauses as FacetClauses, type index_d_FacetCountResponse as FacetCountResponse, type index_d_FacetsResponse as FacetsResponse, type index_d_FacetsResponseResponseOneOf as FacetsResponseResponseOneOf, type index_d_FederatedAutocompleteOptions as FederatedAutocompleteOptions, type index_d_FederatedAutocompleteRequest as FederatedAutocompleteRequest, type index_d_FederatedAutocompleteResponse as FederatedAutocompleteResponse, type index_d_FederatedAutocompleteResponseNonNullableFields as FederatedAutocompleteResponseNonNullableFields, type index_d_FederatedAutocompleteResults as FederatedAutocompleteResults, type index_d_FederatedSearchDocuments as FederatedSearchDocuments, type index_d_FederatedSearchOptions as FederatedSearchOptions, type index_d_FederatedSearchRequest as FederatedSearchRequest, type index_d_FederatedSearchResponse as FederatedSearchResponse, type index_d_FederatedSearchResponseNonNullableFields as FederatedSearchResponseNonNullableFields, type index_d_FederatedSuggestDocuments as FederatedSuggestDocuments, type index_d_FederatedSuggestOptions as FederatedSuggestOptions, type index_d_FederatedSuggestRequest as FederatedSuggestRequest, type index_d_FederatedSuggestResponse as FederatedSuggestResponse, type index_d_HierarchicalAggregationResponse as HierarchicalAggregationResponse, type index_d_HierarchicalFacet as HierarchicalFacet, type index_d_HierarchicalFacetClauseOneOf as HierarchicalFacetClauseOneOf, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_IndexDocument as IndexDocument, type index_d_InternalDocument as InternalDocument, type index_d_InternalDocumentUpdateByFilterOperation as InternalDocumentUpdateByFilterOperation, type index_d_InternalDocumentUpdateOperation as InternalDocumentUpdateOperation, type index_d_InternalUpdateExistingOperation as InternalUpdateExistingOperation, type index_d_MaxAggregationResponse as MaxAggregationResponse, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MinAggregationResponse as MinAggregationResponse, type index_d_MinMaxAggregationResponse as MinMaxAggregationResponse, type index_d_NextPageResponse as NextPageResponse, type index_d_OrderingClause as OrderingClause, type index_d_OrderingClauses as OrderingClauses, type index_d_RelatedOptions as RelatedOptions, type index_d_RelatedRequest as RelatedRequest, type index_d_RelatedResponse as RelatedResponse, type index_d_SearchOptions as SearchOptions, type index_d_SearchPaging as SearchPaging, type index_d_SearchProperty as SearchProperty, type index_d_SearchRequest as SearchRequest, type index_d_SearchResponse as SearchResponse, type index_d_SearchResponseNonNullableFields as SearchResponseNonNullableFields, type index_d_SiteDocument as SiteDocument, type index_d_SuggestOptions as SuggestOptions, type index_d_SuggestRequest as SuggestRequest, type index_d_SuggestResponse as SuggestResponse, type index_d_SumAggregationResponse as SumAggregationResponse, type index_d_TermAggregationResponse as TermAggregationResponse, type index_d_TermFacet as TermFacet, type index_d_TrendingItems as TrendingItems, type index_d_TrendingOptions as TrendingOptions, type index_d_TrendingRequest as TrendingRequest, type index_d_TrendingResponse as TrendingResponse, type index_d_TrendingResponseNonNullableFields as TrendingResponseNonNullableFields, type index_d_UpdateByFilterOperation as UpdateByFilterOperation, type index_d_UpdateDocumentsEvent as UpdateDocumentsEvent, type index_d_UpdateDocumentsEventOperationOneOf as UpdateDocumentsEventOperationOneOf, type index_d_UpdateExistingOperation as UpdateExistingOperation, type index_d_UpdateInternalDocumentsEvent as UpdateInternalDocumentsEvent, type index_d_UpdateInternalDocumentsEventOperationOneOf as UpdateInternalDocumentsEventOperationOneOf, type index_d_V1DeleteByFilterOperation as V1DeleteByFilterOperation, type index_d_V1DeleteByIdsOperation as V1DeleteByIdsOperation, type index_d_Value as Value, type index_d_VersionedDeleteByIdsOperation as VersionedDeleteByIdsOperation, type index_d_VersionedDocumentId as VersionedDocumentId, type index_d_VersionedDocumentUpdateOperation as VersionedDocumentUpdateOperation, index_d_VersioningMode as VersioningMode, index_d_WebhookIdentityType as WebhookIdentityType, index_d_autocomplete as autocomplete, index_d_federatedAutocomplete as federatedAutocomplete, index_d_federatedSearch as federatedSearch, index_d_federatedSuggest as federatedSuggest, index_d_related as related, index_d_search as search, index_d_suggest as suggest, index_d_trending as trending };
|
|
1320
|
+
export { index_d_Aggregation as Aggregation, type index_d_AggregationFacet as AggregationFacet, type index_d_AutocompleteOptions as AutocompleteOptions, type index_d_AutocompleteRequest as AutocompleteRequest, type index_d_AutocompleteResponse as AutocompleteResponse, type index_d_AutocompleteResponseNonNullableFields as AutocompleteResponseNonNullableFields, type index_d_AutocompleteResponseValue as AutocompleteResponseValue, type index_d_DeleteByFilterOperation as DeleteByFilterOperation, type index_d_DeleteByIdsOperation as DeleteByIdsOperation, index_d_Direction as Direction, type index_d_DocumentImage as DocumentImage, type index_d_DocumentPayload as DocumentPayload, type index_d_DocumentUpdateOperation as DocumentUpdateOperation, type index_d_Empty as Empty, index_d_Enum as Enum, type index_d_FacetClause as FacetClause, type index_d_FacetClauseClauseOneOf as FacetClauseClauseOneOf, type index_d_FacetClauses as FacetClauses, type index_d_FacetCountResponse as FacetCountResponse, type index_d_FacetsResponse as FacetsResponse, type index_d_FacetsResponseResponseOneOf as FacetsResponseResponseOneOf, type index_d_FederatedAutocompleteOptions as FederatedAutocompleteOptions, type index_d_FederatedAutocompleteRequest as FederatedAutocompleteRequest, type index_d_FederatedAutocompleteResponse as FederatedAutocompleteResponse, type index_d_FederatedAutocompleteResponseNonNullableFields as FederatedAutocompleteResponseNonNullableFields, type index_d_FederatedAutocompleteResults as FederatedAutocompleteResults, type index_d_FederatedSearchDocuments as FederatedSearchDocuments, type index_d_FederatedSearchOptions as FederatedSearchOptions, type index_d_FederatedSearchRequest as FederatedSearchRequest, type index_d_FederatedSearchResponse as FederatedSearchResponse, type index_d_FederatedSearchResponseNonNullableFields as FederatedSearchResponseNonNullableFields, type index_d_FederatedSuggestDocuments as FederatedSuggestDocuments, type index_d_FederatedSuggestOptions as FederatedSuggestOptions, type index_d_FederatedSuggestRequest as FederatedSuggestRequest, type index_d_FederatedSuggestResponse as FederatedSuggestResponse, type index_d_HierarchicalAggregationResponse as HierarchicalAggregationResponse, type index_d_HierarchicalFacet as HierarchicalFacet, type index_d_HierarchicalFacetClauseOneOf as HierarchicalFacetClauseOneOf, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_IndexDocument as IndexDocument, type index_d_InternalDocument as InternalDocument, type index_d_InternalDocumentUpdateByFilterOperation as InternalDocumentUpdateByFilterOperation, type index_d_InternalDocumentUpdateOperation as InternalDocumentUpdateOperation, type index_d_InternalUpdateExistingOperation as InternalUpdateExistingOperation, type index_d_MaxAggregationResponse as MaxAggregationResponse, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MinAggregationResponse as MinAggregationResponse, type index_d_MinMaxAggregationResponse as MinMaxAggregationResponse, type index_d_NextPageResponse as NextPageResponse, type index_d_OrderingClause as OrderingClause, type index_d_OrderingClauses as OrderingClauses, type index_d_RelatedOptions as RelatedOptions, type index_d_RelatedRequest as RelatedRequest, type index_d_RelatedResponse as RelatedResponse, type index_d_SearchOptions as SearchOptions, type index_d_SearchPaging as SearchPaging, type index_d_SearchProperty as SearchProperty, type index_d_SearchRequest as SearchRequest, type index_d_SearchResponse as SearchResponse, type index_d_SearchResponseNonNullableFields as SearchResponseNonNullableFields, type index_d_SiteDocument as SiteDocument, type index_d_SuggestOptions as SuggestOptions, type index_d_SuggestRequest as SuggestRequest, type index_d_SuggestResponse as SuggestResponse, type index_d_SumAggregationResponse as SumAggregationResponse, type index_d_TermAggregationResponse as TermAggregationResponse, type index_d_TermFacet as TermFacet, type index_d_TrendingItems as TrendingItems, type index_d_TrendingOptions as TrendingOptions, type index_d_TrendingRequest as TrendingRequest, type index_d_TrendingResponse as TrendingResponse, type index_d_TrendingResponseNonNullableFields as TrendingResponseNonNullableFields, type index_d_UpdateByFilterOperation as UpdateByFilterOperation, type index_d_UpdateDocumentsEvent as UpdateDocumentsEvent, type index_d_UpdateDocumentsEventOperationOneOf as UpdateDocumentsEventOperationOneOf, type index_d_UpdateExistingOperation as UpdateExistingOperation, type index_d_UpdateInternalDocumentsEvent as UpdateInternalDocumentsEvent, type index_d_UpdateInternalDocumentsEventOperationOneOf as UpdateInternalDocumentsEventOperationOneOf, type index_d_V1DeleteByFilterOperation as V1DeleteByFilterOperation, type index_d_V1DeleteByIdsOperation as V1DeleteByIdsOperation, type index_d_Value as Value, type index_d_VersionedDeleteByIdsOperation as VersionedDeleteByIdsOperation, type index_d_VersionedDocumentId as VersionedDocumentId, type index_d_VersionedDocumentUpdateOperation as VersionedDocumentUpdateOperation, index_d_VersioningMode as VersioningMode, index_d_WebhookIdentityType as WebhookIdentityType, type index_d__publicAutocompleteType as _publicAutocompleteType, type index_d__publicFederatedAutocompleteType as _publicFederatedAutocompleteType, type index_d__publicFederatedSearchType as _publicFederatedSearchType, type index_d__publicFederatedSuggestType as _publicFederatedSuggestType, type index_d__publicRelatedType as _publicRelatedType, type index_d__publicSearchType as _publicSearchType, type index_d__publicSuggestType as _publicSuggestType, type index_d__publicTrendingType as _publicTrendingType, index_d_autocomplete as autocomplete, index_d_federatedAutocomplete as federatedAutocomplete, index_d_federatedSearch as federatedSearch, index_d_federatedSuggest as federatedSuggest, index_d_related as related, index_d_search as search, index_d_suggest as suggest, index_d_trending as trending };
|
|
1304
1321
|
}
|
|
1305
1322
|
|
|
1306
1323
|
export { index_d as siteSearch, index_d$1 as wixSiteSearch };
|
|
@@ -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 {
|