@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
package/dist/api.esm.js
CHANGED
|
@@ -18,7 +18,7 @@ import { trace, context, SpanKind } from '@opentelemetry/api';
|
|
|
18
18
|
import { SeverityNumber } from '@opentelemetry/api-logs';
|
|
19
19
|
|
|
20
20
|
var name = "@faststore/api";
|
|
21
|
-
var version = "2.1.
|
|
21
|
+
var version = "2.1.53";
|
|
22
22
|
var license = "MIT";
|
|
23
23
|
var main = "dist/index.js";
|
|
24
24
|
var typings = "dist/index.d.ts";
|
|
@@ -54,8 +54,8 @@ var dependencies = {
|
|
|
54
54
|
};
|
|
55
55
|
var devDependencies = {
|
|
56
56
|
"@envelop/core": "^2.6.0",
|
|
57
|
-
"@faststore/eslint-config": "^2.1.
|
|
58
|
-
"@faststore/shared": "^2.1.
|
|
57
|
+
"@faststore/eslint-config": "^2.1.53",
|
|
58
|
+
"@faststore/shared": "^2.1.53",
|
|
59
59
|
"@graphql-codegen/cli": "2.2.0",
|
|
60
60
|
"@graphql-codegen/typescript": "2.2.2",
|
|
61
61
|
"@types/express": "^4.17.16",
|
|
@@ -192,7 +192,11 @@ const VtexCommerce = ({
|
|
|
192
192
|
};
|
|
193
193
|
return fetchAPI(`${base}/api/checkout/pub/orderForm/${id}/attachments/shippingData`, {
|
|
194
194
|
...BASE_INIT,
|
|
195
|
-
body: JSON.stringify(mappedBody)
|
|
195
|
+
body: JSON.stringify(mappedBody),
|
|
196
|
+
headers: {
|
|
197
|
+
'content-type': 'application/json',
|
|
198
|
+
cookie: ctx.headers.cookie
|
|
199
|
+
}
|
|
196
200
|
});
|
|
197
201
|
},
|
|
198
202
|
orderForm: ({
|
|
@@ -1359,11 +1363,11 @@ const isOrderFormStale = form => {
|
|
|
1359
1363
|
async function getOrderNumberFromSession(headers = {}, commerce) {
|
|
1360
1364
|
const cookieSession = getCookie('vtex_session', headers.cookie);
|
|
1361
1365
|
if (cookieSession) {
|
|
1362
|
-
var _namespaces$
|
|
1366
|
+
var _namespaces$public$or, _namespaces$public, _namespaces$public$or2;
|
|
1363
1367
|
const {
|
|
1364
1368
|
namespaces
|
|
1365
1369
|
} = await commerce.getSessionOrder();
|
|
1366
|
-
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;
|
|
1367
1371
|
}
|
|
1368
1372
|
return;
|
|
1369
1373
|
}
|