@things-factory/integration-sellercraft 4.3.11 → 4.3.19
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 +15 -15
- package/server/routers/sellercraft-router.ts +18 -14
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/integration-sellercraft",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.19",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -24,19 +24,19 @@
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@things-factory/apptool-ui": "^4.3.
|
28
|
-
"@things-factory/auth-ui": "^4.3.
|
29
|
-
"@things-factory/biz-base": "^4.3.
|
30
|
-
"@things-factory/code-ui": "^4.3.
|
31
|
-
"@things-factory/context-ui": "^4.3.
|
32
|
-
"@things-factory/grist-ui": "^4.3.
|
33
|
-
"@things-factory/i18n-base": "^4.3.
|
34
|
-
"@things-factory/integration-marketplace": "^4.3.
|
35
|
-
"@things-factory/integration-ui": "^4.3.
|
36
|
-
"@things-factory/more-ui": "^4.3.
|
37
|
-
"@things-factory/resource-ui": "^4.3.
|
38
|
-
"@things-factory/setting-ui": "^4.3.
|
39
|
-
"@things-factory/system-ui": "^4.3.
|
27
|
+
"@things-factory/apptool-ui": "^4.3.14",
|
28
|
+
"@things-factory/auth-ui": "^4.3.14",
|
29
|
+
"@things-factory/biz-base": "^4.3.14",
|
30
|
+
"@things-factory/code-ui": "^4.3.14",
|
31
|
+
"@things-factory/context-ui": "^4.3.14",
|
32
|
+
"@things-factory/grist-ui": "^4.3.14",
|
33
|
+
"@things-factory/i18n-base": "^4.3.14",
|
34
|
+
"@things-factory/integration-marketplace": "^4.3.15",
|
35
|
+
"@things-factory/integration-ui": "^4.3.15",
|
36
|
+
"@things-factory/more-ui": "^4.3.14",
|
37
|
+
"@things-factory/resource-ui": "^4.3.14",
|
38
|
+
"@things-factory/setting-ui": "^4.3.14",
|
39
|
+
"@things-factory/system-ui": "^4.3.14",
|
40
40
|
"debug": "^4.1.1",
|
41
41
|
"node-fetch": "^2.6.0",
|
42
42
|
"querystring": "^0.2.1"
|
@@ -51,5 +51,5 @@
|
|
51
51
|
"nock": "^13.0.2",
|
52
52
|
"should": "^13.2.3"
|
53
53
|
},
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "2dddec18e371e5714d9f7a6bd0412741064af1d2"
|
55
55
|
}
|
@@ -49,19 +49,19 @@ sellercraftRouter.post('/sellercraft/store/update-product-price', async (context
|
|
49
49
|
try {
|
50
50
|
if (requestBody[i].native_variant_id != requestBody[i].native_product_id) {
|
51
51
|
const req = {
|
52
|
-
costPrice: requestBody[i].full_price,
|
53
|
-
sellPrice: requestBody[i].sale_price,
|
52
|
+
costPrice: requestBody[i].variant.full_price,
|
53
|
+
sellPrice: requestBody[i].variant.sale_price,
|
54
54
|
productId: requestBody[i].native_product_id,
|
55
|
-
variationId: requestBody[i].native_variant_id,
|
56
|
-
variationSku: requestBody[i].sku
|
55
|
+
variationId: requestBody[i].variant.native_variant_id,
|
56
|
+
variationSku: requestBody[i].variant.sku
|
57
57
|
}
|
58
58
|
result = await StoreAPI.updateStoreProductVariationPrice(mappedStore, req)
|
59
59
|
} else {
|
60
60
|
const req = {
|
61
|
-
costPrice: requestBody[i].full_price,
|
62
|
-
sellPrice: requestBody[i].sale_price,
|
61
|
+
costPrice: requestBody[i].variant.full_price,
|
62
|
+
sellPrice: requestBody[i].variant.sale_price,
|
63
63
|
productId: requestBody[i].native_product_id,
|
64
|
-
variationSku: requestBody[i].sku
|
64
|
+
variationSku: requestBody[i].variant.sku
|
65
65
|
}
|
66
66
|
result = await StoreAPI.updateStoreProductPrice(mappedStore, req)
|
67
67
|
}
|
@@ -117,19 +117,19 @@ sellercraftRouter.post('/sellercraft/store/update-product-stock', async (context
|
|
117
117
|
try {
|
118
118
|
if (requestBody[i].native_variant_id != requestBody[i].native_product_id) {
|
119
119
|
const req = {
|
120
|
-
qty: requestBody[i].stock,
|
120
|
+
qty: requestBody[i].variant.stock,
|
121
121
|
itemId: requestBody[i].native_product_id,
|
122
|
-
variationId: requestBody[i].native_variant_id,
|
122
|
+
variationId: requestBody[i].variant.native_variant_id,
|
123
123
|
distributors: requestBody[i].distributors || [], // for Magento
|
124
|
-
variationSku: requestBody[i].sku
|
124
|
+
variationSku: requestBody[i].variant.sku
|
125
125
|
}
|
126
126
|
result = await StoreAPI.updateStoreProductVariationStock(mappedStore, req)
|
127
127
|
} else {
|
128
128
|
const req = {
|
129
|
-
qty: requestBody[i].stock,
|
129
|
+
qty: requestBody[i].variant.stock,
|
130
130
|
itemId: requestBody[i].native_product_id,
|
131
131
|
distributors: requestBody[i].distributors || [], // for Magento
|
132
|
-
variationSku: requestBody[i].sku
|
132
|
+
variationSku: requestBody[i].variant.sku
|
133
133
|
}
|
134
134
|
result = await StoreAPI.updateStoreProductStock(mappedStore, req)
|
135
135
|
}
|
@@ -187,7 +187,7 @@ sellercraftRouter.post('/sellercraft/store/update-order-status', async (context,
|
|
187
187
|
status: requestBody.order_status,
|
188
188
|
carrier: requestBody?.shipper_last_mile,
|
189
189
|
trackingNo: requestBody?.tracking_number,
|
190
|
-
orderItems: requestBody?.
|
190
|
+
orderItems: requestBody?.order_items,
|
191
191
|
isSOF: requestBody?.seller_logistics
|
192
192
|
}
|
193
193
|
|
@@ -244,7 +244,11 @@ sellercraftRouter.post('/sellercraft/store/update-order-status', async (context,
|
|
244
244
|
name: orderPackage.shippingProvider,
|
245
245
|
is_cod_supported: orderPackage?.isCodSupport ? orderPackage.isCodSupport : false
|
246
246
|
},
|
247
|
-
order_item_ids: orderPackage?.orderListIdList
|
247
|
+
order_item_ids: orderPackage?.orderListIdList
|
248
|
+
? orderPackage.orderListIdList
|
249
|
+
: reqBody.orderItems.map(oi => {
|
250
|
+
return oi.native_order_item_id
|
251
|
+
})
|
248
252
|
} || {}
|
249
253
|
|
250
254
|
responseBody.package = newOrderPackage
|