@infrab4a/connect 4.16.1-beta.2 → 4.16.1-beta.3

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/index.cjs.js CHANGED
@@ -4932,7 +4932,11 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4932
4932
  }).then(({ data }) => data)));
4933
4933
  if (categoriesHasura.length)
4934
4934
  categories.push(...(await this.find({
4935
- filters: { id: { operator: exports.Where.IN, value: categoriesHasura.filter(Boolean) }, published: true },
4935
+ filters: {
4936
+ id: { operator: exports.Where.IN, value: categoriesHasura.filter(Boolean) },
4937
+ // shops: { operator: Where.IN, value: [shop] },
4938
+ published: true,
4939
+ },
4936
4940
  }).then(({ data }) => data)));
4937
4941
  if (!categories.length)
4938
4942
  return [];
@@ -4947,7 +4951,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4947
4951
  if (!((_a = category === null || category === void 0 ? void 0 : category.products) === null || _a === void 0 ? void 0 : _a.length))
4948
4952
  return [];
4949
4953
  const mostRelevants = category.getMostRelevantByShop(shop);
4950
- const mostRelevantProductsIds = [...new Set(mostRelevants.concat(category.products))].slice(0, options.limit);
4954
+ const mostRelevantProductsIds = [...new Set(mostRelevants.concat(category.products))];
4951
4955
  const products = [];
4952
4956
  const { data: productsData } = await this.productRepository.find(Object.assign(Object.assign({ filters: Object.assign({ id: { operator: exports.Where.IN, value: mostRelevantProductsIds }, published: true }, ((options === null || options === void 0 ? void 0 : options.hasStock) ? { stock: { quantity: { operator: exports.Where.GT, value: 0 } } } : {})), fields: [
4953
4957
  'id',
package/index.esm.js CHANGED
@@ -4926,7 +4926,11 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4926
4926
  }).then(({ data }) => data)));
4927
4927
  if (categoriesHasura.length)
4928
4928
  categories.push(...(await this.find({
4929
- filters: { id: { operator: Where.IN, value: categoriesHasura.filter(Boolean) }, published: true },
4929
+ filters: {
4930
+ id: { operator: Where.IN, value: categoriesHasura.filter(Boolean) },
4931
+ // shops: { operator: Where.IN, value: [shop] },
4932
+ published: true,
4933
+ },
4930
4934
  }).then(({ data }) => data)));
4931
4935
  if (!categories.length)
4932
4936
  return [];
@@ -4941,7 +4945,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4941
4945
  if (!((_a = category === null || category === void 0 ? void 0 : category.products) === null || _a === void 0 ? void 0 : _a.length))
4942
4946
  return [];
4943
4947
  const mostRelevants = category.getMostRelevantByShop(shop);
4944
- const mostRelevantProductsIds = [...new Set(mostRelevants.concat(category.products))].slice(0, options.limit);
4948
+ const mostRelevantProductsIds = [...new Set(mostRelevants.concat(category.products))];
4945
4949
  const products = [];
4946
4950
  const { data: productsData } = await this.productRepository.find(Object.assign(Object.assign({ filters: Object.assign({ id: { operator: Where.IN, value: mostRelevantProductsIds }, published: true }, ((options === null || options === void 0 ? void 0 : options.hasStock) ? { stock: { quantity: { operator: Where.GT, value: 0 } } } : {})), fields: [
4947
4951
  'id',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.16.1-beta.2",
3
+ "version": "4.16.1-beta.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },