arky-sdk 0.3.2 → 0.3.3
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/index.cjs +5 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -28
- package/dist/index.d.ts +26 -28
- package/dist/index.js +5 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1643,20 +1643,14 @@ function createHttpClient(cfg) {
|
|
|
1643
1643
|
cfg.setTokens(data2);
|
|
1644
1644
|
accessToken = data2.accessToken;
|
|
1645
1645
|
} else {
|
|
1646
|
-
cfg.
|
|
1647
|
-
if (cfg.loginFallbackPath) {
|
|
1648
|
-
cfg.navigate?.(cfg.loginFallbackPath);
|
|
1649
|
-
}
|
|
1646
|
+
cfg.logout();
|
|
1650
1647
|
const err = new Error("Error refreshing token");
|
|
1651
1648
|
err.name = "ApiError";
|
|
1652
1649
|
err.statusCode = 401;
|
|
1653
1650
|
throw err;
|
|
1654
1651
|
}
|
|
1655
1652
|
} else {
|
|
1656
|
-
cfg.
|
|
1657
|
-
if (cfg.loginFallbackPath) {
|
|
1658
|
-
cfg.navigate?.(cfg.loginFallbackPath);
|
|
1659
|
-
}
|
|
1653
|
+
cfg.logout();
|
|
1660
1654
|
const err = new Error("No refresh token");
|
|
1661
1655
|
err.name = "ApiError";
|
|
1662
1656
|
err.statusCode = 401;
|
|
@@ -1709,7 +1703,7 @@ function createHttpClient(cfg) {
|
|
|
1709
1703
|
}
|
|
1710
1704
|
|
|
1711
1705
|
// src/index.ts
|
|
1712
|
-
var SDK_VERSION = "0.3.
|
|
1706
|
+
var SDK_VERSION = "0.3.3";
|
|
1713
1707
|
var SUPPORTED_FRAMEWORKS = ["astro", "react", "vue", "svelte", "vanilla"];
|
|
1714
1708
|
function createArkySDK(config) {
|
|
1715
1709
|
const httpClient = createHttpClient(config);
|
|
@@ -1743,9 +1737,8 @@ function createArkySDK(config) {
|
|
|
1743
1737
|
},
|
|
1744
1738
|
getBusinessId: () => apiConfig.businessId,
|
|
1745
1739
|
isAuthenticated: config.isAuthenticated || (() => false),
|
|
1746
|
-
logout: config.logout
|
|
1747
|
-
|
|
1748
|
-
}),
|
|
1740
|
+
logout: config.logout,
|
|
1741
|
+
setTokens: config.setTokens,
|
|
1749
1742
|
utils: {
|
|
1750
1743
|
getImageUrl: (imageBlock, isBlock = true) => getImageUrl(imageBlock, isBlock, storageUrl),
|
|
1751
1744
|
thumbnailUrl: (service) => thumbnailUrl(service, storageUrl),
|