@shopkit/data-layer 1.4.4 → 1.4.6
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/adapters/index.js +7 -4
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/index.mjs +7 -4
- package/dist/adapters/index.mjs.map +1 -1
- package/dist/index.js +66 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +66 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/adapters/index.js
CHANGED
|
@@ -3785,10 +3785,10 @@ var PRODUCT_ENDPOINTS = {
|
|
|
3785
3785
|
getProduct: (v = DEFAULT_VERSION) => `/api/${v}/product/details`,
|
|
3786
3786
|
getProductsByHandles: (v = DEFAULT_VERSION) => `/api/${v}/product/details`,
|
|
3787
3787
|
getCollections: (v = DEFAULT_VERSION) => `/api/${v}/collections`,
|
|
3788
|
-
getCollectionByHandle: (v = DEFAULT_VERSION, h) => `/api/${v}/collections/handle/${h}`,
|
|
3789
|
-
getCollectionById: (v = DEFAULT_VERSION, id) => `/api/${v}/collections/${id}`,
|
|
3788
|
+
getCollectionByHandle: (v = DEFAULT_VERSION, h) => `/api/${v}/collections/handle/${encodeURIComponent(h)}`,
|
|
3789
|
+
getCollectionById: (v = DEFAULT_VERSION, id) => `/api/${v}/collections/${encodeURIComponent(id)}`,
|
|
3790
3790
|
getCollectionsByHandles: (v = DEFAULT_VERSION) => `/api/${v}/collections/details`,
|
|
3791
|
-
getCollectionFilters: (v = DEFAULT_VERSION, collectionHandle) => `/api/${v}/storefront/collections/${collectionHandle}/filters`
|
|
3791
|
+
getCollectionFilters: (v = DEFAULT_VERSION, collectionHandle) => `/api/${v}/storefront/collections/${encodeURIComponent(collectionHandle)}/filters`
|
|
3792
3792
|
};
|
|
3793
3793
|
|
|
3794
3794
|
// src/adapters/custom/product/service.ts
|
|
@@ -4192,9 +4192,12 @@ var ProductService2 = class extends BaseCustomService {
|
|
|
4192
4192
|
}
|
|
4193
4193
|
const payload = {
|
|
4194
4194
|
storeId: this.config.storeId,
|
|
4195
|
-
available: params.filters?.[0]?.available ?? true,
|
|
4196
4195
|
collectionHandles: handles
|
|
4197
4196
|
};
|
|
4197
|
+
const availability = params.filters?.[0]?.available;
|
|
4198
|
+
if (typeof availability === "boolean") {
|
|
4199
|
+
payload.available = availability;
|
|
4200
|
+
}
|
|
4198
4201
|
if (params.filters && params.filters.length > 0) {
|
|
4199
4202
|
const filter = params.filters[0];
|
|
4200
4203
|
if (filter.price?.min !== void 0) {
|