arky-sdk 0.11.0 → 0.11.1
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/admin.cjs.map +1 -1
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -55
- package/dist/index.d.ts +55 -55
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +2 -4
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.js +2 -4
- package/dist/storefront.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,16 +65,14 @@ var createActionApi = (apiConfig, lifecycle) => ({
|
|
|
65
65
|
var createStorefrontApi = (apiConfig, updateContactSession, lifecycle) => {
|
|
66
66
|
const base = "/v1/storefront";
|
|
67
67
|
function persistIdentification(result) {
|
|
68
|
-
const sessionToken = result.token?.token;
|
|
68
|
+
const sessionToken = result.token?.token ?? apiConfig.authStorage.getTokens()?.access_token;
|
|
69
69
|
if (sessionToken) {
|
|
70
70
|
updateContactSession(() => ({
|
|
71
71
|
sessionToken,
|
|
72
72
|
contact: result.contact
|
|
73
73
|
}));
|
|
74
74
|
} else {
|
|
75
|
-
updateContactSession(
|
|
76
|
-
(current) => current ? { ...current, contact: result.contact } : null
|
|
77
|
-
);
|
|
75
|
+
updateContactSession(() => null);
|
|
78
76
|
}
|
|
79
77
|
return result;
|
|
80
78
|
}
|
|
@@ -5830,7 +5828,7 @@ function initialize(publishableKey, options = {}) {
|
|
|
5830
5828
|
}
|
|
5831
5829
|
|
|
5832
5830
|
// src/index.ts
|
|
5833
|
-
var SDK_VERSION = "0.11.
|
|
5831
|
+
var SDK_VERSION = "0.11.1";
|
|
5834
5832
|
var SUPPORTED_FRAMEWORKS = [
|
|
5835
5833
|
"astro",
|
|
5836
5834
|
"react",
|