arky-sdk 0.7.134 → 0.9.0

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.
@@ -1,5 +1,5 @@
1
1
  export { A as ArkyCalendarDay, ArkyCartInput, ArkyCartSnapshot, ArkyCartStatus, ArkyCartStore, ArkyCmsNodeParams, ArkyCmsState, ArkyEshopState, ArkyLastOrder, ArkyServiceCartItem, a as ArkyServiceSlot, b as ArkyServiceState, ArkyServiceStore, ArkyStore, ArkyStoreConfig, ArkyStoreContext, ArkyStoreSetupOptions, ArkyStoreSetupResult, createArkyStore } from './storefront.cjs';
2
- import './admin-DlDViCdY.cjs';
2
+ import './admin-CfHen7c5.cjs';
3
3
  import './types.cjs';
4
4
  import './index-C5gikdBg.cjs';
5
5
  import 'nanostores';
@@ -1,5 +1,5 @@
1
1
  export { A as ArkyCalendarDay, ArkyCartInput, ArkyCartSnapshot, ArkyCartStatus, ArkyCartStore, ArkyCmsNodeParams, ArkyCmsState, ArkyEshopState, ArkyLastOrder, ArkyServiceCartItem, a as ArkyServiceSlot, b as ArkyServiceState, ArkyServiceStore, ArkyStore, ArkyStoreConfig, ArkyStoreContext, ArkyStoreSetupOptions, ArkyStoreSetupResult, createArkyStore } from './storefront.js';
2
- import './admin-id0wkGff.js';
2
+ import './admin-ru7pX5bd.js';
3
3
  import './types.js';
4
4
  import './index-MFMjlIfS.js';
5
5
  import 'nanostores';
@@ -140,6 +140,12 @@ function normalizeOrderCheckoutItems(items) {
140
140
  return { type: "service", ...item };
141
141
  });
142
142
  }
143
+ function normalizePublicCheckoutItems(items) {
144
+ return normalizeOrderCheckoutItems(items).map((item) => {
145
+ const { price: _price, ...publicItem } = item;
146
+ return publicItem;
147
+ });
148
+ }
143
149
 
144
150
  // src/api/storefront.ts
145
151
  var COMMON_ACTIVITY_TYPES = [
@@ -355,7 +361,7 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
355
361
  {
356
362
  ...payload,
357
363
  store_id: target,
358
- ...items ? { items: normalizeOrderCheckoutItems(items) } : {}
364
+ ...items ? { items: normalizePublicCheckoutItems(items) } : {}
359
365
  },
360
366
  options
361
367
  );
@@ -368,7 +374,7 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
368
374
  {
369
375
  ...payload,
370
376
  store_id: target,
371
- item: normalizeOrderCheckoutItems([item])[0]
377
+ item: normalizePublicCheckoutItems([item])[0]
372
378
  },
373
379
  options
374
380
  );
@@ -1559,8 +1565,7 @@ function toServiceCheckoutItems(items) {
1559
1565
  service_id: item.service_id,
1560
1566
  provider_id: item.provider_id,
1561
1567
  slots: [slot],
1562
- forms: item.forms || [],
1563
- price: item.price
1568
+ forms: item.forms || []
1564
1569
  });
1565
1570
  }
1566
1571
  return [...groups.values()].map((item) => ({
@@ -1848,7 +1853,6 @@ function createArkyStore(config) {
1848
1853
  from: slot.from,
1849
1854
  to: slot.to,
1850
1855
  forms: item.forms || [],
1851
- price: item.price,
1852
1856
  service_name: service ? serviceName(service, currentLocale()) : item.service_id,
1853
1857
  provider_name: provider ? providerName(provider, currentLocale()) : item.provider_id
1854
1858
  });