arky-sdk 0.7.91 → 0.7.93

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
@@ -138,7 +138,6 @@ interface StorefrontStores {
138
138
  currency: ReturnType<typeof computed>;
139
139
  currencySymbol: ReturnType<typeof computed>;
140
140
  paymentMethods: ReturnType<typeof computed>;
141
- paymentMethodObjects: ReturnType<typeof computed>;
142
141
  paymentConfig: ReturnType<typeof computed>;
143
142
  zones: ReturnType<typeof computed>;
144
143
  }
@@ -173,7 +172,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
173
172
  declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
174
173
  declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
175
174
 
176
- declare const SDK_VERSION = "0.7.91";
175
+ declare const SDK_VERSION = "0.7.93";
177
176
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
178
177
  interface ApiConfig {
179
178
  httpClient: any;
@@ -517,7 +516,6 @@ declare function createStorefront(config: HttpClientConfig & {
517
516
  currency: nanostores.ReadableAtom<any>;
518
517
  currencySymbol: nanostores.ReadableAtom<any>;
519
518
  paymentMethods: nanostores.ReadableAtom<any>;
520
- paymentMethodObjects: nanostores.ReadableAtom<any>;
521
519
  paymentConfig: nanostores.ReadableAtom<{
522
520
  provider: any;
523
521
  enabled: boolean;
@@ -619,8 +617,8 @@ declare function createStorefront(config: HttpClientConfig & {
619
617
  };
620
618
  };
621
619
  activity: {
622
- track(params: Parameters<(params: TrackParams) => Promise<void>>[0]): Promise<void>;
623
620
  COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
621
+ track(params: TrackParams): Promise<void>;
624
622
  };
625
623
  ready: Promise<void>;
626
624
  automation: {
package/dist/index.d.ts CHANGED
@@ -138,7 +138,6 @@ interface StorefrontStores {
138
138
  currency: ReturnType<typeof computed>;
139
139
  currencySymbol: ReturnType<typeof computed>;
140
140
  paymentMethods: ReturnType<typeof computed>;
141
- paymentMethodObjects: ReturnType<typeof computed>;
142
141
  paymentConfig: ReturnType<typeof computed>;
143
142
  zones: ReturnType<typeof computed>;
144
143
  }
@@ -173,7 +172,7 @@ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
173
172
  declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
174
173
  declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
175
174
 
176
- declare const SDK_VERSION = "0.7.91";
175
+ declare const SDK_VERSION = "0.7.93";
177
176
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
178
177
  interface ApiConfig {
179
178
  httpClient: any;
@@ -517,7 +516,6 @@ declare function createStorefront(config: HttpClientConfig & {
517
516
  currency: nanostores.ReadableAtom<any>;
518
517
  currencySymbol: nanostores.ReadableAtom<any>;
519
518
  paymentMethods: nanostores.ReadableAtom<any>;
520
- paymentMethodObjects: nanostores.ReadableAtom<any>;
521
519
  paymentConfig: nanostores.ReadableAtom<{
522
520
  provider: any;
523
521
  enabled: boolean;
@@ -619,8 +617,8 @@ declare function createStorefront(config: HttpClientConfig & {
619
617
  };
620
618
  };
621
619
  activity: {
622
- track(params: Parameters<(params: TrackParams) => Promise<void>>[0]): Promise<void>;
623
620
  COMMON_ACTIVITY_TYPES: readonly ["page_view", "product_view", "service_view", "provider_view", "cart_added", "cart_removed", "checkout_started", "purchase", "booking_created", "signin", "signup", "verified_email", "search", "share", "wishlist_added"];
621
+ track(params: TrackParams): Promise<void>;
624
622
  };
625
623
  ready: Promise<void>;
626
624
  automation: {
package/dist/index.js CHANGED
@@ -2475,17 +2475,10 @@ function createStores() {
2475
2475
  currencyDisplay: "narrowSymbol"
2476
2476
  }).formatToParts(0).find((p) => p.type === "currency")?.value || m.currency.toUpperCase();
2477
2477
  });
2478
- const $paymentMethods = computed(
2479
- $market,
2480
- (m) => (m?.payment_methods || []).map((pm) => pm.id)
2481
- );
2482
- const $paymentMethodObjects = computed(
2483
- $market,
2484
- (m) => m?.payment_methods || []
2485
- );
2478
+ const $paymentMethods = computed($market, (m) => m?.payment_methods || []);
2486
2479
  const $paymentConfig = computed([$business, $paymentMethods], (biz, methods) => {
2487
2480
  const payment = biz?.payment || null;
2488
- const hasCreditCard = methods.includes("credit_card");
2481
+ const hasCreditCard = methods.some((m) => m.id === "credit_card");
2489
2482
  return {
2490
2483
  provider: payment,
2491
2484
  enabled: hasCreditCard && !!payment
@@ -2502,7 +2495,6 @@ function createStores() {
2502
2495
  currency: $currency,
2503
2496
  currencySymbol: $currencySymbol,
2504
2497
  paymentMethods: $paymentMethods,
2505
- paymentMethodObjects: $paymentMethodObjects,
2506
2498
  paymentConfig: $paymentConfig,
2507
2499
  zones: $zones
2508
2500
  };
@@ -2686,7 +2678,7 @@ function getFirstAvailableFCId(variant, quantity = 1) {
2686
2678
  }
2687
2679
 
2688
2680
  // src/index.ts
2689
- var SDK_VERSION = "0.7.91";
2681
+ var SDK_VERSION = "0.7.93";
2690
2682
  var SUPPORTED_FRAMEWORKS = [
2691
2683
  "astro",
2692
2684
  "react",
@@ -3009,13 +3001,6 @@ function createStorefront(config) {
3009
3001
  });
3010
3002
  return sessionPromise;
3011
3003
  }
3012
- const activity = {
3013
- ...storefrontApi.activity,
3014
- async track(params) {
3015
- await ready;
3016
- return storefrontApi.activity.track(params);
3017
- }
3018
- };
3019
3004
  function setMarket(key) {
3020
3005
  sessionPromise = null;
3021
3006
  return session(key);
@@ -3028,7 +3013,7 @@ function createStorefront(config) {
3028
3013
  eshop: storefrontApi.eshop,
3029
3014
  booking: storefrontApi.booking,
3030
3015
  crm: storefrontApi.crm,
3031
- activity,
3016
+ activity: storefrontApi.activity,
3032
3017
  ready,
3033
3018
  automation: storefrontApi.automation,
3034
3019
  setBusinessId: (businessId) => {