arky-sdk 0.3.1 → 0.3.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/dist/index.d.cts CHANGED
@@ -216,7 +216,7 @@ interface HttpClientConfig {
216
216
  setUserToken?: (userToken: any) => void;
217
217
  }
218
218
 
219
- declare const SDK_VERSION = "0.3.1";
219
+ declare const SDK_VERSION = "0.3.2";
220
220
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
221
221
  interface ApiConfig {
222
222
  httpClient: any;
@@ -382,11 +382,9 @@ declare function createArkySDK(config: HttpClientConfig & {
382
382
  };
383
383
  setBusinessId: (businessId: string) => void;
384
384
  getBusinessId: () => string;
385
- auth: {
386
- isAuthenticated: () => boolean;
387
- logout: () => void;
388
- setUserToken: (userToken: any) => void;
389
- };
385
+ isAuthenticated: () => boolean;
386
+ logout: () => void;
387
+ setUserToken: (userToken: any) => void;
390
388
  utils: {
391
389
  getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
392
390
  thumbnailUrl: (service: any) => string;
package/dist/index.d.ts CHANGED
@@ -216,7 +216,7 @@ interface HttpClientConfig {
216
216
  setUserToken?: (userToken: any) => void;
217
217
  }
218
218
 
219
- declare const SDK_VERSION = "0.3.1";
219
+ declare const SDK_VERSION = "0.3.2";
220
220
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
221
221
  interface ApiConfig {
222
222
  httpClient: any;
@@ -382,11 +382,9 @@ declare function createArkySDK(config: HttpClientConfig & {
382
382
  };
383
383
  setBusinessId: (businessId: string) => void;
384
384
  getBusinessId: () => string;
385
- auth: {
386
- isAuthenticated: () => boolean;
387
- logout: () => void;
388
- setUserToken: (userToken: any) => void;
389
- };
385
+ isAuthenticated: () => boolean;
386
+ logout: () => void;
387
+ setUserToken: (userToken: any) => void;
390
388
  utils: {
391
389
  getImageUrl: (imageBlock: any, isBlock?: boolean) => any;
392
390
  thumbnailUrl: (service: any) => string;
package/dist/index.js CHANGED
@@ -1673,7 +1673,6 @@ function createHttpClient(cfg) {
1673
1673
  let data;
1674
1674
  try {
1675
1675
  const fullUrl = `${cfg.baseUrl}${finalPath}`;
1676
- console.log("[SDK] Fetching:", method, fullUrl, fetchOpts);
1677
1676
  res = await fetch(fullUrl, fetchOpts);
1678
1677
  data = await res.json();
1679
1678
  } catch (error) {
@@ -1708,7 +1707,7 @@ function createHttpClient(cfg) {
1708
1707
  }
1709
1708
 
1710
1709
  // src/index.ts
1711
- var SDK_VERSION = "0.3.1";
1710
+ var SDK_VERSION = "0.3.2";
1712
1711
  var SUPPORTED_FRAMEWORKS = ["astro", "react", "vue", "svelte", "vanilla"];
1713
1712
  function createArkySDK(config) {
1714
1713
  const httpClient = createHttpClient(config);
@@ -1741,12 +1740,10 @@ function createArkySDK(config) {
1741
1740
  apiConfig.businessId = businessId;
1742
1741
  },
1743
1742
  getBusinessId: () => apiConfig.businessId,
1744
- auth: {
1745
- isAuthenticated: config.isAuthenticated || (() => false),
1746
- logout: config.logout || config.onAuthFailure,
1747
- setUserToken: config.setUserToken || (() => {
1748
- })
1749
- },
1743
+ isAuthenticated: config.isAuthenticated || (() => false),
1744
+ logout: config.logout || config.onAuthFailure,
1745
+ setUserToken: config.setUserToken || (() => {
1746
+ }),
1750
1747
  utils: {
1751
1748
  getImageUrl: (imageBlock, isBlock = true) => getImageUrl(imageBlock, isBlock, storageUrl),
1752
1749
  thumbnailUrl: (service) => thumbnailUrl(service, storageUrl),