@ikas/storefront-api 4.0.0-alpha.11 → 4.0.0-alpha.12
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.
|
|
3
|
+
"version": "4.0.0-alpha.12",
|
|
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.
|
|
25
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
24
|
+
"@ikas/storefront-config": "^4.0.0-alpha.12",
|
|
25
|
+
"@ikas/storefront-models": "^4.0.0-alpha.12",
|
|
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.
|
|
39
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
38
|
+
"@ikas/storefront-config": "^4.0.0-alpha.12",
|
|
39
|
+
"@ikas/storefront-models": "^4.0.0-alpha.12",
|
|
40
40
|
"axios": "^0.26.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
IkasFavoriteProduct,
|
|
32
32
|
IkasLastViewedProduct,
|
|
33
33
|
IkasOrder,
|
|
34
|
+
IkasOrderLineItem,
|
|
34
35
|
IkasOrderRefundSettings,
|
|
35
36
|
IkasOrderTransaction,
|
|
36
37
|
initIkasCustomerAttribute,
|
|
@@ -192,6 +193,14 @@ export async function getOrders(params: GetCustomerOrdersQueryParams) {
|
|
|
192
193
|
const response = await _getCustomerOrders(params);
|
|
193
194
|
const data: IkasOrder[] | undefined = response.data as any;
|
|
194
195
|
|
|
196
|
+
data?.forEach((order) => {
|
|
197
|
+
if (order.orderLineItems?.length) {
|
|
198
|
+
order.orderLineItems = order.orderLineItems.filter(
|
|
199
|
+
(orderLineItem: IkasOrderLineItem) => !orderLineItem.deleted
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
195
204
|
return new APIResponse(data, response.graphQLErrors);
|
|
196
205
|
}
|
|
197
206
|
|
package/src/api/product/index.ts
CHANGED
|
@@ -266,6 +266,7 @@ function simpleToProduct(simple: SearchProduct): IkasProduct {
|
|
|
266
266
|
shortDescription: simple.shortDescription || "",
|
|
267
267
|
productOptionSetId: simple.productOptionSetId,
|
|
268
268
|
variantTypes: simple.productVariantTypes.map((pvt) => ({
|
|
269
|
+
order: pvt.order,
|
|
269
270
|
variantType: {
|
|
270
271
|
id: pvt.variantType.id,
|
|
271
272
|
name: pvt.variantType.name,
|