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.
- package/dist/{admin-DCe3PEOB.d.cts → admin-CfHen7c5.d.cts} +43 -62
- package/dist/{admin-CEVBErl_.d.ts → admin-ru7pX5bd.d.ts} +43 -62
- package/dist/admin.cjs +4 -14
- 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 -14
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +12 -16
- 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 -16
- 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 +15 -4
- package/dist/types.d.ts +15 -4
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -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:
|
|
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:
|
|
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
|
});
|