@faststore/api 1.8.37 → 1.8.38
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/CHANGELOG.md +8 -0
- package/dist/api.cjs.development.js +2 -13
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +2 -13
- package/dist/api.esm.js.map +1 -1
- package/dist/platforms/vtex/clients/index.d.ts +0 -1
- package/dist/platforms/vtex/clients/search/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/platforms/vtex/clients/search/index.ts +0 -14
- package/src/platforms/vtex/resolvers/searchResult.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.8.38 (2022-05-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @faststore/api
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 1.8.37 (2022-05-27)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -219,23 +219,13 @@ const IntelligentSearch = ({
|
|
|
219
219
|
type: 'product_search'
|
|
220
220
|
});
|
|
221
221
|
|
|
222
|
-
const
|
|
222
|
+
const suggestedTerms = args => {
|
|
223
223
|
var _args$query$toString, _args$query;
|
|
224
224
|
|
|
225
225
|
const params = new URLSearchParams({
|
|
226
226
|
query: (_args$query$toString = (_args$query = args.query) == null ? void 0 : _args$query.toString()) != null ? _args$query$toString : '',
|
|
227
227
|
locale: ctx.storage.locale
|
|
228
228
|
});
|
|
229
|
-
return fetchAPI(`${base}/_v/api/intelligent-search/product_search?${params.toString()}`);
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
const suggestedTerms = args => {
|
|
233
|
-
var _args$query$toString2, _args$query2;
|
|
234
|
-
|
|
235
|
-
const params = new URLSearchParams({
|
|
236
|
-
query: (_args$query$toString2 = (_args$query2 = args.query) == null ? void 0 : _args$query2.toString()) != null ? _args$query$toString2 : '',
|
|
237
|
-
locale: ctx.storage.locale
|
|
238
|
-
});
|
|
239
229
|
return fetchAPI(`${base}/_v/api/intelligent-search/search_suggestions?${params.toString()}`);
|
|
240
230
|
};
|
|
241
231
|
|
|
@@ -254,7 +244,6 @@ const IntelligentSearch = ({
|
|
|
254
244
|
facets,
|
|
255
245
|
products,
|
|
256
246
|
suggestedTerms,
|
|
257
|
-
suggestedProducts,
|
|
258
247
|
topSearches
|
|
259
248
|
};
|
|
260
249
|
};
|
|
@@ -1471,7 +1460,7 @@ const StoreSearchResult = {
|
|
|
1471
1460
|
}
|
|
1472
1461
|
|
|
1473
1462
|
const terms = await search.suggestedTerms(searchArgs);
|
|
1474
|
-
const products = await search.
|
|
1463
|
+
const products = await search.products(searchArgs);
|
|
1475
1464
|
const skus = products.products.map(product => {
|
|
1476
1465
|
const [maybeSku] = product.items;
|
|
1477
1466
|
return maybeSku && enhanceSku(maybeSku, product);
|