arky-sdk 0.11.0 → 0.11.2
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/README.md +21 -4
- 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 +1 -1
- package/dist/index.d.ts +1 -1
- 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.d.cts
CHANGED
|
@@ -2907,7 +2907,7 @@ type ArkyStore = ReturnType<typeof initialize>;
|
|
|
2907
2907
|
type ArkyCartStore = ArkyStore["eshop"]["cart"];
|
|
2908
2908
|
type ArkyServiceStore = ArkyStore["eshop"]["service"];
|
|
2909
2909
|
|
|
2910
|
-
declare const SDK_VERSION = "0.11.
|
|
2910
|
+
declare const SDK_VERSION = "0.11.2";
|
|
2911
2911
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
2912
2912
|
|
|
2913
2913
|
interface ApiConfig {
|
package/dist/index.d.ts
CHANGED
|
@@ -2907,7 +2907,7 @@ type ArkyStore = ReturnType<typeof initialize>;
|
|
|
2907
2907
|
type ArkyCartStore = ArkyStore["eshop"]["cart"];
|
|
2908
2908
|
type ArkyServiceStore = ArkyStore["eshop"]["service"];
|
|
2909
2909
|
|
|
2910
|
-
declare const SDK_VERSION = "0.11.
|
|
2910
|
+
declare const SDK_VERSION = "0.11.2";
|
|
2911
2911
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
2912
2912
|
|
|
2913
2913
|
interface ApiConfig {
|
package/dist/index.js
CHANGED
|
@@ -63,16 +63,14 @@ var createActionApi = (apiConfig, lifecycle) => ({
|
|
|
63
63
|
var createStorefrontApi = (apiConfig, updateContactSession, lifecycle) => {
|
|
64
64
|
const base = "/v1/storefront";
|
|
65
65
|
function persistIdentification(result) {
|
|
66
|
-
const sessionToken = result.token?.token;
|
|
66
|
+
const sessionToken = result.token?.token ?? apiConfig.authStorage.getTokens()?.access_token;
|
|
67
67
|
if (sessionToken) {
|
|
68
68
|
updateContactSession(() => ({
|
|
69
69
|
sessionToken,
|
|
70
70
|
contact: result.contact
|
|
71
71
|
}));
|
|
72
72
|
} else {
|
|
73
|
-
updateContactSession(
|
|
74
|
-
(current) => current ? { ...current, contact: result.contact } : null
|
|
75
|
-
);
|
|
73
|
+
updateContactSession(() => null);
|
|
76
74
|
}
|
|
77
75
|
return result;
|
|
78
76
|
}
|
|
@@ -5828,7 +5826,7 @@ function initialize(publishableKey, options = {}) {
|
|
|
5828
5826
|
}
|
|
5829
5827
|
|
|
5830
5828
|
// src/index.ts
|
|
5831
|
-
var SDK_VERSION = "0.11.
|
|
5829
|
+
var SDK_VERSION = "0.11.2";
|
|
5832
5830
|
var SUPPORTED_FRAMEWORKS = [
|
|
5833
5831
|
"astro",
|
|
5834
5832
|
"react",
|