@faststore/api 2.1.36 → 2.1.53
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/dist/api.cjs.development.js +7 -7
- 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 +7 -7
- package/dist/api.esm.js.map +1 -1
- package/dist/platforms/vtex/clients/commerce/types/Session.d.ts +5 -0
- package/package.json +4 -4
- package/src/platforms/vtex/clients/commerce/types/Session.ts +6 -0
- package/src/platforms/vtex/clients/search/index.ts +4 -4
- package/src/platforms/vtex/resolvers/validateCart.ts +1 -2
|
@@ -22,7 +22,7 @@ var api = require('@opentelemetry/api');
|
|
|
22
22
|
var apiLogs = require('@opentelemetry/api-logs');
|
|
23
23
|
|
|
24
24
|
var name = "@faststore/api";
|
|
25
|
-
var version = "2.1.
|
|
25
|
+
var version = "2.1.38";
|
|
26
26
|
var license = "MIT";
|
|
27
27
|
var main = "dist/index.js";
|
|
28
28
|
var typings = "dist/index.d.ts";
|
|
@@ -352,7 +352,7 @@ const IntelligentSearch = ({
|
|
|
352
352
|
};
|
|
353
353
|
const addDefaultFacets = facets => {
|
|
354
354
|
var _facets$find, _facets$find2;
|
|
355
|
-
const
|
|
355
|
+
const withDefaultFacets = facets.filter(({
|
|
356
356
|
key
|
|
357
357
|
}) => !CHANNEL_KEYS.has(key));
|
|
358
358
|
const policyFacet = (_facets$find = facets.find(({
|
|
@@ -362,12 +362,12 @@ const IntelligentSearch = ({
|
|
|
362
362
|
key
|
|
363
363
|
}) => key === REGION_KEY)) != null ? _facets$find2 : getRegionFacet();
|
|
364
364
|
if (policyFacet !== null) {
|
|
365
|
-
|
|
365
|
+
withDefaultFacets.push(policyFacet);
|
|
366
366
|
}
|
|
367
367
|
if (regionFacet !== null) {
|
|
368
|
-
|
|
368
|
+
withDefaultFacets.push(regionFacet);
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return withDefaultFacets;
|
|
371
371
|
};
|
|
372
372
|
const search = ({
|
|
373
373
|
query = '',
|
|
@@ -1363,11 +1363,11 @@ const isOrderFormStale = form => {
|
|
|
1363
1363
|
async function getOrderNumberFromSession(headers = {}, commerce) {
|
|
1364
1364
|
const cookieSession = getCookie('vtex_session', headers.cookie);
|
|
1365
1365
|
if (cookieSession) {
|
|
1366
|
-
var _namespaces$
|
|
1366
|
+
var _namespaces$public$or, _namespaces$public, _namespaces$public$or2;
|
|
1367
1367
|
const {
|
|
1368
1368
|
namespaces
|
|
1369
1369
|
} = await commerce.getSessionOrder();
|
|
1370
|
-
return (_namespaces$
|
|
1370
|
+
return (_namespaces$public$or = (_namespaces$public = namespaces.public) == null ? void 0 : (_namespaces$public$or2 = _namespaces$public.orderFormId) == null ? void 0 : _namespaces$public$or2.value) != null ? _namespaces$public$or : undefined;
|
|
1371
1371
|
}
|
|
1372
1372
|
return;
|
|
1373
1373
|
}
|