@things-factory/integration-sellercraft 4.1.35 → 4.2.1
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-server/constants/order-status-mapping.js +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.js +17 -21
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js +2 -2
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js +12 -18
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js.map +1 -1
- package/dist-server/routers/sellercraft-router.js +6 -6
- package/dist-server/routers/sellercraft-router.js.map +1 -1
- package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js +182 -20
- package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js.map +1 -1
- package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js +36 -16
- package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js.map +1 -1
- package/package.json +15 -15
- package/server/constants/order-status-mapping.ts +1 -1
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.ts +18 -22
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts +3 -3
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.ts +18 -18
- package/server/routers/sellercraft-router.ts +10 -22
- package/server/service/marketplace-channel/marketplace-channel-order-mutation.ts +187 -32
- package/server/service/marketplace-channel/marketplace-channel-product-mutation.ts +50 -46
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.js
CHANGED
@@ -8,27 +8,7 @@ function ingestChannelCategories() {
|
|
8
8
|
path: '/channel/ingest/category',
|
9
9
|
denormalize(req) {
|
10
10
|
const { categories } = req;
|
11
|
-
let newCategories = categories
|
12
|
-
return {
|
13
|
-
native_category_id: category.categoryId.toString(),
|
14
|
-
channel_code: category.channelCode,
|
15
|
-
channel_country: category.countryCode,
|
16
|
-
category_name: category.categoryName,
|
17
|
-
is_leaf: category.isLeaf,
|
18
|
-
is_active: category.isActive,
|
19
|
-
children_categories: category.childrenCategories.map(childrenCategory => {
|
20
|
-
return {
|
21
|
-
native_category_id: category.categoryId.toString(),
|
22
|
-
channel_code: category.channelCode,
|
23
|
-
channel_country: category.countryCode,
|
24
|
-
category_name: childrenCategory.categoryName,
|
25
|
-
is_leaf: childrenCategory.isLeaf,
|
26
|
-
is_active: childrenCategory.isActive,
|
27
|
-
children_categories: {}
|
28
|
-
};
|
29
|
-
})
|
30
|
-
};
|
31
|
-
});
|
11
|
+
let newCategories = mapCategories(categories);
|
32
12
|
return {
|
33
13
|
payload: [...newCategories]
|
34
14
|
};
|
@@ -39,4 +19,20 @@ function ingestChannelCategories() {
|
|
39
19
|
};
|
40
20
|
}
|
41
21
|
exports.ingestChannelCategories = ingestChannelCategories;
|
22
|
+
function mapCategories(categories) {
|
23
|
+
if (!categories)
|
24
|
+
return null;
|
25
|
+
categories = categories.map(category => {
|
26
|
+
return {
|
27
|
+
native_category_id: category.categoryId.toString(),
|
28
|
+
channel_code: category.channelCode,
|
29
|
+
channel_country: category.countryCode,
|
30
|
+
category_name: category.categoryName,
|
31
|
+
is_leaf: category.isLeaf,
|
32
|
+
is_active: category.isActive,
|
33
|
+
children_categories: mapCategories(category.childrenCategories)
|
34
|
+
};
|
35
|
+
});
|
36
|
+
return categories;
|
37
|
+
}
|
42
38
|
//# sourceMappingURL=ingest-channel-categories.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ingest-channel-categories.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.ts"],"names":[],"mappings":";AAAA,+FAA+F;;;AAE/F,SAAgB,uBAAuB;IACrC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,0BAA0B;QAChC,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAA;YAE1B,IAAI,aAAa,GAAG,
|
1
|
+
{"version":3,"file":"ingest-channel-categories.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-categories.ts"],"names":[],"mappings":";AAAA,+FAA+F;;;AAE/F,SAAgB,uBAAuB;IACrC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,0BAA0B;QAChC,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAA;YAE1B,IAAI,aAAa,GAAG,aAAa,CAAC,UAAU,CAAC,CAAA;YAE7C,OAAO;gBACL,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC;aAC5B,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AAjBD,0DAiBC;AAED,SAAS,aAAa,CAAC,UAAU;IAC/B,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAA;IAC5B,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;QACrC,OAAO;YACL,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;YAClD,YAAY,EAAE,QAAQ,CAAC,WAAW;YAClC,eAAe,EAAE,QAAQ,CAAC,WAAW;YACrC,aAAa,EAAE,QAAQ,CAAC,YAAY;YACpC,OAAO,EAAE,QAAQ,CAAC,MAAM;YACxB,SAAS,EAAE,QAAQ,CAAC,QAAQ;YAC5B,mBAAmB,EAAE,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC;SAChE,CAAA;IACH,CAAC,CAAC,CAAA;IACF,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
/* https://docs.sellercraft.co/docs/api-integrations/
|
2
|
+
/* https://docs.sellercraft.co/docs/api-integrations/b3A6MjQzODQ4OTg-ingest-channel-order */
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.ingestChannelOrder = void 0;
|
5
5
|
const constants_1 = require("../../../constants");
|
@@ -49,7 +49,7 @@ function ingestChannelOrder() {
|
|
49
49
|
phone_1: order.billPhone1,
|
50
50
|
phone_2: order.billPhone2
|
51
51
|
},
|
52
|
-
order_items: order.
|
52
|
+
order_items: order.mappedOrderItems.map(orderItem => {
|
53
53
|
return {
|
54
54
|
native_item_id: orderItem.id.toString(),
|
55
55
|
native_variant_id: orderItem.variationId.toString(),
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ingest-channel-order.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts"],"names":[],"mappings":";AAAA
|
1
|
+
{"version":3,"file":"ingest-channel-order.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts"],"names":[],"mappings":";AAAA,4FAA4F;;;AAE5F,kDAAiD;AAEjD,SAAgB,kBAAkB;IAChC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,uBAAuB;QAC7B,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAA;YAEtB,IAAI,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACjC,OAAO;oBACL,eAAe,EAAE,KAAK,CAAC,cAAc;oBACrC,eAAe,EAAE,KAAK,CAAC,aAAa;oBACpC,eAAe,EAAE,KAAK,CAAC,EAAE;oBACzB,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;oBACxD,eAAe,EAAE,IAA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ACZ,CAAC;KACF,CAAA;AACH,CAAC;AA9ED,gDA8EC"}
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js
CHANGED
@@ -14,15 +14,12 @@ function ingestChannelProduct() {
|
|
14
14
|
seller_sku: variant.variationSku,
|
15
15
|
native_variant_id: variant.variationId.toString(),
|
16
16
|
label: variant.name,
|
17
|
-
is_enabled: variant.isEnabled,
|
18
|
-
is_sellable: variant.isSellable,
|
17
|
+
is_enabled: variant.isEnabled || true,
|
18
|
+
is_sellable: variant.isSellable || true,
|
19
19
|
is_deleted: false,
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
// native_attribute_id: attribute.native_attribute_id.toString()
|
24
|
-
// }
|
25
|
-
// }) || [],
|
20
|
+
variant_attributes: (variant === null || variant === void 0 ? void 0 : variant.attributes.map(attribute => {
|
21
|
+
return Object.assign(Object.assign({}, attribute), { native_attribute_id: attribute.native_attribute_id.toString() });
|
22
|
+
})) || [],
|
26
23
|
stock_locked: (variant === null || variant === void 0 ? void 0 : variant.stockLocked) ? variant.stockLocked : 0,
|
27
24
|
native_stock_reported: (variant === null || variant === void 0 ? void 0 : variant.stockReported) ? variant.stockReported : 0,
|
28
25
|
price_full: variant.fullPrice || 0,
|
@@ -30,7 +27,7 @@ function ingestChannelProduct() {
|
|
30
27
|
inventory_products: (variant === null || variant === void 0 ? void 0 : variant.inventoryProducts)
|
31
28
|
? variant.inventoryProducts.map(inventoryProduct => {
|
32
29
|
return {
|
33
|
-
quantity: inventoryProduct.qty,
|
30
|
+
quantity: inventoryProduct.qty || 1,
|
34
31
|
name: inventoryProduct.name,
|
35
32
|
inventory_sku: inventoryProduct.sku,
|
36
33
|
product_versions: (inventoryProduct === null || inventoryProduct === void 0 ? void 0 : inventoryProduct.productVersions)
|
@@ -61,20 +58,17 @@ function ingestChannelProduct() {
|
|
61
58
|
native_category_id: product.categoryId.toString(),
|
62
59
|
native_product_id: product.productId.toString(),
|
63
60
|
label: product.name,
|
64
|
-
brand: product.brand,
|
65
|
-
is_verified: product.isVerified,
|
61
|
+
brand: product.brand || '',
|
62
|
+
is_verified: product.isVerified || true,
|
66
63
|
flexible_attributes: product.channelCode == 'WCM' ? true : false,
|
67
|
-
images: product.images.map(image => {
|
64
|
+
images: product === null || product === void 0 ? void 0 : product.images.map(image => {
|
68
65
|
return {
|
69
66
|
file_url: image.url
|
70
67
|
};
|
71
68
|
}),
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
// native_attribute_id: attribute.native_attribute_id.toString()
|
76
|
-
// }
|
77
|
-
// }),
|
69
|
+
product_attributes: product === null || product === void 0 ? void 0 : product.attributes.map(attribute => {
|
70
|
+
return Object.assign(Object.assign({}, attribute), { native_attribute_id: attribute.native_attribute_id.toString() });
|
71
|
+
}),
|
78
72
|
variants: productVariations
|
79
73
|
};
|
80
74
|
});
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ingest-channel-product.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.ts"],"names":[],"mappings":";AAAA,+FAA+F;;;AAE/F,SAAgB,oBAAoB;IAClC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,yBAAyB;QAC/B,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAA;YAExB,IAAI,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;gBACvC,IAAI,iBAAiB,GAAU,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;oBAC9D,OAAO;wBACL,UAAU,EAAE,OAAO,CAAC,YAAY;wBAChC,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE;wBACjD,KAAK,EAAE,OAAO,CAAC,IAAI;wBACnB,UAAU,EAAE,OAAO,CAAC,SAAS;
|
1
|
+
{"version":3,"file":"ingest-channel-product.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.ts"],"names":[],"mappings":";AAAA,+FAA+F;;;AAE/F,SAAgB,oBAAoB;IAClC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,yBAAyB;QAC/B,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAA;YAExB,IAAI,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;gBACvC,IAAI,iBAAiB,GAAU,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;oBAC9D,OAAO;wBACL,UAAU,EAAE,OAAO,CAAC,YAAY;wBAChC,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE;wBACjD,KAAK,EAAE,OAAO,CAAC,IAAI;wBACnB,UAAU,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI;wBACrC,WAAW,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;wBACvC,UAAU,EAAE,KAAK;wBACjB,kBAAkB,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;4BACtD,uCACK,SAAS,KACZ,mBAAmB,EAAE,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAC9D;wBACH,CAAC,CAAC,KAAI,EAAE;wBACR,YAAY,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;wBAC5D,qBAAqB,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,EAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;wBACzE,UAAU,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;wBAClC,gBA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AvFD,oDAuFC"}
|
@@ -21,7 +21,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-price', async
|
|
21
21
|
var store = {}; // get from tokencraft
|
22
22
|
var result;
|
23
23
|
// https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
|
24
|
-
var fullPath = tokenCraftUrl
|
24
|
+
var fullPath = `${tokenCraftUrl}?channel_id=${requestBody[i].channel_id}&shop_id=${requestBody[i].shop_id}`;
|
25
25
|
const response = await fetch(fullPath, {
|
26
26
|
method: 'get',
|
27
27
|
headers: {
|
@@ -38,7 +38,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-price', async
|
|
38
38
|
storeURL: store.shop.credential.store_url,
|
39
39
|
platform: constants_1.PLATFORM[`${store.shop.org_prefix}`]
|
40
40
|
};
|
41
|
-
if (requestBody[i].native_variant_id) {
|
41
|
+
if (requestBody[i].native_variant_id != requestBody[i].native_product_id) {
|
42
42
|
const req = {
|
43
43
|
costPrice: requestBody[i].full_price,
|
44
44
|
sellPrice: requestBody[i].sale_price,
|
@@ -70,7 +70,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-stock', async
|
|
70
70
|
var store = {}; // get from tokencraft
|
71
71
|
var result;
|
72
72
|
// https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
|
73
|
-
var fullPath = tokenCraftUrl
|
73
|
+
var fullPath = `${tokenCraftUrl}?channel_id=${requestBody[i].channel_id}&shop_id=${requestBody[i].shop_id}`;
|
74
74
|
const response = await fetch(fullPath, {
|
75
75
|
method: 'get',
|
76
76
|
headers: {
|
@@ -87,7 +87,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-stock', async
|
|
87
87
|
storeURL: store.shop.credential.store_url,
|
88
88
|
platform: constants_1.PLATFORM[`${store.shop.org_prefix}`]
|
89
89
|
};
|
90
|
-
if (requestBody[i].native_variant_id) {
|
90
|
+
if (requestBody[i].native_variant_id != requestBody[i].native_product_id) {
|
91
91
|
const req = {
|
92
92
|
qty: requestBody[i].stock,
|
93
93
|
itemId: requestBody[i].native_product_id,
|
@@ -116,7 +116,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-order-status', async (
|
|
116
116
|
var result;
|
117
117
|
var store = {};
|
118
118
|
// https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
|
119
|
-
var fullPath = tokenCraftUrl
|
119
|
+
var fullPath = `${tokenCraftUrl}?channel_id=${requestBody.channel_id}&shop_id=${requestBody.shop_id}`;
|
120
120
|
const response = await fetch(fullPath, {
|
121
121
|
method: 'get',
|
122
122
|
headers: {
|
@@ -147,7 +147,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-attribute', as
|
|
147
147
|
const requestBody = context.request.body;
|
148
148
|
var store = {};
|
149
149
|
// https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
|
150
|
-
var fullPath = tokenCraftUrl
|
150
|
+
var fullPath = `${tokenCraftUrl}?channel_id=${requestBody.channel_id}&shop_id=${requestBody.shop_id}`;
|
151
151
|
const response = await fetch(fullPath, {
|
152
152
|
method: 'get',
|
153
153
|
headers: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sellercraft-router.js","sourceRoot":"","sources":["../../server/routers/sellercraft-router.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAE/B,6CAA4C;AAC5C,qFAAkE;AAClE,4CAAuC;AAEvC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,2DAA2D,CAAC,CAAA;AAE9E,QAAA,iBAAiB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AA;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,IAAI,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;QACzB,MAAM,kCAAQ,CAAC,sBAAsB,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAA;KACpF;IAED,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;AACtB,CAAC,CAAC,CAAA"}
|
@@ -43,12 +43,13 @@ let MarketplaceChannelOrderMutation = class MarketplaceChannelOrderMutation {
|
|
43
43
|
accessKey: shops[j].credential.consumer_key,
|
44
44
|
accessSecret: shops[j].credential.consumer_secret,
|
45
45
|
storeURL: shops[j].credential.store_url,
|
46
|
-
platform: channels[i].name
|
46
|
+
platform: channels[i].name,
|
47
|
+
accessToken: shops[j].credential.access_token // Magento+
|
47
48
|
};
|
48
49
|
// let countryCode = shops[j].country_code
|
49
50
|
// let channelCode = shops[j].org_prefix
|
50
|
-
let organisationId = shops[j].
|
51
|
-
let channelShopId = shops[j].
|
51
|
+
let organisationId = shops[j].account_id;
|
52
|
+
let channelShopId = shops[j].channel_shop_id;
|
52
53
|
const orderReq = {
|
53
54
|
fromDate: fromDate,
|
54
55
|
toDate: toDate
|
@@ -57,10 +58,10 @@ let MarketplaceChannelOrderMutation = class MarketplaceChannelOrderMutation {
|
|
57
58
|
var sellercraftStore = Object.assign(Object.assign({}, store), { platform: 'sellercraftChannelIntegration' });
|
58
59
|
let mappedOrderResult = orderResult.results.map(order => {
|
59
60
|
let { firstName: custFirstName, lastName: custLastName, orderCreatedAt: createdAt, orderUpdatedAt: updatedAt, orderNo: id, status } = order;
|
60
|
-
let { first_name: billFirstName, last_name: billLastName, address_1: billAddress1, address_2: billAddress2, address_3: billAddress3, address_4: billAddress4, address_5: billAddress5, city: billCity, postcode: billPostalCode, country: billCountry, phone: billPhone1, phone_2: billPhone2 } = order.billing;
|
61
|
+
let { first_name: billFirstName, last_name: billLastName, address_1: billAddress1, address_2: billAddress2, address_3: billAddress3, address_4: billAddress4, address_5: billAddress5, city: billCity, postcode: billPostalCode, country: billCountry, phone: billPhone1, phone_2: billPhone2 } = order === null || order === void 0 ? void 0 : order.billing;
|
61
62
|
let { first_name: shipFirstName, last_name: shipLastName, address_1: shipAddress1, address_2: shipAddress2, address_3: shipAddress3, address_4: shipAddress4, address_5: shipAddress5, city: shipCity, postcode: shipPostalCode, country: shipCountry, phone: shipPhone1, phone_2: shipPhone2 } = order.shipping;
|
62
63
|
let orderItems = order.orderItems.map(item => {
|
63
|
-
let { name: id, variationId: variationId, slaExpiresAt, total, totalTax, subtotal, subtotalTax } = item;
|
64
|
+
let { name: id, variationId: variationId, slaExpiresAt, total, totalTax, subtotal, subtotalTax, qty } = item;
|
64
65
|
return {
|
65
66
|
id,
|
66
67
|
variationId,
|
@@ -68,20 +69,157 @@ let MarketplaceChannelOrderMutation = class MarketplaceChannelOrderMutation {
|
|
68
69
|
createdAt: order.orderCreatedAt,
|
69
70
|
updatedAt: order.orderUpdatedAt,
|
70
71
|
charges: [
|
72
|
+
{
|
73
|
+
name: 'CHARGES_MARKETING',
|
74
|
+
grossAmount: 0,
|
75
|
+
nettAmount: 0
|
76
|
+
},
|
77
|
+
{
|
78
|
+
name: 'CLAIMS_DAMAGE',
|
79
|
+
grossAmount: 0,
|
80
|
+
nettAmount: 0
|
81
|
+
},
|
82
|
+
{
|
83
|
+
name: 'CLAIMS_LOST',
|
84
|
+
grossAmount: 0,
|
85
|
+
nettAmount: 0
|
86
|
+
},
|
87
|
+
{
|
88
|
+
name: 'COMMISSION_PLATFORM',
|
89
|
+
grossAmount: 0,
|
90
|
+
nettAmount: 0
|
91
|
+
},
|
92
|
+
{
|
93
|
+
name: 'DEPOSIT_PRESALE',
|
94
|
+
grossAmount: 0,
|
95
|
+
nettAmount: 0
|
96
|
+
},
|
97
|
+
{
|
98
|
+
name: 'FEE_MISCELLANEOUS',
|
99
|
+
grossAmount: 0,
|
100
|
+
nettAmount: 0
|
101
|
+
},
|
102
|
+
{
|
103
|
+
name: 'FEE_TRANSACTION',
|
104
|
+
grossAmount: 0,
|
105
|
+
nettAmount: 0
|
106
|
+
},
|
71
107
|
{
|
72
108
|
name: 'PRICE_NORMAL_SELLING',
|
73
109
|
grossAmount: total,
|
74
110
|
nettAmount: subtotal
|
75
111
|
},
|
112
|
+
{
|
113
|
+
name: 'PRICE_RECOMMENDED_RETAIL',
|
114
|
+
grossAmount: 0,
|
115
|
+
nettAmount: 0
|
116
|
+
},
|
117
|
+
{
|
118
|
+
name: 'PROMOTIONS_CUSTOMER_RECEIVED',
|
119
|
+
grossAmount: 0,
|
120
|
+
nettAmount: 0
|
121
|
+
},
|
122
|
+
{
|
123
|
+
name: 'PROMOTIONS_REBATE_PLATFORM',
|
124
|
+
grossAmount: 0,
|
125
|
+
nettAmount: 0
|
126
|
+
},
|
127
|
+
{
|
128
|
+
name: 'PROMOTIONS_REBATE_SELLER',
|
129
|
+
grossAmount: 0,
|
130
|
+
nettAmount: 0
|
131
|
+
},
|
132
|
+
{
|
133
|
+
name: 'REVERSAL_CHARGES_MARKETING',
|
134
|
+
grossAmount: 0,
|
135
|
+
nettAmount: 0
|
136
|
+
},
|
137
|
+
{
|
138
|
+
name: 'REVERSAL_COMMISSION',
|
139
|
+
grossAmount: 0,
|
140
|
+
nettAmount: 0
|
141
|
+
},
|
142
|
+
{
|
143
|
+
name: 'REVERSAL_FEE_MISCELLANEOUS',
|
144
|
+
grossAmount: 0,
|
145
|
+
nettAmount: 0
|
146
|
+
},
|
147
|
+
{
|
148
|
+
name: 'REVERSAL_PROMOTIONS_CUSTOMER_RECEIVED',
|
149
|
+
grossAmount: 0,
|
150
|
+
nettAmount: 0
|
151
|
+
},
|
152
|
+
{
|
153
|
+
name: 'REVERSAL_SELLER_RETURN_REFUND_AMOUNT',
|
154
|
+
grossAmount: 0,
|
155
|
+
nettAmount: 0
|
156
|
+
},
|
157
|
+
{
|
158
|
+
name: 'REVERSAL_SHIPPING_CUSTOMER_PAID',
|
159
|
+
grossAmount: 0,
|
160
|
+
nettAmount: 0
|
161
|
+
},
|
162
|
+
{
|
163
|
+
name: 'REVERSAL_SHIPPING_REBATE_PLATFORM',
|
164
|
+
grossAmount: 0,
|
165
|
+
nettAmount: 0
|
166
|
+
},
|
167
|
+
{
|
168
|
+
name: 'REVERSAL_SHIPPING_SELLER_PAID',
|
169
|
+
grossAmount: 0,
|
170
|
+
nettAmount: 0
|
171
|
+
},
|
172
|
+
{
|
173
|
+
name: 'SHIPPING_COST_TOTAL',
|
174
|
+
grossAmount: 0,
|
175
|
+
nettAmount: 0
|
176
|
+
},
|
177
|
+
{
|
178
|
+
name: 'SHIPPING_CUSTOMER_PAID',
|
179
|
+
grossAmount: 0,
|
180
|
+
nettAmount: 0
|
181
|
+
},
|
182
|
+
{
|
183
|
+
name: 'SHIPPING_REBATE_PLATFORM',
|
184
|
+
grossAmount: 0,
|
185
|
+
nettAmount: 0
|
186
|
+
},
|
187
|
+
{
|
188
|
+
name: 'SHIPPING_SELLER_PAID',
|
189
|
+
grossAmount: 0,
|
190
|
+
nettAmount: 0
|
191
|
+
},
|
76
192
|
{
|
77
193
|
name: 'TAXES',
|
78
194
|
grossAmount: totalTax,
|
79
195
|
nettAmount: subtotalTax
|
196
|
+
},
|
197
|
+
{
|
198
|
+
name: 'VOUCHERS_CUSTOMER_RECEIVED',
|
199
|
+
grossAmount: 0,
|
200
|
+
nettAmount: 0
|
201
|
+
},
|
202
|
+
{
|
203
|
+
name: 'VOUCHERS_REBATE_PLATFORM',
|
204
|
+
grossAmount: 0,
|
205
|
+
nettAmount: 0
|
206
|
+
},
|
207
|
+
{
|
208
|
+
name: 'VOUCHERS_REBATE_SELLER',
|
209
|
+
grossAmount: 0,
|
210
|
+
nettAmount: 0
|
80
211
|
}
|
81
212
|
],
|
82
|
-
slaExpiresAt
|
213
|
+
slaExpiresAt,
|
214
|
+
qty
|
83
215
|
};
|
84
216
|
});
|
217
|
+
let mappedOrderItems = [];
|
218
|
+
orderItems.map(oi => {
|
219
|
+
for (let i = 0; i < oi.qty; i++) {
|
220
|
+
mappedOrderItems.push(Object.assign(Object.assign({}, oi), { id: `${oi.id}-${i + 1}` }));
|
221
|
+
}
|
222
|
+
});
|
85
223
|
return {
|
86
224
|
custFirstName,
|
87
225
|
custLastName,
|
@@ -90,19 +228,19 @@ let MarketplaceChannelOrderMutation = class MarketplaceChannelOrderMutation {
|
|
90
228
|
id,
|
91
229
|
billFirstName,
|
92
230
|
billLastName,
|
93
|
-
billAddress1,
|
94
|
-
billAddress2,
|
95
|
-
billAddress3,
|
96
|
-
billAddress4,
|
97
|
-
billAddress5,
|
98
|
-
billCity,
|
99
|
-
billPostalCode,
|
100
|
-
billCountry,
|
101
|
-
billPhone1,
|
102
|
-
billPhone2,
|
231
|
+
billAddress1: billAddress1.toString() || shipAddress1.toString(),
|
232
|
+
billAddress2: billAddress2 || shipAddress2,
|
233
|
+
billAddress3: billAddress3 || shipAddress3,
|
234
|
+
billAddress4: billAddress4 || shipAddress4,
|
235
|
+
billAddress5: billAddress5 || shipAddress5,
|
236
|
+
billCity: billCity || shipCity,
|
237
|
+
billPostalCode: billPostalCode || shipPostalCode,
|
238
|
+
billCountry: billCountry || shipCountry,
|
239
|
+
billPhone1: billPhone1 || shipPhone1,
|
240
|
+
billPhone2: billPhone2 || shipPhone2,
|
103
241
|
shipFirstName,
|
104
242
|
shipLastName,
|
105
|
-
shipAddress1,
|
243
|
+
shipAddress1: shipAddress1.toString(),
|
106
244
|
shipAddress2,
|
107
245
|
shipAddress3,
|
108
246
|
shipAddress4,
|
@@ -112,14 +250,15 @@ let MarketplaceChannelOrderMutation = class MarketplaceChannelOrderMutation {
|
|
112
250
|
shipCountry,
|
113
251
|
shipPhone1,
|
114
252
|
shipPhone2,
|
115
|
-
|
253
|
+
mappedOrderItems,
|
116
254
|
channelShopId,
|
117
255
|
organisationId,
|
118
|
-
status
|
256
|
+
status,
|
257
|
+
charges: getOrderCharges(mappedOrderItems)
|
119
258
|
};
|
120
259
|
});
|
121
260
|
if (mappedOrderResult.length > 0) {
|
122
|
-
|
261
|
+
await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelOrder(sellercraftStore, { orders: mappedOrderResult });
|
123
262
|
}
|
124
263
|
}
|
125
264
|
return true;
|
@@ -139,4 +278,27 @@ MarketplaceChannelOrderMutation = __decorate([
|
|
139
278
|
(0, type_graphql_1.Resolver)()
|
140
279
|
], MarketplaceChannelOrderMutation);
|
141
280
|
exports.MarketplaceChannelOrderMutation = MarketplaceChannelOrderMutation;
|
281
|
+
function getOrderCharges(mappedOrderItems) {
|
282
|
+
let chargesList = [];
|
283
|
+
for (let i = 0; i < mappedOrderItems.length; i++) {
|
284
|
+
for (let j = 0; j < mappedOrderItems[i].charges.length; j++) {
|
285
|
+
let charge = mappedOrderItems[i].charges[j];
|
286
|
+
let foundCharge = chargesList.find(cl => cl.name == charge.name);
|
287
|
+
if (foundCharge) {
|
288
|
+
foundCharge.grossAmount = foundCharge.grossAmount + charge.grossAmount;
|
289
|
+
foundCharge.nettAmount = foundCharge.nettAmount + charge.nettAmount;
|
290
|
+
chargesList = chargesList.filter(cl => cl.name != charge.name);
|
291
|
+
}
|
292
|
+
else {
|
293
|
+
foundCharge = {
|
294
|
+
name: charge.name,
|
295
|
+
grossAmount: charge.grossAmount,
|
296
|
+
nettAmount: charge.nettAmount
|
297
|
+
};
|
298
|
+
}
|
299
|
+
chargesList.push(foundCharge);
|
300
|
+
}
|
301
|
+
}
|
302
|
+
return chargesList;
|
303
|
+
}
|
142
304
|
//# sourceMappingURL=marketplace-channel-order-mutation.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"marketplace-channel-order-mutation.js","sourceRoot":"","sources":["../../../server/service/marketplace-channel/marketplace-channel-order-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2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,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,eAAe;oBACjD,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS;oBACvC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;
|
1
|
+
{"version":3,"file":"marketplace-channel-order-mutation.js","sourceRoot":"","sources":["../../../server/service/marketplace-channel/marketplace-channel-order-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA2D;AAC3D,qCAAuC;AAEvC,+DAA0D;AAE1D,6CAA4C;AAC5C,qFAAkE;AAClE,+GAAwG;AAGxG,IAAa,+BAA+B,GAA5C,MAAa,+BAA+B;IAE1C,KAAK,CAAC,+BAA+B,CAClB,QAAgB,EAClB,MAAc,EACtB,OAAY;QAEnB,MAAM,mCAAmC,GAAG,YAAM,CAAC,GAAG,CAAC,qCAAqC,EAAE,EAAE,CAAC,CAAA;QACjG,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,mCAAmC,CAAA;QAE/F,MAAM,QAAQ,GAAyB,MAAM,IAAA,uBAAa,EAAC,wCAAkB,CAAC,CAAC,IAAI,EAAE,CAAA;QAErF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,IAAI,gBAAgB,GAAG,qBAAqB,GAAG,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;YACrF,MAAM,eAAe,GAAQ,MAAM,KAAK,CAAC,gBAAgB,EAAE;gBACzD,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,WAAW,EAAE,MAAM;iBACpB;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE;gBACvB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;aACjC;YACD,IAAI,a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