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.
- package/dist/{admin-DlDViCdY.d.cts → admin-CfHen7c5.d.cts} +87 -47
- package/dist/{admin-id0wkGff.d.ts → admin-ru7pX5bd.d.ts} +87 -47
- package/dist/admin.cjs +4 -6
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +1 -1
- package/dist/admin.d.ts +1 -1
- package/dist/admin.js +4 -6
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/storefront-store.cjs +9 -5
- package/dist/storefront-store.cjs.map +1 -1
- package/dist/storefront-store.d.cts +1 -1
- package/dist/storefront-store.d.ts +1 -1
- package/dist/storefront-store.js +9 -5
- package/dist/storefront-store.js.map +1 -1
- package/dist/storefront.cjs +9 -5
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +2 -2
- package/dist/storefront.d.ts +2 -2
- package/dist/storefront.js +9 -5
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +20 -5
- package/dist/types.d.ts +20 -5
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/storefront.cjs
CHANGED
|
@@ -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:
|
|
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:
|
|
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
|
});
|