@faststore/api 2.1.38 → 2.1.66
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 +10 -6
- 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 +10 -6
- 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/index.ts +4 -0
- package/src/platforms/vtex/clients/commerce/types/Session.ts +6 -0
- 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.53";
|
|
26
26
|
var license = "MIT";
|
|
27
27
|
var main = "dist/index.js";
|
|
28
28
|
var typings = "dist/index.d.ts";
|
|
@@ -58,8 +58,8 @@ var dependencies = {
|
|
|
58
58
|
};
|
|
59
59
|
var devDependencies = {
|
|
60
60
|
"@envelop/core": "^2.6.0",
|
|
61
|
-
"@faststore/eslint-config": "^2.1.
|
|
62
|
-
"@faststore/shared": "^2.1.
|
|
61
|
+
"@faststore/eslint-config": "^2.1.53",
|
|
62
|
+
"@faststore/shared": "^2.1.53",
|
|
63
63
|
"@graphql-codegen/cli": "2.2.0",
|
|
64
64
|
"@graphql-codegen/typescript": "2.2.2",
|
|
65
65
|
"@types/express": "^4.17.16",
|
|
@@ -196,7 +196,11 @@ const VtexCommerce = ({
|
|
|
196
196
|
};
|
|
197
197
|
return fetchAPI(`${base}/api/checkout/pub/orderForm/${id}/attachments/shippingData`, {
|
|
198
198
|
...BASE_INIT,
|
|
199
|
-
body: JSON.stringify(mappedBody)
|
|
199
|
+
body: JSON.stringify(mappedBody),
|
|
200
|
+
headers: {
|
|
201
|
+
'content-type': 'application/json',
|
|
202
|
+
cookie: ctx.headers.cookie
|
|
203
|
+
}
|
|
200
204
|
});
|
|
201
205
|
},
|
|
202
206
|
orderForm: ({
|
|
@@ -1363,11 +1367,11 @@ const isOrderFormStale = form => {
|
|
|
1363
1367
|
async function getOrderNumberFromSession(headers = {}, commerce) {
|
|
1364
1368
|
const cookieSession = getCookie('vtex_session', headers.cookie);
|
|
1365
1369
|
if (cookieSession) {
|
|
1366
|
-
var _namespaces$
|
|
1370
|
+
var _namespaces$public$or, _namespaces$public, _namespaces$public$or2;
|
|
1367
1371
|
const {
|
|
1368
1372
|
namespaces
|
|
1369
1373
|
} = await commerce.getSessionOrder();
|
|
1370
|
-
return (_namespaces$
|
|
1374
|
+
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
1375
|
}
|
|
1372
1376
|
return;
|
|
1373
1377
|
}
|