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
package/dist/index.cjs
CHANGED
|
@@ -156,6 +156,12 @@ function normalizeOrderCheckoutItems(items) {
|
|
|
156
156
|
return { type: "service", ...item };
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
+
function normalizePublicCheckoutItems(items) {
|
|
160
|
+
return normalizeOrderCheckoutItems(items).map((item) => {
|
|
161
|
+
const { price: _price, ...publicItem } = item;
|
|
162
|
+
return publicItem;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
159
165
|
|
|
160
166
|
// src/api/storefront.ts
|
|
161
167
|
var COMMON_ACTIVITY_TYPES = [
|
|
@@ -371,7 +377,7 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
|
|
|
371
377
|
{
|
|
372
378
|
...payload,
|
|
373
379
|
store_id: target,
|
|
374
|
-
...items ? { items:
|
|
380
|
+
...items ? { items: normalizePublicCheckoutItems(items) } : {}
|
|
375
381
|
},
|
|
376
382
|
options
|
|
377
383
|
);
|
|
@@ -384,7 +390,7 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
|
|
|
384
390
|
{
|
|
385
391
|
...payload,
|
|
386
392
|
store_id: target,
|
|
387
|
-
item:
|
|
393
|
+
item: normalizePublicCheckoutItems([item])[0]
|
|
388
394
|
},
|
|
389
395
|
options
|
|
390
396
|
);
|
|
@@ -2536,20 +2542,13 @@ var createTaxonomyApi = (apiConfig) => {
|
|
|
2536
2542
|
// src/api/analytics.ts
|
|
2537
2543
|
var createAnalyticsApi = (apiConfig) => {
|
|
2538
2544
|
return {
|
|
2539
|
-
async
|
|
2545
|
+
async get(request, options) {
|
|
2540
2546
|
const store_id = options?.store_id || apiConfig.storeId;
|
|
2541
2547
|
return apiConfig.httpClient.post(
|
|
2542
|
-
`/v1/stores/${store_id}/analytics
|
|
2543
|
-
|
|
2548
|
+
`/v1/stores/${store_id}/analytics`,
|
|
2549
|
+
request,
|
|
2544
2550
|
options
|
|
2545
2551
|
);
|
|
2546
|
-
},
|
|
2547
|
-
async activityFeed(query = {}, options) {
|
|
2548
|
-
const store_id = options?.store_id || apiConfig.storeId;
|
|
2549
|
-
return apiConfig.httpClient.get(
|
|
2550
|
-
`/v1/stores/${store_id}/analytics/activity-feed`,
|
|
2551
|
-
{ ...options, params: query }
|
|
2552
|
-
);
|
|
2553
2552
|
}
|
|
2554
2553
|
};
|
|
2555
2554
|
};
|
|
@@ -3094,10 +3093,7 @@ function createAdmin(config) {
|
|
|
3094
3093
|
getExecution: workflowApi.getWorkflowExecution
|
|
3095
3094
|
}
|
|
3096
3095
|
},
|
|
3097
|
-
analytics:
|
|
3098
|
-
query: analyticsApi.query,
|
|
3099
|
-
activityFeed: analyticsApi.activityFeed
|
|
3100
|
-
},
|
|
3096
|
+
analytics: analyticsApi,
|
|
3101
3097
|
setStoreId: (storeId) => {
|
|
3102
3098
|
apiConfig.storeId = storeId;
|
|
3103
3099
|
},
|