@wix/search 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/search-v1-sitedocument.http.d.ts +1 -24
- package/build/cjs/src/search-v1-sitedocument.http.js +1 -192
- package/build/cjs/src/search-v1-sitedocument.http.js.map +1 -1
- package/build/cjs/src/search-v1-sitedocument.public.d.ts +2 -9
- package/build/cjs/src/search-v1-sitedocument.public.js +1 -43
- package/build/cjs/src/search-v1-sitedocument.public.js.map +1 -1
- package/build/cjs/src/search-v1-sitedocument.universal.d.ts +0 -159
- package/build/cjs/src/search-v1-sitedocument.universal.js +1 -420
- package/build/cjs/src/search-v1-sitedocument.universal.js.map +1 -1
- package/build/es/src/search-v1-sitedocument.http.d.ts +1 -24
- package/build/es/src/search-v1-sitedocument.http.js +0 -184
- package/build/es/src/search-v1-sitedocument.http.js.map +1 -1
- package/build/es/src/search-v1-sitedocument.public.d.ts +2 -9
- package/build/es/src/search-v1-sitedocument.public.js +1 -36
- package/build/es/src/search-v1-sitedocument.public.js.map +1 -1
- package/build/es/src/search-v1-sitedocument.universal.d.ts +0 -159
- package/build/es/src/search-v1-sitedocument.universal.js +0 -412
- package/build/es/src/search-v1-sitedocument.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
2
|
+
import { SearchRequest, SearchResponse } from './search-v1-sitedocument.types';
|
|
3
3
|
/**
|
|
4
4
|
* Executes a regular search query.
|
|
5
5
|
* If you are unsure, this is likely the search method you want to used.
|
|
6
6
|
*/
|
|
7
7
|
export declare function search(payload: SearchRequest): RequestOptionsFactory<SearchResponse>;
|
|
8
|
-
/** Searches in multiple document types at once. */
|
|
9
|
-
export declare function federatedSearch(payload: FederatedSearchRequest): RequestOptionsFactory<FederatedSearchResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Executes search query to fetch suggested items. Unlike search query suggest will match
|
|
12
|
-
* partial phrases (for example "blu" will match documents containing "blue", "blues" and "blunt").
|
|
13
|
-
* Phrase needs to be at least 3 symbols long. Suggestions can also perform optimisations in search
|
|
14
|
-
* results and generally do not guarantee the same level of quality as regular Search endpoint.
|
|
15
|
-
*/
|
|
16
|
-
export declare function suggest(payload: SuggestRequest): RequestOptionsFactory<SuggestResponse>;
|
|
17
|
-
/** Searches for suggestions in multiple document types at once. */
|
|
18
|
-
export declare function federatedSuggest(payload: FederatedSuggestRequest): RequestOptionsFactory<FederatedSuggestResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Fetches documents similar to one single document.
|
|
21
|
-
* This is typically used to implement "related to" scenarios (for example to fetch related store products when
|
|
22
|
-
* consumer is already viewing one).
|
|
23
|
-
*/
|
|
24
|
-
export declare function related(payload: RelatedRequest): RequestOptionsFactory<RelatedResponse>;
|
|
25
|
-
/** Provides phrase completion. For example "blu" could return "blue", "blues" and "blunt" as candidate phrases. This operation is resource heavy at index time and is reserved for special use cases. */
|
|
26
|
-
export declare function autocomplete(payload: AutocompleteRequest): RequestOptionsFactory<AutocompleteResponse>;
|
|
27
|
-
/** Provides phrase completion from multiple document types at once */
|
|
28
|
-
export declare function federatedAutocomplete(payload: FederatedAutocompleteRequest): RequestOptionsFactory<FederatedAutocompleteResponse>;
|
|
29
|
-
/** Returns trending documents for given document types */
|
|
30
|
-
export declare function trending(payload: TrendingRequest): RequestOptionsFactory<TrendingResponse>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.search = void 0;
|
|
4
4
|
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
5
5
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
6
|
-
const _autocompleteRequest = {};
|
|
7
|
-
const _autocompleteResponse = {};
|
|
8
6
|
const _facetClause = { hierarchical: '_hierarchicalFacet' };
|
|
9
7
|
const _facetClauses = { clauses: '_facetClause' };
|
|
10
8
|
const _facetsResponse = {
|
|
@@ -14,12 +12,6 @@ const _facetsResponse = {
|
|
|
14
12
|
hierarchicalAggregation: '_hierarchicalAggregationResponse',
|
|
15
13
|
sumAggregation: '_sumAggregationResponse',
|
|
16
14
|
};
|
|
17
|
-
const _federatedAutocompleteRequest = {};
|
|
18
|
-
const _federatedAutocompleteResponse = {};
|
|
19
|
-
const _federatedSearchRequest = {};
|
|
20
|
-
const _federatedSearchResponse = {};
|
|
21
|
-
const _federatedSuggestRequest = {};
|
|
22
|
-
const _federatedSuggestResponse = {};
|
|
23
15
|
const _hierarchicalAggregationResponse = { values: '_value' };
|
|
24
16
|
const _hierarchicalFacet = { nestedAggregation: '_hierarchicalFacet' };
|
|
25
17
|
const _maxAggregationResponse = { maxValue: 'google.protobuf.DoubleValue' };
|
|
@@ -28,15 +20,9 @@ const _minMaxAggregationResponse = {
|
|
|
28
20
|
minValue: 'google.protobuf.DoubleValue',
|
|
29
21
|
maxValue: 'google.protobuf.DoubleValue',
|
|
30
22
|
};
|
|
31
|
-
const _relatedRequest = {};
|
|
32
|
-
const _relatedResponse = {};
|
|
33
23
|
const _searchRequest = { facets: '_facetClauses' };
|
|
34
24
|
const _searchResponse = { facets: '_facetsResponse' };
|
|
35
|
-
const _suggestRequest = {};
|
|
36
|
-
const _suggestResponse = {};
|
|
37
25
|
const _sumAggregationResponse = { value: 'google.protobuf.DoubleValue' };
|
|
38
|
-
const _trendingRequest = {};
|
|
39
|
-
const _trendingResponse = {};
|
|
40
26
|
const _value = { facets: '_facetsResponse' };
|
|
41
27
|
function resolveWixSearchV1SiteSearchServiceUrl(opts) {
|
|
42
28
|
const domainToMappings = {
|
|
@@ -136,181 +122,4 @@ function search(payload) {
|
|
|
136
122
|
return __search;
|
|
137
123
|
}
|
|
138
124
|
exports.search = search;
|
|
139
|
-
/** Searches in multiple document types at once. */
|
|
140
|
-
function federatedSearch(payload) {
|
|
141
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_federatedSearchRequest, {});
|
|
142
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_federatedSearchResponse, {});
|
|
143
|
-
function __federatedSearch({ host }) {
|
|
144
|
-
const serializedData = toReq(payload);
|
|
145
|
-
const metadata = {
|
|
146
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
147
|
-
method: 'POST',
|
|
148
|
-
methodFqn: 'wix.search.v1.SiteSearchService.FederatedSearch',
|
|
149
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
150
|
-
protoPath: '/api/v1/search/federated',
|
|
151
|
-
data: serializedData,
|
|
152
|
-
host,
|
|
153
|
-
}),
|
|
154
|
-
data: serializedData,
|
|
155
|
-
transformResponse: fromRes,
|
|
156
|
-
};
|
|
157
|
-
return metadata;
|
|
158
|
-
}
|
|
159
|
-
__federatedSearch.fromReq = fromReq;
|
|
160
|
-
return __federatedSearch;
|
|
161
|
-
}
|
|
162
|
-
exports.federatedSearch = federatedSearch;
|
|
163
|
-
/**
|
|
164
|
-
* Executes search query to fetch suggested items. Unlike search query suggest will match
|
|
165
|
-
* partial phrases (for example "blu" will match documents containing "blue", "blues" and "blunt").
|
|
166
|
-
* Phrase needs to be at least 3 symbols long. Suggestions can also perform optimisations in search
|
|
167
|
-
* results and generally do not guarantee the same level of quality as regular Search endpoint.
|
|
168
|
-
*/
|
|
169
|
-
function suggest(payload) {
|
|
170
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_suggestRequest, {});
|
|
171
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_suggestResponse, {});
|
|
172
|
-
function __suggest({ host }) {
|
|
173
|
-
const serializedData = toReq(payload);
|
|
174
|
-
const metadata = {
|
|
175
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
176
|
-
method: 'POST',
|
|
177
|
-
methodFqn: 'wix.search.v1.SiteSearchService.Suggest',
|
|
178
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
179
|
-
protoPath: '/api/v1/suggest',
|
|
180
|
-
data: serializedData,
|
|
181
|
-
host,
|
|
182
|
-
}),
|
|
183
|
-
data: serializedData,
|
|
184
|
-
transformResponse: fromRes,
|
|
185
|
-
};
|
|
186
|
-
return metadata;
|
|
187
|
-
}
|
|
188
|
-
__suggest.fromReq = fromReq;
|
|
189
|
-
return __suggest;
|
|
190
|
-
}
|
|
191
|
-
exports.suggest = suggest;
|
|
192
|
-
/** Searches for suggestions in multiple document types at once. */
|
|
193
|
-
function federatedSuggest(payload) {
|
|
194
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_federatedSuggestRequest, {});
|
|
195
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_federatedSuggestResponse, {});
|
|
196
|
-
function __federatedSuggest({ host }) {
|
|
197
|
-
const serializedData = toReq(payload);
|
|
198
|
-
const metadata = {
|
|
199
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
200
|
-
method: 'POST',
|
|
201
|
-
methodFqn: 'wix.search.v1.SiteSearchService.FederatedSuggest',
|
|
202
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
203
|
-
protoPath: '/api/v1/suggest/federated',
|
|
204
|
-
data: serializedData,
|
|
205
|
-
host,
|
|
206
|
-
}),
|
|
207
|
-
data: serializedData,
|
|
208
|
-
transformResponse: fromRes,
|
|
209
|
-
};
|
|
210
|
-
return metadata;
|
|
211
|
-
}
|
|
212
|
-
__federatedSuggest.fromReq = fromReq;
|
|
213
|
-
return __federatedSuggest;
|
|
214
|
-
}
|
|
215
|
-
exports.federatedSuggest = federatedSuggest;
|
|
216
|
-
/**
|
|
217
|
-
* Fetches documents similar to one single document.
|
|
218
|
-
* This is typically used to implement "related to" scenarios (for example to fetch related store products when
|
|
219
|
-
* consumer is already viewing one).
|
|
220
|
-
*/
|
|
221
|
-
function related(payload) {
|
|
222
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_relatedRequest, {});
|
|
223
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_relatedResponse, {});
|
|
224
|
-
function __related({ host }) {
|
|
225
|
-
const serializedData = toReq(payload);
|
|
226
|
-
const metadata = {
|
|
227
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
228
|
-
method: 'POST',
|
|
229
|
-
methodFqn: 'wix.search.v1.SiteSearchService.Related',
|
|
230
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
231
|
-
protoPath: '/api/v1/related',
|
|
232
|
-
data: serializedData,
|
|
233
|
-
host,
|
|
234
|
-
}),
|
|
235
|
-
data: serializedData,
|
|
236
|
-
transformResponse: fromRes,
|
|
237
|
-
};
|
|
238
|
-
return metadata;
|
|
239
|
-
}
|
|
240
|
-
__related.fromReq = fromReq;
|
|
241
|
-
return __related;
|
|
242
|
-
}
|
|
243
|
-
exports.related = related;
|
|
244
|
-
/** Provides phrase completion. For example "blu" could return "blue", "blues" and "blunt" as candidate phrases. This operation is resource heavy at index time and is reserved for special use cases. */
|
|
245
|
-
function autocomplete(payload) {
|
|
246
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_autocompleteRequest, {});
|
|
247
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_autocompleteResponse, {});
|
|
248
|
-
function __autocomplete({ host }) {
|
|
249
|
-
const serializedData = toReq(payload);
|
|
250
|
-
const metadata = {
|
|
251
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
252
|
-
method: 'POST',
|
|
253
|
-
methodFqn: 'wix.search.v1.SiteSearchService.Autocomplete',
|
|
254
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
255
|
-
protoPath: '/api/v1/autocomplete',
|
|
256
|
-
data: serializedData,
|
|
257
|
-
host,
|
|
258
|
-
}),
|
|
259
|
-
data: serializedData,
|
|
260
|
-
transformResponse: fromRes,
|
|
261
|
-
};
|
|
262
|
-
return metadata;
|
|
263
|
-
}
|
|
264
|
-
__autocomplete.fromReq = fromReq;
|
|
265
|
-
return __autocomplete;
|
|
266
|
-
}
|
|
267
|
-
exports.autocomplete = autocomplete;
|
|
268
|
-
/** Provides phrase completion from multiple document types at once */
|
|
269
|
-
function federatedAutocomplete(payload) {
|
|
270
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_federatedAutocompleteRequest, {});
|
|
271
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_federatedAutocompleteResponse, {});
|
|
272
|
-
function __federatedAutocomplete({ host }) {
|
|
273
|
-
const serializedData = toReq(payload);
|
|
274
|
-
const metadata = {
|
|
275
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
276
|
-
method: 'POST',
|
|
277
|
-
methodFqn: 'wix.search.v1.SiteSearchService.FederatedAutocomplete',
|
|
278
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
279
|
-
protoPath: '/api/v1/autocomplete/federated',
|
|
280
|
-
data: serializedData,
|
|
281
|
-
host,
|
|
282
|
-
}),
|
|
283
|
-
data: serializedData,
|
|
284
|
-
transformResponse: fromRes,
|
|
285
|
-
};
|
|
286
|
-
return metadata;
|
|
287
|
-
}
|
|
288
|
-
__federatedAutocomplete.fromReq = fromReq;
|
|
289
|
-
return __federatedAutocomplete;
|
|
290
|
-
}
|
|
291
|
-
exports.federatedAutocomplete = federatedAutocomplete;
|
|
292
|
-
/** Returns trending documents for given document types */
|
|
293
|
-
function trending(payload) {
|
|
294
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_trendingRequest, {});
|
|
295
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_trendingResponse, {});
|
|
296
|
-
function __trending({ host }) {
|
|
297
|
-
const serializedData = toReq(payload);
|
|
298
|
-
const metadata = {
|
|
299
|
-
entityFqdn: 'wix.search.v1.sitedocument',
|
|
300
|
-
method: 'POST',
|
|
301
|
-
methodFqn: 'wix.search.v1.SiteSearchService.Trending',
|
|
302
|
-
url: resolveWixSearchV1SiteSearchServiceUrl({
|
|
303
|
-
protoPath: '/api/v1/trending',
|
|
304
|
-
data: serializedData,
|
|
305
|
-
host,
|
|
306
|
-
}),
|
|
307
|
-
data: serializedData,
|
|
308
|
-
transformResponse: fromRes,
|
|
309
|
-
};
|
|
310
|
-
return metadata;
|
|
311
|
-
}
|
|
312
|
-
__trending.fromReq = fromReq;
|
|
313
|
-
return __trending;
|
|
314
|
-
}
|
|
315
|
-
exports.trending = trending;
|
|
316
125
|
//# sourceMappingURL=search-v1-sitedocument.http.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-v1-sitedocument.http.js","sourceRoot":"","sources":["../../../src/search-v1-sitedocument.http.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,sDAAgD;
|
|
1
|
+
{"version":3,"file":"search-v1-sitedocument.http.js","sourceRoot":"","sources":["../../../src/search-v1-sitedocument.http.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
2
|
+
import { SearchOptions } from './search-v1-sitedocument.universal';
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
6
6
|
export declare function search(httpClient: HttpClient): (options?: SearchOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").SearchResponse>;
|
|
7
|
-
export declare function federatedSearch(httpClient: HttpClient): (options?: FederatedSearchOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").FederatedSearchResponse>;
|
|
8
|
-
export declare function suggest(httpClient: HttpClient): (options?: SuggestOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").SuggestResponse>;
|
|
9
|
-
export declare function federatedSuggest(httpClient: HttpClient): (options?: FederatedSuggestOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").FederatedSuggestResponse>;
|
|
10
|
-
export declare function related(httpClient: HttpClient): (options?: RelatedOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").RelatedResponse>;
|
|
11
|
-
export declare function autocomplete(httpClient: HttpClient): (options?: AutocompleteOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").AutocompleteResponse>;
|
|
12
|
-
export declare function federatedAutocomplete(httpClient: HttpClient): (options?: FederatedAutocompleteOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").FederatedAutocompleteResponse>;
|
|
13
|
-
export declare function trending(httpClient: HttpClient): (options?: TrendingOptions | undefined) => Promise<import("./search-v1-sitedocument.universal").TrendingResponse>;
|
|
14
7
|
export { VersioningMode, Enum, Direction, Aggregation, } from './search-v1-sitedocument.universal';
|
|
15
|
-
export { SiteDocument, UpdateInternalDocumentsEvent, UpdateInternalDocumentsEventOperationOneOf, InternalDocument, InternalDocumentUpdateOperation, DeleteByIdsOperation, DeleteByFilterOperation, InternalDocumentUpdateByFilterOperation, InternalUpdateExistingOperation, VersionedDocumentUpdateOperation, VersionedDeleteByIdsOperation, VersionedDocumentId, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, DocumentUpdateOperation, IndexDocument, DocumentPayload, DocumentImage, V1DeleteByIdsOperation, V1DeleteByFilterOperation, UpdateByFilterOperation, UpdateExistingOperation, Empty, DiffMatokyPayload, ErrorInformation, SearchRequest, OrderingClauses, OrderingClause, SearchPaging, FacetClauses, FacetClause, FacetClauseClauseOneOf, HierarchicalFacet, HierarchicalFacetClauseOneOf, TermFacet, AggregationFacet, SearchProperty, SearchResponse, NextPageResponse, FacetsResponse, FacetsResponseResponseOneOf, FacetCountResponse, Value, TermAggregationResponse, MinAggregationResponse, MaxAggregationResponse, MinMaxAggregationResponse, HierarchicalAggregationResponse, SumAggregationResponse, FederatedSearchRequest, FederatedSearchResponse, FederatedSearchDocuments, SuggestRequest, SuggestResponse, FederatedSuggestRequest, FederatedSuggestResponse, FederatedSuggestDocuments, RelatedRequest, RelatedResponse, AutocompleteRequest, AutocompleteResponse, AutocompleteResponseValue, FederatedAutocompleteRequest, FederatedAutocompleteResponse, FederatedAutocompleteResults, TrendingRequest, TrendingResponse, TrendingItems, SearchOptions,
|
|
8
|
+
export { SiteDocument, UpdateInternalDocumentsEvent, UpdateInternalDocumentsEventOperationOneOf, InternalDocument, InternalDocumentUpdateOperation, DeleteByIdsOperation, DeleteByFilterOperation, InternalDocumentUpdateByFilterOperation, InternalUpdateExistingOperation, VersionedDocumentUpdateOperation, VersionedDeleteByIdsOperation, VersionedDocumentId, UpdateDocumentsEvent, UpdateDocumentsEventOperationOneOf, DocumentUpdateOperation, IndexDocument, DocumentPayload, DocumentImage, V1DeleteByIdsOperation, V1DeleteByFilterOperation, UpdateByFilterOperation, UpdateExistingOperation, Empty, DiffMatokyPayload, ErrorInformation, SearchRequest, OrderingClauses, OrderingClause, SearchPaging, FacetClauses, FacetClause, FacetClauseClauseOneOf, HierarchicalFacet, HierarchicalFacetClauseOneOf, TermFacet, AggregationFacet, SearchProperty, SearchResponse, NextPageResponse, FacetsResponse, FacetsResponseResponseOneOf, FacetCountResponse, Value, TermAggregationResponse, MinAggregationResponse, MaxAggregationResponse, MinMaxAggregationResponse, HierarchicalAggregationResponse, SumAggregationResponse, FederatedSearchRequest, FederatedSearchResponse, FederatedSearchDocuments, SuggestRequest, SuggestResponse, FederatedSuggestRequest, FederatedSuggestResponse, FederatedSuggestDocuments, RelatedRequest, RelatedResponse, AutocompleteRequest, AutocompleteResponse, AutocompleteResponseValue, FederatedAutocompleteRequest, FederatedAutocompleteResponse, FederatedAutocompleteResults, TrendingRequest, TrendingResponse, TrendingItems, SearchOptions, } from './search-v1-sitedocument.universal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Aggregation = exports.Direction = exports.Enum = exports.VersioningMode = exports.
|
|
3
|
+
exports.Aggregation = exports.Direction = exports.Enum = exports.VersioningMode = exports.search = exports.__metadata = void 0;
|
|
4
4
|
const search_v1_sitedocument_universal_1 = require("./search-v1-sitedocument.universal");
|
|
5
5
|
exports.__metadata = { PACKAGE_NAME: '@wix/search' };
|
|
6
6
|
function search(httpClient) {
|
|
@@ -9,48 +9,6 @@ function search(httpClient) {
|
|
|
9
9
|
{ httpClient });
|
|
10
10
|
}
|
|
11
11
|
exports.search = search;
|
|
12
|
-
function federatedSearch(httpClient) {
|
|
13
|
-
return (options) => (0, search_v1_sitedocument_universal_1.federatedSearch)(options,
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
{ httpClient });
|
|
16
|
-
}
|
|
17
|
-
exports.federatedSearch = federatedSearch;
|
|
18
|
-
function suggest(httpClient) {
|
|
19
|
-
return (options) => (0, search_v1_sitedocument_universal_1.suggest)(options,
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
{ httpClient });
|
|
22
|
-
}
|
|
23
|
-
exports.suggest = suggest;
|
|
24
|
-
function federatedSuggest(httpClient) {
|
|
25
|
-
return (options) => (0, search_v1_sitedocument_universal_1.federatedSuggest)(options,
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
{ httpClient });
|
|
28
|
-
}
|
|
29
|
-
exports.federatedSuggest = federatedSuggest;
|
|
30
|
-
function related(httpClient) {
|
|
31
|
-
return (options) => (0, search_v1_sitedocument_universal_1.related)(options,
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
{ httpClient });
|
|
34
|
-
}
|
|
35
|
-
exports.related = related;
|
|
36
|
-
function autocomplete(httpClient) {
|
|
37
|
-
return (options) => (0, search_v1_sitedocument_universal_1.autocomplete)(options,
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
{ httpClient });
|
|
40
|
-
}
|
|
41
|
-
exports.autocomplete = autocomplete;
|
|
42
|
-
function federatedAutocomplete(httpClient) {
|
|
43
|
-
return (options) => (0, search_v1_sitedocument_universal_1.federatedAutocomplete)(options,
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
{ httpClient });
|
|
46
|
-
}
|
|
47
|
-
exports.federatedAutocomplete = federatedAutocomplete;
|
|
48
|
-
function trending(httpClient) {
|
|
49
|
-
return (options) => (0, search_v1_sitedocument_universal_1.trending)(options,
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
{ httpClient });
|
|
52
|
-
}
|
|
53
|
-
exports.trending = trending;
|
|
54
12
|
var search_v1_sitedocument_universal_2 = require("./search-v1-sitedocument.universal");
|
|
55
13
|
Object.defineProperty(exports, "VersioningMode", { enumerable: true, get: function () { return search_v1_sitedocument_universal_2.VersioningMode; } });
|
|
56
14
|
Object.defineProperty(exports, "Enum", { enumerable: true, get: function () { return search_v1_sitedocument_universal_2.Enum; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-v1-sitedocument.public.js","sourceRoot":"","sources":["../../../src/search-v1-sitedocument.public.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"search-v1-sitedocument.public.js","sourceRoot":"","sources":["../../../src/search-v1-sitedocument.public.ts"],"names":[],"mappings":";;;AACA,yFAG4C;AAE/B,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE1D,SAAgB,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,OAAuB,EAAE,EAAE,CACjC,IAAA,yCAAe,EACb,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,wBAOC;AAED,uFAK4C;AAJ1C,kIAAA,cAAc,OAAA;AACd,wHAAA,IAAI,OAAA;AACJ,6HAAA,SAAS,OAAA;AACT,+HAAA,WAAW,OAAA"}
|
|
@@ -589,162 +589,3 @@ export interface SearchOptions {
|
|
|
589
589
|
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
590
590
|
includeSeoHidden?: boolean | null;
|
|
591
591
|
}
|
|
592
|
-
/**
|
|
593
|
-
* Searches in multiple document types at once.
|
|
594
|
-
* @public
|
|
595
|
-
* @documentationMaturity preview
|
|
596
|
-
*/
|
|
597
|
-
export declare function federatedSearch(options?: FederatedSearchOptions): Promise<FederatedSearchResponse>;
|
|
598
|
-
export interface FederatedSearchOptions {
|
|
599
|
-
/** Query phrase to use. */
|
|
600
|
-
query?: string | null;
|
|
601
|
-
/** Language to search in. */
|
|
602
|
-
language?: string | null;
|
|
603
|
-
/** Limit of documents to return per document type. */
|
|
604
|
-
limit?: number | null;
|
|
605
|
-
/** Enable fuzzy search (for example query 'kalvin clein' will match document with 'calvin klein' in title). */
|
|
606
|
-
fuzzy?: boolean | null;
|
|
607
|
-
/** Highlight texts matching the query. Highlighted text will be wrapped with <mark/> tag. Defaults to true if not provided. */
|
|
608
|
-
highlight?: boolean | null;
|
|
609
|
-
/** Searchable fields to search in. If not provided, search is executed on all searchable fields in schemas */
|
|
610
|
-
searchFields?: string[];
|
|
611
|
-
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
612
|
-
documentTypes?: string[];
|
|
613
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
614
|
-
includeSeoHidden?: boolean | null;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Executes search query to fetch suggested items. Unlike search query suggest will match
|
|
618
|
-
* partial phrases (for example "blu" will match documents containing "blue", "blues" and "blunt").
|
|
619
|
-
* Phrase needs to be at least 3 symbols long. Suggestions can also perform optimisations in search
|
|
620
|
-
* results and generally do not guarantee the same level of quality as regular Search endpoint.
|
|
621
|
-
* @public
|
|
622
|
-
* @documentationMaturity preview
|
|
623
|
-
*/
|
|
624
|
-
export declare function suggest(options?: SuggestOptions): Promise<SuggestResponse>;
|
|
625
|
-
export interface SuggestOptions {
|
|
626
|
-
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
627
|
-
query?: string | null;
|
|
628
|
-
/** Document type of documents to search for. All document types are searched if not provided. */
|
|
629
|
-
documentType?: string | null;
|
|
630
|
-
/** Fields to order by. */
|
|
631
|
-
ordering?: OrderingClauses;
|
|
632
|
-
/** Number of suggested document to return. */
|
|
633
|
-
limit?: number;
|
|
634
|
-
/** Language to search in. */
|
|
635
|
-
language?: string | null;
|
|
636
|
-
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */
|
|
637
|
-
filter?: Record<string, any> | null;
|
|
638
|
-
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schema */
|
|
639
|
-
searchFields?: string[];
|
|
640
|
-
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
641
|
-
fields?: string[];
|
|
642
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
643
|
-
includeSeoHidden?: boolean | null;
|
|
644
|
-
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
645
|
-
properties?: SearchProperty[];
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* Searches for suggestions in multiple document types at once.
|
|
649
|
-
* @public
|
|
650
|
-
* @documentationMaturity preview
|
|
651
|
-
*/
|
|
652
|
-
export declare function federatedSuggest(options?: FederatedSuggestOptions): Promise<FederatedSuggestResponse>;
|
|
653
|
-
export interface FederatedSuggestOptions {
|
|
654
|
-
/** Text to search for. Fields configured in suggester configuration will be searched. */
|
|
655
|
-
query?: string | null;
|
|
656
|
-
/** Language to search in. */
|
|
657
|
-
language?: string | null;
|
|
658
|
-
/** Number of suggested document to return per document type. */
|
|
659
|
-
limit?: number;
|
|
660
|
-
/** Searchable fields to search in. If not provided, search is executed on all suggestable fields in schemas */
|
|
661
|
-
searchFields?: string[];
|
|
662
|
-
/** Document types to search in. If not provided, search is executed on all document types enabled for the site */
|
|
663
|
-
documentTypes?: string[];
|
|
664
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
665
|
-
includeSeoHidden?: boolean | null;
|
|
666
|
-
}
|
|
667
|
-
/**
|
|
668
|
-
* Fetches documents similar to one single document.
|
|
669
|
-
* This is typically used to implement "related to" scenarios (for example to fetch related store products when
|
|
670
|
-
* consumer is already viewing one).
|
|
671
|
-
* @public
|
|
672
|
-
* @documentationMaturity preview
|
|
673
|
-
*/
|
|
674
|
-
export declare function related(options?: RelatedOptions): Promise<RelatedResponse>;
|
|
675
|
-
export interface RelatedOptions {
|
|
676
|
-
/** ID of the document to fetch related documents for. */
|
|
677
|
-
documentId?: string | null;
|
|
678
|
-
/** Document type of the document. */
|
|
679
|
-
documentType?: string | null;
|
|
680
|
-
/** Fields to order by. */
|
|
681
|
-
ordering?: OrderingClauses;
|
|
682
|
-
/** Language to search in. */
|
|
683
|
-
language?: string | null;
|
|
684
|
-
/** Filter in platformized query language (for example {'field': {'$eq': 'value'}}). */
|
|
685
|
-
filter?: Record<string, any> | null;
|
|
686
|
-
/** Searchable fields to compare documents by. If not provided, all searchable fields in schema are used */
|
|
687
|
-
searchFields?: string[];
|
|
688
|
-
/** A list of fields to include in the result set. If not provided, all fields of schema will be included. */
|
|
689
|
-
fields?: string[];
|
|
690
|
-
/** Number of related documents to return */
|
|
691
|
-
limit?: number;
|
|
692
|
-
/** The properties/overrides/experiments to enable for this request. Currently supported: `scoring_profile`. */
|
|
693
|
-
properties?: SearchProperty[];
|
|
694
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
695
|
-
includeSeoHidden?: boolean | null;
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* Provides phrase completion. For example "blu" could return "blue", "blues" and "blunt" as candidate phrases. This operation is resource heavy at index time and is reserved for special use cases.
|
|
699
|
-
* @public
|
|
700
|
-
* @documentationMaturity preview
|
|
701
|
-
*/
|
|
702
|
-
export declare function autocomplete(options?: AutocompleteOptions): Promise<AutocompleteResponse>;
|
|
703
|
-
export interface AutocompleteOptions {
|
|
704
|
-
/** Query phrase to fetch completions for. */
|
|
705
|
-
query?: string | null;
|
|
706
|
-
/** Document type to use to search for phrases. */
|
|
707
|
-
documentType?: string | null;
|
|
708
|
-
/** Limit of phrases to fetch. */
|
|
709
|
-
limit?: number;
|
|
710
|
-
/** Language to search in. */
|
|
711
|
-
language?: string | null;
|
|
712
|
-
/** Filter in platfromized query language (for example {'field': {'$eq': 'value'}}) */
|
|
713
|
-
filter?: Record<string, any> | null;
|
|
714
|
-
/** Searchable fields to use for query completion. If not provided, all searchable fields in schema are used */
|
|
715
|
-
searchFields?: string[];
|
|
716
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
717
|
-
includeSeoHidden?: boolean | null;
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* Provides phrase completion from multiple document types at once
|
|
721
|
-
* @public
|
|
722
|
-
* @documentationMaturity preview
|
|
723
|
-
*/
|
|
724
|
-
export declare function federatedAutocomplete(options?: FederatedAutocompleteOptions): Promise<FederatedAutocompleteResponse>;
|
|
725
|
-
export interface FederatedAutocompleteOptions {
|
|
726
|
-
/** Query phrase to fetch completions for. */
|
|
727
|
-
query?: string | null;
|
|
728
|
-
/** Language to search in. */
|
|
729
|
-
language?: string | null;
|
|
730
|
-
/** Number of queries to return per document type. */
|
|
731
|
-
limit?: number;
|
|
732
|
-
/** Searchable fields to search in. If not provided, search is executed on all autocompletable fields in schemas */
|
|
733
|
-
searchFields?: string[];
|
|
734
|
-
/** Document types to autocomplete in. If not provided, autocomplete is executed on all document types enabled for the site */
|
|
735
|
-
documentTypes?: string[];
|
|
736
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
737
|
-
includeSeoHidden?: boolean | null;
|
|
738
|
-
}
|
|
739
|
-
/**
|
|
740
|
-
* Returns trending documents for given document types
|
|
741
|
-
* @public
|
|
742
|
-
* @documentationMaturity preview
|
|
743
|
-
*/
|
|
744
|
-
export declare function trending(options?: TrendingOptions): Promise<TrendingResponse>;
|
|
745
|
-
export interface TrendingOptions {
|
|
746
|
-
documentTypes?: string[];
|
|
747
|
-
language?: string | null;
|
|
748
|
-
/** Include seo hidden documents. Defaults to false if not provided. */
|
|
749
|
-
includeSeoHidden?: boolean | null;
|
|
750
|
-
}
|