@wix/search 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -5
- package/type-bundles/context.bundle.d.ts +310 -58
- package/type-bundles/index.bundle.d.ts +262 -60
- package/type-bundles/meta.bundle.d.ts +573 -109
|
@@ -1,32 +1,48 @@
|
|
|
1
1
|
interface SiteDocument$1 {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Results ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
3
6
|
_id?: string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
7
|
+
/** The docuement payload. */
|
|
8
|
+
data?: Record<string, any> | null;
|
|
6
9
|
}
|
|
7
10
|
interface SearchRequest$1 {
|
|
8
|
-
/** Search query */
|
|
11
|
+
/** Search query and aggregation information. */
|
|
9
12
|
search: Search;
|
|
10
|
-
/** Document type of documents to search
|
|
13
|
+
/** Document type of the documents to search in. */
|
|
11
14
|
documentType: DocumentType;
|
|
12
15
|
/** Language to search in. */
|
|
13
16
|
language?: string | null;
|
|
14
17
|
}
|
|
15
18
|
interface Search extends SearchPagingMethodOneOf {
|
|
16
|
-
/**
|
|
19
|
+
/** Paging options to limit and skip the number of items. */
|
|
17
20
|
paging?: Paging;
|
|
18
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Filter object in the following format:
|
|
23
|
+
* `"filter" : {
|
|
24
|
+
* "fieldName1": "value1",
|
|
25
|
+
* "fieldName2":{"$operator":"value2"}
|
|
26
|
+
* }`
|
|
27
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
28
|
+
*/
|
|
19
29
|
filter?: Record<string, any> | null;
|
|
20
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Sort object in the following format:
|
|
32
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
33
|
+
*/
|
|
21
34
|
sort?: Sorting[];
|
|
22
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* A search method for grouping data into various categories (facets) and providing summaries for each category.
|
|
37
|
+
* For example, use aggregations to allow site visitors to narrow down their search results by selecting specific categories such as price ranges, brand names, and ratings.
|
|
38
|
+
*/
|
|
23
39
|
aggregations?: Aggregation$1[];
|
|
24
|
-
/** Free text to match in searchable fields */
|
|
40
|
+
/** Free text to match in searchable fields. */
|
|
25
41
|
search?: SearchDetails;
|
|
26
42
|
}
|
|
27
43
|
/** @oneof */
|
|
28
44
|
interface SearchPagingMethodOneOf {
|
|
29
|
-
/**
|
|
45
|
+
/** Paging options to limit and skip the number of items. */
|
|
30
46
|
paging?: Paging;
|
|
31
47
|
}
|
|
32
48
|
interface Sorting {
|
|
@@ -40,26 +56,32 @@ declare enum SortOrder {
|
|
|
40
56
|
DESC = "DESC"
|
|
41
57
|
}
|
|
42
58
|
interface Aggregation$1 extends AggregationKindOneOf {
|
|
43
|
-
/**
|
|
59
|
+
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
44
60
|
value?: ValueAggregation;
|
|
45
|
-
/**
|
|
61
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
46
62
|
scalar?: ScalarAggregation;
|
|
47
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
65
|
+
* For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
|
|
66
|
+
*/
|
|
48
67
|
nested?: NestedAggregation;
|
|
49
|
-
/**
|
|
68
|
+
/** Aggregation name displayed in the return. */
|
|
50
69
|
name?: string | null;
|
|
51
|
-
/** Type of aggregation
|
|
70
|
+
/** Type of aggregation to perform. */
|
|
52
71
|
type?: AggregationType;
|
|
53
|
-
/** Field to aggregate by
|
|
72
|
+
/** Field to aggregate by. */
|
|
54
73
|
fieldPath?: string;
|
|
55
74
|
}
|
|
56
75
|
/** @oneof */
|
|
57
76
|
interface AggregationKindOneOf {
|
|
58
|
-
/**
|
|
77
|
+
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
59
78
|
value?: ValueAggregation;
|
|
60
|
-
/**
|
|
79
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
61
80
|
scalar?: ScalarAggregation;
|
|
62
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
83
|
+
* For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on `discountedPriceNumeric`, and a second value aggregation on `inStock`.
|
|
84
|
+
*/
|
|
63
85
|
nested?: NestedAggregation;
|
|
64
86
|
}
|
|
65
87
|
declare enum ScalarType {
|
|
@@ -79,30 +101,35 @@ declare enum NestedAggregationType {
|
|
|
79
101
|
SCALAR = "SCALAR"
|
|
80
102
|
}
|
|
81
103
|
interface ValueAggregation {
|
|
82
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Number of aggregation results to return.
|
|
106
|
+
* Min: `1`
|
|
107
|
+
* Max: `250`
|
|
108
|
+
* Default: `10`
|
|
109
|
+
*/
|
|
83
110
|
limit?: number | null;
|
|
84
111
|
}
|
|
85
112
|
interface ScalarAggregation {
|
|
86
|
-
/**
|
|
113
|
+
/** Operation type for the scalar aggregation. */
|
|
87
114
|
type?: ScalarType;
|
|
88
115
|
}
|
|
89
116
|
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
90
|
-
/**
|
|
117
|
+
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
91
118
|
value?: ValueAggregation;
|
|
92
|
-
/**
|
|
119
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
93
120
|
scalar?: ScalarAggregation;
|
|
94
|
-
/**
|
|
121
|
+
/** Aggregation name displayed in the return. */
|
|
95
122
|
name?: string | null;
|
|
96
|
-
/** Type of aggregation
|
|
123
|
+
/** Type of aggregation to perform. */
|
|
97
124
|
type?: NestedAggregationType;
|
|
98
|
-
/** Field to aggregate by
|
|
125
|
+
/** Field to aggregate by. */
|
|
99
126
|
fieldPath?: string;
|
|
100
127
|
}
|
|
101
128
|
/** @oneof */
|
|
102
129
|
interface NestedAggregationItemKindOneOf {
|
|
103
|
-
/**
|
|
130
|
+
/** A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */
|
|
104
131
|
value?: ValueAggregation;
|
|
105
|
-
/**
|
|
132
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in the store. */
|
|
106
133
|
scalar?: ScalarAggregation;
|
|
107
134
|
}
|
|
108
135
|
declare enum AggregationType {
|
|
@@ -116,15 +143,21 @@ declare enum AggregationType {
|
|
|
116
143
|
}
|
|
117
144
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
118
145
|
interface NestedAggregation {
|
|
119
|
-
/** Flattened list of aggregations, where each
|
|
146
|
+
/** Flattened list of aggregations, where each aggregation is nested within previous one. */
|
|
120
147
|
nestedAggregations?: NestedAggregationItem[];
|
|
121
148
|
}
|
|
122
149
|
interface SearchDetails {
|
|
123
|
-
/** Search term or expression */
|
|
150
|
+
/** Search term or expression. */
|
|
124
151
|
expression?: string | null;
|
|
125
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* Fields to search in.
|
|
154
|
+
* If the array is empty, all fields are searched.
|
|
155
|
+
*/
|
|
126
156
|
fields?: string[];
|
|
127
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.
|
|
159
|
+
* The search function uses an algorithm to find results that are close to what the site visitor typed.
|
|
160
|
+
*/
|
|
128
161
|
fuzzy?: boolean;
|
|
129
162
|
}
|
|
130
163
|
interface Paging {
|
|
@@ -146,9 +179,9 @@ declare enum DocumentType {
|
|
|
146
179
|
interface SearchResponse$1 extends SearchResponsePagingOneOf {
|
|
147
180
|
/** Paging metadata for the next page of results. */
|
|
148
181
|
pagingOffsetMetadata?: PagingMetadata;
|
|
149
|
-
/** Documents matching
|
|
150
|
-
|
|
151
|
-
/**
|
|
182
|
+
/** Documents matching the search query. */
|
|
183
|
+
siteDocumentItems?: SiteDocument$1[];
|
|
184
|
+
/** Aggregated data. */
|
|
152
185
|
aggregationData?: AggregationData;
|
|
153
186
|
}
|
|
154
187
|
/** @oneof */
|
|
@@ -157,7 +190,7 @@ interface SearchResponsePagingOneOf {
|
|
|
157
190
|
pagingOffsetMetadata?: PagingMetadata;
|
|
158
191
|
}
|
|
159
192
|
interface AggregationData {
|
|
160
|
-
/**
|
|
193
|
+
/** List of the aggregated data results. */
|
|
161
194
|
results?: AggregationResults[];
|
|
162
195
|
}
|
|
163
196
|
interface ValueAggregationResult {
|
|
@@ -182,24 +215,24 @@ interface ValueResult {
|
|
|
182
215
|
count?: number | null;
|
|
183
216
|
}
|
|
184
217
|
interface ScalarResult {
|
|
185
|
-
/**
|
|
218
|
+
/** Scalar aggregation results. */
|
|
186
219
|
value?: number;
|
|
187
220
|
}
|
|
188
221
|
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
189
|
-
/** Value aggregation
|
|
222
|
+
/** Value aggregation results. */
|
|
190
223
|
value?: ValueResult;
|
|
191
|
-
/** Scalar aggregation
|
|
224
|
+
/** Scalar aggregation results. */
|
|
192
225
|
scalar?: ScalarResult;
|
|
193
226
|
}
|
|
194
227
|
/** @oneof */
|
|
195
228
|
interface NestedResultValueResultOneOf {
|
|
196
|
-
/** Value aggregation
|
|
229
|
+
/** Value aggregation results. */
|
|
197
230
|
value?: ValueResult;
|
|
198
|
-
/** Scalar aggregation
|
|
231
|
+
/** Scalar aggregation results. */
|
|
199
232
|
scalar?: ScalarResult;
|
|
200
233
|
}
|
|
201
234
|
interface Results {
|
|
202
|
-
/** List of nested
|
|
235
|
+
/** List of nested aggregation results. */
|
|
203
236
|
results?: Record<string, NestedResultValue>;
|
|
204
237
|
}
|
|
205
238
|
/**
|
|
@@ -207,30 +240,30 @@ interface Results {
|
|
|
207
240
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
208
241
|
*/
|
|
209
242
|
interface NestedResults {
|
|
210
|
-
/** List of nested
|
|
243
|
+
/** List of nested aggregation results. */
|
|
211
244
|
results?: Results[];
|
|
212
245
|
}
|
|
213
246
|
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
214
|
-
/** Value aggregation results */
|
|
247
|
+
/** Value aggregation results. */
|
|
215
248
|
values?: ValueResults;
|
|
216
|
-
/** Scalar aggregation results */
|
|
249
|
+
/** Scalar aggregation results. */
|
|
217
250
|
scalar?: AggregationResultsScalarResult;
|
|
218
|
-
/** Nested aggregation results */
|
|
251
|
+
/** Nested aggregation results. */
|
|
219
252
|
nested?: NestedResults;
|
|
220
|
-
/**
|
|
253
|
+
/** Aggregation name defined in the request. */
|
|
221
254
|
name?: string;
|
|
222
|
-
/** Type of aggregation that
|
|
255
|
+
/** Type of aggregation that was performed. */
|
|
223
256
|
type?: AggregationType;
|
|
224
|
-
/** Field
|
|
257
|
+
/** Field the data was aggregated by. */
|
|
225
258
|
fieldPath?: string;
|
|
226
259
|
}
|
|
227
260
|
/** @oneof */
|
|
228
261
|
interface AggregationResultsResultOneOf {
|
|
229
|
-
/** Value aggregation results */
|
|
262
|
+
/** Value aggregation results. */
|
|
230
263
|
values?: ValueResults;
|
|
231
|
-
/** Scalar aggregation results */
|
|
264
|
+
/** Scalar aggregation results. */
|
|
232
265
|
scalar?: AggregationResultsScalarResult;
|
|
233
|
-
/** Nested aggregation results */
|
|
266
|
+
/** Nested aggregation results. */
|
|
234
267
|
nested?: NestedResults;
|
|
235
268
|
}
|
|
236
269
|
interface PagingMetadata {
|
|
@@ -244,7 +277,7 @@ interface PagingMetadata {
|
|
|
244
277
|
tooManyToCount?: boolean | null;
|
|
245
278
|
}
|
|
246
279
|
interface SearchResponseNonNullableFields$1 {
|
|
247
|
-
|
|
280
|
+
siteDocumentItems: {
|
|
248
281
|
_id: string;
|
|
249
282
|
}[];
|
|
250
283
|
aggregationData?: {
|
|
@@ -278,14 +311,13 @@ interface SearchResponseNonNullableFields$1 {
|
|
|
278
311
|
};
|
|
279
312
|
}
|
|
280
313
|
interface SearchOptions$1 {
|
|
281
|
-
/**
|
|
282
|
-
|
|
283
|
-
/** Language to search in. */
|
|
284
|
-
language?: string | null;
|
|
314
|
+
/** Search query and aggregation information. */
|
|
315
|
+
search: Search;
|
|
285
316
|
}
|
|
286
317
|
|
|
287
318
|
interface HttpClient {
|
|
288
319
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
320
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
289
321
|
}
|
|
290
322
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
291
323
|
type HttpResponse<T = any> = {
|
|
@@ -307,10 +339,17 @@ type APIMetadata = {
|
|
|
307
339
|
packageName?: string;
|
|
308
340
|
};
|
|
309
341
|
|
|
342
|
+
declare global {
|
|
343
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
344
|
+
interface SymbolConstructor {
|
|
345
|
+
readonly observable: symbol;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
310
349
|
declare const __metadata$1: {
|
|
311
350
|
PACKAGE_NAME: string;
|
|
312
351
|
};
|
|
313
|
-
declare function search$1(httpClient: HttpClient): (
|
|
352
|
+
declare function search$1(httpClient: HttpClient): (documentType: DocumentType, language: string | null, options: SearchOptions$1) => Promise<SearchResponse$1 & SearchResponseNonNullableFields$1>;
|
|
314
353
|
|
|
315
354
|
type index_d$1_AggregationData = AggregationData;
|
|
316
355
|
type index_d$1_AggregationKindOneOf = AggregationKindOneOf;
|
|
@@ -977,6 +1016,31 @@ interface SearchResponseNonNullableFields {
|
|
|
977
1016
|
};
|
|
978
1017
|
}[];
|
|
979
1018
|
}
|
|
1019
|
+
interface FederatedSearchResponseNonNullableFields {
|
|
1020
|
+
results: {
|
|
1021
|
+
total: number;
|
|
1022
|
+
}[];
|
|
1023
|
+
}
|
|
1024
|
+
interface FederatedSuggestResponseNonNullableFields {
|
|
1025
|
+
results: FederatedSuggestDocuments[];
|
|
1026
|
+
}
|
|
1027
|
+
interface AutocompleteResponseNonNullableFields {
|
|
1028
|
+
values: {
|
|
1029
|
+
query: string;
|
|
1030
|
+
}[];
|
|
1031
|
+
}
|
|
1032
|
+
interface FederatedAutocompleteResponseNonNullableFields {
|
|
1033
|
+
results: {
|
|
1034
|
+
values: {
|
|
1035
|
+
query: string;
|
|
1036
|
+
}[];
|
|
1037
|
+
}[];
|
|
1038
|
+
}
|
|
1039
|
+
interface TrendingResponseNonNullableFields {
|
|
1040
|
+
results: {
|
|
1041
|
+
documentType: string;
|
|
1042
|
+
}[];
|
|
1043
|
+
}
|
|
980
1044
|
interface SearchOptions {
|
|
981
1045
|
/** Text to search for. All searchable fields will be searched. */
|
|
982
1046
|
query?: string | null;
|
|
@@ -1005,17 +1069,138 @@ interface SearchOptions {
|
|
|
1005
1069
|
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1006
1070
|
includeSeoHidden?: boolean | null;
|
|
1007
1071
|
}
|
|
1072
|
+
interface FederatedSearchOptions {
|
|
1073
|
+
/** Query phrase to use. */
|
|
1074
|
+
query?: string | null;
|
|
1075
|
+
/** Language to search in. */
|
|
1076
|
+
language?: string | null;
|
|
1077
|
+
/** Limit of documents to return per document type. */
|
|
1078
|
+
limit?: number | null;
|
|
1079
|
+
/** Enable fuzzy search (for example query 'kalvin clein' will match document with 'calvin klein' in title). */
|
|
1080
|
+
fuzzy?: boolean | null;
|
|
1081
|
+
/** Highlight texts matching the query. Highlighted text will be wrapped with <mark/> tag. Defaults to true if not provided. */
|
|
1082
|
+
highlight?: boolean | null;
|
|
1083
|
+
/** Searchable fields to search in. If not provided, search is executed on all searchable fields in schemas */
|
|
1084
|
+
searchFields?: string[];
|
|
1085
|
+
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
1086
|
+
documentTypes?: string[];
|
|
1087
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1088
|
+
includeSeoHidden?: boolean | null;
|
|
1089
|
+
}
|
|
1090
|
+
interface SuggestOptions {
|
|
1091
|
+
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
1092
|
+
query?: string | null;
|
|
1093
|
+
/** Document type of documents to search for. All document types are searched if not provided. */
|
|
1094
|
+
documentType?: string | null;
|
|
1095
|
+
/** Fields to order by. */
|
|
1096
|
+
ordering?: OrderingClauses;
|
|
1097
|
+
/** Number of suggested document to return. */
|
|
1098
|
+
limit?: number;
|
|
1099
|
+
/** Language to search in. */
|
|
1100
|
+
language?: string | null;
|
|
1101
|
+
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */
|
|
1102
|
+
filter?: Record<string, any> | null;
|
|
1103
|
+
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schema */
|
|
1104
|
+
searchFields?: string[];
|
|
1105
|
+
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
1106
|
+
fields?: string[];
|
|
1107
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1108
|
+
includeSeoHidden?: boolean | null;
|
|
1109
|
+
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
1110
|
+
properties?: SearchProperty[];
|
|
1111
|
+
}
|
|
1112
|
+
interface FederatedSuggestOptions {
|
|
1113
|
+
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
1114
|
+
query?: string | null;
|
|
1115
|
+
/** Language to search in. */
|
|
1116
|
+
language?: string | null;
|
|
1117
|
+
/** Number of suggested document to return per document type. */
|
|
1118
|
+
limit?: number;
|
|
1119
|
+
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schemas */
|
|
1120
|
+
searchFields?: string[];
|
|
1121
|
+
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
1122
|
+
documentTypes?: string[];
|
|
1123
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1124
|
+
includeSeoHidden?: boolean | null;
|
|
1125
|
+
}
|
|
1126
|
+
interface RelatedOptions {
|
|
1127
|
+
/** ID of the document to fetch related documents for. */
|
|
1128
|
+
documentId?: string | null;
|
|
1129
|
+
/** Document type of the document. */
|
|
1130
|
+
documentType?: string | null;
|
|
1131
|
+
/** Fields to order by. */
|
|
1132
|
+
ordering?: OrderingClauses;
|
|
1133
|
+
/** Language to search in. */
|
|
1134
|
+
language?: string | null;
|
|
1135
|
+
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}). */
|
|
1136
|
+
filter?: Record<string, any> | null;
|
|
1137
|
+
/** Searchable fields to compare documents by. If not provided, all searchable fields in schema are used */
|
|
1138
|
+
searchFields?: string[];
|
|
1139
|
+
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
1140
|
+
fields?: string[];
|
|
1141
|
+
/** Number of related documents to return */
|
|
1142
|
+
limit?: number;
|
|
1143
|
+
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
1144
|
+
properties?: SearchProperty[];
|
|
1145
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1146
|
+
includeSeoHidden?: boolean | null;
|
|
1147
|
+
}
|
|
1148
|
+
interface AutocompleteOptions {
|
|
1149
|
+
/** Query phrase to fetch completions for. */
|
|
1150
|
+
query?: string | null;
|
|
1151
|
+
/** Document type to use to search for phrases. */
|
|
1152
|
+
documentType?: string | null;
|
|
1153
|
+
/** Limit of phrases to fetch. */
|
|
1154
|
+
limit?: number;
|
|
1155
|
+
/** Language to search in. */
|
|
1156
|
+
language?: string | null;
|
|
1157
|
+
/** Filter in platfromized query language (for example {'field': {'$eq': 'value'}}) */
|
|
1158
|
+
filter?: Record<string, any> | null;
|
|
1159
|
+
/** Searchable fields to use for query completion. If not provided, all searchable fields in schema are used */
|
|
1160
|
+
searchFields?: string[];
|
|
1161
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1162
|
+
includeSeoHidden?: boolean | null;
|
|
1163
|
+
}
|
|
1164
|
+
interface FederatedAutocompleteOptions {
|
|
1165
|
+
/** Query phrase to fetch completions for. */
|
|
1166
|
+
query?: string | null;
|
|
1167
|
+
/** Language to search in. */
|
|
1168
|
+
language?: string | null;
|
|
1169
|
+
/** Number of queries to return per document type. */
|
|
1170
|
+
limit?: number;
|
|
1171
|
+
/** Searchable fields to search in. If not provided, search is executed on all autocompletable fields in schemas */
|
|
1172
|
+
searchFields?: string[];
|
|
1173
|
+
/** Document types to autocomplete in. If not provided, autocomplete is executed on all document types enabled for the site */
|
|
1174
|
+
documentTypes?: string[];
|
|
1175
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1176
|
+
includeSeoHidden?: boolean | null;
|
|
1177
|
+
}
|
|
1178
|
+
interface TrendingOptions {
|
|
1179
|
+
documentTypes?: string[];
|
|
1180
|
+
language?: string | null;
|
|
1181
|
+
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
1182
|
+
includeSeoHidden?: boolean | null;
|
|
1183
|
+
}
|
|
1008
1184
|
|
|
1009
1185
|
declare const __metadata: {
|
|
1010
1186
|
PACKAGE_NAME: string;
|
|
1011
1187
|
};
|
|
1012
1188
|
declare function search(httpClient: HttpClient): (options?: SearchOptions) => Promise<SearchResponse & SearchResponseNonNullableFields>;
|
|
1189
|
+
declare function federatedSearch(httpClient: HttpClient): (options?: FederatedSearchOptions) => Promise<FederatedSearchResponse & FederatedSearchResponseNonNullableFields>;
|
|
1190
|
+
declare function suggest(httpClient: HttpClient): (options?: SuggestOptions) => Promise<SuggestResponse>;
|
|
1191
|
+
declare function federatedSuggest(httpClient: HttpClient): (options?: FederatedSuggestOptions) => Promise<FederatedSuggestResponse & FederatedSuggestResponseNonNullableFields>;
|
|
1192
|
+
declare function related(httpClient: HttpClient): (options?: RelatedOptions) => Promise<RelatedResponse>;
|
|
1193
|
+
declare function autocomplete(httpClient: HttpClient): (options?: AutocompleteOptions) => Promise<AutocompleteResponse & AutocompleteResponseNonNullableFields>;
|
|
1194
|
+
declare function federatedAutocomplete(httpClient: HttpClient): (options?: FederatedAutocompleteOptions) => Promise<FederatedAutocompleteResponse & FederatedAutocompleteResponseNonNullableFields>;
|
|
1195
|
+
declare function trending(httpClient: HttpClient): (options?: TrendingOptions) => Promise<TrendingResponse & TrendingResponseNonNullableFields>;
|
|
1013
1196
|
|
|
1014
1197
|
type index_d_Aggregation = Aggregation;
|
|
1015
1198
|
declare const index_d_Aggregation: typeof Aggregation;
|
|
1016
1199
|
type index_d_AggregationFacet = AggregationFacet;
|
|
1200
|
+
type index_d_AutocompleteOptions = AutocompleteOptions;
|
|
1017
1201
|
type index_d_AutocompleteRequest = AutocompleteRequest;
|
|
1018
1202
|
type index_d_AutocompleteResponse = AutocompleteResponse;
|
|
1203
|
+
type index_d_AutocompleteResponseNonNullableFields = AutocompleteResponseNonNullableFields;
|
|
1019
1204
|
type index_d_AutocompleteResponseValue = AutocompleteResponseValue;
|
|
1020
1205
|
type index_d_DeleteByFilterOperation = DeleteByFilterOperation;
|
|
1021
1206
|
type index_d_DeleteByIdsOperation = DeleteByIdsOperation;
|
|
@@ -1033,15 +1218,21 @@ type index_d_FacetClauses = FacetClauses;
|
|
|
1033
1218
|
type index_d_FacetCountResponse = FacetCountResponse;
|
|
1034
1219
|
type index_d_FacetsResponse = FacetsResponse;
|
|
1035
1220
|
type index_d_FacetsResponseResponseOneOf = FacetsResponseResponseOneOf;
|
|
1221
|
+
type index_d_FederatedAutocompleteOptions = FederatedAutocompleteOptions;
|
|
1036
1222
|
type index_d_FederatedAutocompleteRequest = FederatedAutocompleteRequest;
|
|
1037
1223
|
type index_d_FederatedAutocompleteResponse = FederatedAutocompleteResponse;
|
|
1224
|
+
type index_d_FederatedAutocompleteResponseNonNullableFields = FederatedAutocompleteResponseNonNullableFields;
|
|
1038
1225
|
type index_d_FederatedAutocompleteResults = FederatedAutocompleteResults;
|
|
1039
1226
|
type index_d_FederatedSearchDocuments = FederatedSearchDocuments;
|
|
1227
|
+
type index_d_FederatedSearchOptions = FederatedSearchOptions;
|
|
1040
1228
|
type index_d_FederatedSearchRequest = FederatedSearchRequest;
|
|
1041
1229
|
type index_d_FederatedSearchResponse = FederatedSearchResponse;
|
|
1230
|
+
type index_d_FederatedSearchResponseNonNullableFields = FederatedSearchResponseNonNullableFields;
|
|
1042
1231
|
type index_d_FederatedSuggestDocuments = FederatedSuggestDocuments;
|
|
1232
|
+
type index_d_FederatedSuggestOptions = FederatedSuggestOptions;
|
|
1043
1233
|
type index_d_FederatedSuggestRequest = FederatedSuggestRequest;
|
|
1044
1234
|
type index_d_FederatedSuggestResponse = FederatedSuggestResponse;
|
|
1235
|
+
type index_d_FederatedSuggestResponseNonNullableFields = FederatedSuggestResponseNonNullableFields;
|
|
1045
1236
|
type index_d_HierarchicalAggregationResponse = HierarchicalAggregationResponse;
|
|
1046
1237
|
type index_d_HierarchicalFacet = HierarchicalFacet;
|
|
1047
1238
|
type index_d_HierarchicalFacetClauseOneOf = HierarchicalFacetClauseOneOf;
|
|
@@ -1059,6 +1250,7 @@ type index_d_MinMaxAggregationResponse = MinMaxAggregationResponse;
|
|
|
1059
1250
|
type index_d_NextPageResponse = NextPageResponse;
|
|
1060
1251
|
type index_d_OrderingClause = OrderingClause;
|
|
1061
1252
|
type index_d_OrderingClauses = OrderingClauses;
|
|
1253
|
+
type index_d_RelatedOptions = RelatedOptions;
|
|
1062
1254
|
type index_d_RelatedRequest = RelatedRequest;
|
|
1063
1255
|
type index_d_RelatedResponse = RelatedResponse;
|
|
1064
1256
|
type index_d_SearchOptions = SearchOptions;
|
|
@@ -1068,14 +1260,17 @@ type index_d_SearchRequest = SearchRequest;
|
|
|
1068
1260
|
type index_d_SearchResponse = SearchResponse;
|
|
1069
1261
|
type index_d_SearchResponseNonNullableFields = SearchResponseNonNullableFields;
|
|
1070
1262
|
type index_d_SiteDocument = SiteDocument;
|
|
1263
|
+
type index_d_SuggestOptions = SuggestOptions;
|
|
1071
1264
|
type index_d_SuggestRequest = SuggestRequest;
|
|
1072
1265
|
type index_d_SuggestResponse = SuggestResponse;
|
|
1073
1266
|
type index_d_SumAggregationResponse = SumAggregationResponse;
|
|
1074
1267
|
type index_d_TermAggregationResponse = TermAggregationResponse;
|
|
1075
1268
|
type index_d_TermFacet = TermFacet;
|
|
1076
1269
|
type index_d_TrendingItems = TrendingItems;
|
|
1270
|
+
type index_d_TrendingOptions = TrendingOptions;
|
|
1077
1271
|
type index_d_TrendingRequest = TrendingRequest;
|
|
1078
1272
|
type index_d_TrendingResponse = TrendingResponse;
|
|
1273
|
+
type index_d_TrendingResponseNonNullableFields = TrendingResponseNonNullableFields;
|
|
1079
1274
|
type index_d_UpdateByFilterOperation = UpdateByFilterOperation;
|
|
1080
1275
|
type index_d_UpdateDocumentsEvent = UpdateDocumentsEvent;
|
|
1081
1276
|
type index_d_UpdateDocumentsEventOperationOneOf = UpdateDocumentsEventOperationOneOf;
|
|
@@ -1093,9 +1288,16 @@ declare const index_d_VersioningMode: typeof VersioningMode;
|
|
|
1093
1288
|
type index_d_WebhookIdentityType = WebhookIdentityType;
|
|
1094
1289
|
declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1095
1290
|
declare const index_d___metadata: typeof __metadata;
|
|
1291
|
+
declare const index_d_autocomplete: typeof autocomplete;
|
|
1292
|
+
declare const index_d_federatedAutocomplete: typeof federatedAutocomplete;
|
|
1293
|
+
declare const index_d_federatedSearch: typeof federatedSearch;
|
|
1294
|
+
declare const index_d_federatedSuggest: typeof federatedSuggest;
|
|
1295
|
+
declare const index_d_related: typeof related;
|
|
1096
1296
|
declare const index_d_search: typeof search;
|
|
1297
|
+
declare const index_d_suggest: typeof suggest;
|
|
1298
|
+
declare const index_d_trending: typeof trending;
|
|
1097
1299
|
declare namespace index_d {
|
|
1098
|
-
export { index_d_Aggregation as Aggregation, type index_d_AggregationFacet as AggregationFacet, type index_d_AutocompleteRequest as AutocompleteRequest, type index_d_AutocompleteResponse as AutocompleteResponse, 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_FederatedAutocompleteRequest as FederatedAutocompleteRequest, type index_d_FederatedAutocompleteResponse as FederatedAutocompleteResponse, type index_d_FederatedAutocompleteResults as FederatedAutocompleteResults, type index_d_FederatedSearchDocuments as FederatedSearchDocuments, type index_d_FederatedSearchRequest as FederatedSearchRequest, type index_d_FederatedSearchResponse as FederatedSearchResponse, type index_d_FederatedSuggestDocuments as FederatedSuggestDocuments, 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_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_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_TrendingRequest as TrendingRequest, type index_d_TrendingResponse as TrendingResponse, 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___metadata as __metadata, index_d_search as search };
|
|
1300
|
+
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_FederatedSuggestResponseNonNullableFields as FederatedSuggestResponseNonNullableFields, 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___metadata as __metadata, 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 };
|
|
1099
1301
|
}
|
|
1100
1302
|
|
|
1101
1303
|
export { index_d as siteSearch, index_d$1 as wixSiteSearch };
|