@ikas/storefront-api 4.0.0-alpha.41 → 4.0.0-alpha.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-api",
3
- "version": "4.0.0-alpha.41",
3
+ "version": "4.0.0-alpha.42",
4
4
  "author": "Umut Ozan Yıldırım",
5
5
  "license": "ISC",
6
6
  "description": "API functions that returns models from the ikas-storefront-models package.",
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@rollup/plugin-commonjs": "^22.0.0",
24
- "@ikas/storefront-config": "^4.0.0-alpha.41",
25
- "@ikas/storefront-models": "^4.0.0-alpha.41",
24
+ "@ikas/storefront-config": "^4.0.0-alpha.42",
25
+ "@ikas/storefront-models": "^4.0.0-alpha.42",
26
26
  "@rollup/plugin-node-resolve": "^13.3.0",
27
27
  "prettier": "^2.2.1",
28
28
  "rollup": "^2.75.6",
@@ -35,8 +35,8 @@
35
35
  "axios": "^0.26.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@ikas/storefront-config": "^4.0.0-alpha.41",
39
- "@ikas/storefront-models": "^4.0.0-alpha.41",
38
+ "@ikas/storefront-config": "^4.0.0-alpha.42",
39
+ "@ikas/storefront-models": "^4.0.0-alpha.42",
40
40
  "axios": "^0.26.0"
41
41
  }
42
42
  }
@@ -107,7 +107,7 @@ export async function getRelatedProducts(
107
107
  await import("../../__api/queries/getRelatedProducts")
108
108
  ).default;
109
109
  const response = await _getRelatedProducts(params);
110
- const products = response.data.getRelatedProducts.map((d: SearchProduct) =>
110
+ const products = response.data.map((d: SearchProduct) =>
111
111
  simpleToProduct(d)
112
112
  ) as IkasProduct[];
113
113
 
@@ -119,11 +119,11 @@ export async function getRelatedProducts(
119
119
  response.data
120
120
  ? {
121
121
  data: products,
122
- count: response.data.getRelatedProducts.length,
122
+ count: response.data.length,
123
123
  facets: null,
124
124
  limit: 20,
125
125
  page: 1,
126
- totalCount: response.data.getRelatedProducts.length,
126
+ totalCount: response.data.length,
127
127
  }
128
128
  : null,
129
129
  response.graphQLErrors