arky-sdk 0.8.0 → 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.
@@ -142,6 +142,12 @@ function normalizeOrderCheckoutItems(items) {
142
142
  return { type: "service", ...item };
143
143
  });
144
144
  }
145
+ function normalizePublicCheckoutItems(items) {
146
+ return normalizeOrderCheckoutItems(items).map((item) => {
147
+ const { price: _price, ...publicItem } = item;
148
+ return publicItem;
149
+ });
150
+ }
145
151
 
146
152
  // src/api/storefront.ts
147
153
  var COMMON_ACTIVITY_TYPES = [
@@ -357,7 +363,7 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
357
363
  {
358
364
  ...payload,
359
365
  store_id: target,
360
- ...items ? { items: normalizeOrderCheckoutItems(items) } : {}
366
+ ...items ? { items: normalizePublicCheckoutItems(items) } : {}
361
367
  },
362
368
  options
363
369
  );
@@ -370,7 +376,7 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
370
376
  {
371
377
  ...payload,
372
378
  store_id: target,
373
- item: normalizeOrderCheckoutItems([item])[0]
379
+ item: normalizePublicCheckoutItems([item])[0]
374
380
  },
375
381
  options
376
382
  );
@@ -1561,8 +1567,7 @@ function toServiceCheckoutItems(items) {
1561
1567
  service_id: item.service_id,
1562
1568
  provider_id: item.provider_id,
1563
1569
  slots: [slot],
1564
- forms: item.forms || [],
1565
- price: item.price
1570
+ forms: item.forms || []
1566
1571
  });
1567
1572
  }
1568
1573
  return [...groups.values()].map((item) => ({
@@ -1850,7 +1855,6 @@ function createArkyStore(config) {
1850
1855
  from: slot.from,
1851
1856
  to: slot.to,
1852
1857
  forms: item.forms || [],
1853
- price: item.price,
1854
1858
  service_name: service ? serviceName(service, currentLocale()) : item.service_id,
1855
1859
  provider_name: provider ? providerName(provider, currentLocale()) : item.provider_id
1856
1860
  });