@things-factory/integration-sellercraft 4.2.3 → 4.2.8
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 +18 -4
- package/dist-server/constants/order-status-mapping.js.map +1 -1
- package/dist-server/constants/platform.js +2 -1
- package/dist-server/constants/platform.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js +5 -2
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.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 +25 -8
- package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js.map +1 -1
- package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js +8 -4
- package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js.map +1 -1
- package/dist-server/routers/sellercraft-router.js +26 -17
- package/dist-server/routers/sellercraft-router.js.map +1 -1
- package/dist-server/service/marketplace-channel/marketplace-channel-order-mutation.js +291 -233
- 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 +41 -23
- package/dist-server/service/marketplace-channel/marketplace-channel-product-mutation.js.map +1 -1
- package/package.json +3 -3
- package/server/constants/order-status-mapping.ts +18 -3
- package/server/constants/platform.ts +2 -1
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.ts +6 -2
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts +2 -2
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.ts +34 -15
- package/server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.ts +8 -4
- package/server/routers/sellercraft-router.ts +23 -17
- package/server/service/marketplace-channel/marketplace-channel-order-mutation.ts +345 -271
- package/server/service/marketplace-channel/marketplace-channel-product-mutation.ts +38 -35
@@ -1,14 +1,28 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ORDER_STATUS = void 0;
|
3
|
+
exports.SHIPPING_TYPE = exports.ORDER_STATUS = void 0;
|
4
4
|
exports.ORDER_STATUS = {
|
5
|
-
pending: '
|
6
|
-
processing: '
|
5
|
+
pending: 'CONFIRMED',
|
6
|
+
processing: 'CONFIRMED',
|
7
7
|
completed: 'DELIVERED',
|
8
8
|
cancelled: 'CANCELLED',
|
9
9
|
canceled: 'CANCELLED',
|
10
10
|
refunded: 'REFUND_COMPLETE',
|
11
11
|
failed: 'SHIPMENT_LOST_OR_DAMAGED',
|
12
|
-
refund: 'REFUND_COMPLETE'
|
12
|
+
refund: 'REFUND_COMPLETE',
|
13
|
+
ttk_100: 'PAYMENT_PENDING',
|
14
|
+
ttk_111: 'CONFIRMED',
|
15
|
+
ttk_112: 'READY_TO_SHIP',
|
16
|
+
ttk_121: 'SHIPPED',
|
17
|
+
ttk_122: 'DELIVERED',
|
18
|
+
ttk_130: 'CLOSED',
|
19
|
+
ttk_140: 'CANCELLED',
|
20
|
+
ttk_201: 'INITIATED_CANCELLATION',
|
21
|
+
ttk_202: '',
|
22
|
+
ttk_203: 'CANCELLED' // CANCEL_COMPLETED
|
23
|
+
};
|
24
|
+
exports.SHIPPING_TYPE = {
|
25
|
+
DROP_SHIPPING: 'DROP_SHIPPING',
|
26
|
+
CROSS_DOCKING_PICKUP: 'CROSS_DOCKING_PICKUP'
|
13
27
|
};
|
14
28
|
//# sourceMappingURL=order-status-mapping.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order-status-mapping.js","sourceRoot":"","sources":["../../server/constants/order-status-mapping.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"order-status-mapping.js","sourceRoot":"","sources":["../../server/constants/order-status-mapping.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,iBAAiB;IAC3B,MAAM,EAAE,0BAA0B;IAClC,MAAM,EAAE,iBAAiB;IACzB,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,eAAe;IACxB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,WAAW,CAAC,mBAAmB;CACzC,CAAA;AAEY,QAAA,aAAa,GAAG;IAC3B,aAAa,EAAE,eAAe;IAC9B,oBAAoB,EAAE,sBAAsB;CAC7C,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../server/constants/platform.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,SAAS;
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../server/constants/platform.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACtB,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,QAAQ;CACd,CAAA"}
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.js
CHANGED
@@ -24,10 +24,10 @@ function ingestChannelOrderPackage() {
|
|
24
24
|
is_cod_supported: shipper_last_mile.isCodSupported,
|
25
25
|
name: shipper_last_mile.name
|
26
26
|
};
|
27
|
-
|
27
|
+
let newOrderPackage = {
|
28
28
|
channel_shop_id,
|
29
29
|
native_order_id,
|
30
|
-
native_package_id,
|
30
|
+
native_package_id: native_package_id.toString(),
|
31
31
|
shipping_tracking_code,
|
32
32
|
shipping_type_value,
|
33
33
|
warehouse_code,
|
@@ -36,6 +36,9 @@ function ingestChannelOrderPackage() {
|
|
36
36
|
shipper_last_mile,
|
37
37
|
order_item_ids
|
38
38
|
};
|
39
|
+
return {
|
40
|
+
payload: Object.assign({}, newOrderPackage)
|
41
|
+
};
|
39
42
|
},
|
40
43
|
normalize(res) {
|
41
44
|
return res;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ingest-channel-order-package.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.ts"],"names":[],"mappings":";AAAA,oGAAoG;;;AAEpG,SAAgB,yBAAyB;IACvC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,+BAA+B;QACrC,WAAW,CAAC,GAAG;YACb,IAAI,EACF,aAAa,EAAE,eAAe,EAC9B,aAAa,EAAE,eAAe,EAC9B,eAAe,EAAE,iBAAiB,EAClC,oBAAoB,EAAE,sBAAsB,EAC5C,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,EAAE,cAAc,EAC7B,OAAO,EACP,SAAS,EACT,eAAe,EAAE,iBAAiB,EAClC,YAAY,EAAE,cAAc,EAC7B,GAAG,GAAG,CAAA;YAEP,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;gBAC5B,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA;gBAEvE,OAAO;oBACL,eAAe;oBACf,SAAS;oBACT,IAAI;iBACL,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,GAAG;gBACR,gBAAgB,EAAE,OAAO,CAAC,cAAc;gBACxC,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAA;YAED,iBAAiB,GAAG;gBAClB,gBAAgB,EAAE,iBAAiB,CAAC,cAAc;gBAClD,IAAI,EAAE,iBAAiB,CAAC,IAAI;aAC7B,CAAA;YAED,
|
1
|
+
{"version":3,"file":"ingest-channel-order-package.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft-channel-integration/apis/ingest-channel-order-package.ts"],"names":[],"mappings":";AAAA,oGAAoG;;;AAEpG,SAAgB,yBAAyB;IACvC,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,+BAA+B;QACrC,WAAW,CAAC,GAAG;YACb,IAAI,EACF,aAAa,EAAE,eAAe,EAC9B,aAAa,EAAE,eAAe,EAC9B,eAAe,EAAE,iBAAiB,EAClC,oBAAoB,EAAE,sBAAsB,EAC5C,iBAAiB,EAAE,mBAAmB,EACtC,aAAa,EAAE,cAAc,EAC7B,OAAO,EACP,SAAS,EACT,eAAe,EAAE,iBAAiB,EAClC,YAAY,EAAE,cAAc,EAC7B,GAAG,GAAG,CAAA;YAEP,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;gBAC5B,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA;gBAEvE,OAAO;oBACL,eAAe;oBACf,SAAS;oBACT,IAAI;iBACL,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO,GAAG;gBACR,gBAAgB,EAAE,OAAO,CAAC,cAAc;gBACxC,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAA;YAED,iBAAiB,GAAG;gBAClB,gBAAgB,EAAE,iBAAiB,CAAC,cAAc;gBAClD,IAAI,EAAE,iBAAiB,CAAC,IAAI;aAC7B,CAAA;YAED,IAAI,eAAe,GAAQ;gBACzB,eAAe;gBACf,eAAe;gBACf,iBAAiB,EAAE,iBAAiB,CAAC,QAAQ,EAAE;gBAC/C,sBAAsB;gBACtB,mBAAmB;gBACnB,cAAc;gBACd,OAAO;gBACP,SAAS;gBACT,iBAAiB;gBACjB,cAAc;aACf,CAAA;YAED,OAAO;gBACL,OAAO,oBAAO,eAAe,CAAE;aAChC,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AA3DD,8DA2DC"}
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.js
CHANGED
@@ -13,7 +13,7 @@ function ingestChannelOrder() {
|
|
13
13
|
return {
|
14
14
|
organisation_id: order.organisationId,
|
15
15
|
channel_shop_id: order.channelShopId,
|
16
|
-
native_order_id: order.id,
|
16
|
+
native_order_id: order.id.toString(),
|
17
17
|
ordered_at_date: new Date(order.createdAt).toISOString(),
|
18
18
|
ordered_at_time: new Date(order.createdAt).toISOString(),
|
19
19
|
updated_at_date: new Date(order.updatedAt).toISOString(),
|
@@ -58,7 +58,7 @@ function ingestChannelOrder() {
|
|
58
58
|
ordered_at_time: new Date(order.createdAt).toISOString(),
|
59
59
|
updated_at_date: new Date(order.updatedAt).toISOString(),
|
60
60
|
updated_at_time: new Date(order.updatedAt).toISOString(),
|
61
|
-
sla_expires_at:
|
61
|
+
sla_expires_at: (orderItem === null || orderItem === void 0 ? void 0 : orderItem.slaExpiresAt) ? new Date(orderItem.slaExpiresAt).toISOString() : null,
|
62
62
|
charges: orderItem.charges.map(charge => {
|
63
63
|
return {
|
64
64
|
charge_type_value: charge.name,
|
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,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;
|
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,CAAC,QAAQ,EAAE;oBACpC,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;oBACxD,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;oBACxD,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;oBACxD,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;oBACxD,mBAAmB,EAAE,KAAK,CAAC,aAAa;oBACxC,kBAAkB,EAAE,KAAK,CAAC,YAAY;oBACtC,OAAO,EAAE,EAAE;oBACX,gBAAgB,EAAE;wBAChB,UAAU,EAAE,KAAK,CAAC,aAAa;wBAC/B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,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;4BACxD,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;4BACxD,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;4BACxD,cAAc,EAAE,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,EAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI;4BAC/F,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;gCACtC,OAAO;oCACL,iBAAiB,EAAE,MAAM,CAAC,IAAI;oCAC9B,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;oCACjD,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;iCAChD,CAAA;4BACH,CAAC,CAAC;4BACF,kBAAkB,EAAE,wBAAY,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;yBACpD,CAAA;oBACH,CAAC,CAAC;iBACH,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;aACxB,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AA9ED,gDA8EC"}
|
package/dist-server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.js
CHANGED
@@ -9,6 +9,7 @@ function ingestChannelProduct() {
|
|
9
9
|
denormalize(req) {
|
10
10
|
const { products } = req;
|
11
11
|
let newProducts = products.map(product => {
|
12
|
+
var _a, _b;
|
12
13
|
let productVariations = product.variations.map(variant => {
|
13
14
|
return {
|
14
15
|
seller_sku: variant.variationSku,
|
@@ -29,7 +30,7 @@ function ingestChannelProduct() {
|
|
29
30
|
inventory_products: (variant === null || variant === void 0 ? void 0 : variant.inventoryProducts)
|
30
31
|
? variant.inventoryProducts.map(inventoryProduct => {
|
31
32
|
return {
|
32
|
-
quantity: inventoryProduct.qty ||
|
33
|
+
quantity: inventoryProduct.qty || 0,
|
33
34
|
name: inventoryProduct.name,
|
34
35
|
inventory_sku: inventoryProduct.sku,
|
35
36
|
product_versions: (inventoryProduct === null || inventoryProduct === void 0 ? void 0 : inventoryProduct.productVersions)
|
@@ -43,7 +44,7 @@ function ingestChannelProduct() {
|
|
43
44
|
package_weight_gram: (productVersion === null || productVersion === void 0 ? void 0 : productVersion.packageWeightGram)
|
44
45
|
? productVersion.packageWeightGram
|
45
46
|
: 0,
|
46
|
-
stock_available: productVersion.qty
|
47
|
+
stock_available: productVersion.qty
|
47
48
|
};
|
48
49
|
})
|
49
50
|
: []
|
@@ -62,18 +63,34 @@ function ingestChannelProduct() {
|
|
62
63
|
label: product.name,
|
63
64
|
brand: product.brand || '',
|
64
65
|
is_verified: product.isVerified || true,
|
65
|
-
flexible_attributes: product.channelCode == 'WCM' ? true : false,
|
66
|
-
images: product === null || product === void 0 ? void 0 : product.images.map(image => {
|
66
|
+
flexible_attributes: product.channelCode == 'WCM' || product.channelCode == 'MGT' ? true : false,
|
67
|
+
images: ((_a = product === null || product === void 0 ? void 0 : product.images) === null || _a === void 0 ? void 0 : _a.map(image => {
|
67
68
|
return {
|
68
69
|
file_url: image.url
|
69
70
|
};
|
70
|
-
}),
|
71
|
-
product_attributes: product === null || product === void 0 ? void 0 : product.attributes.map(attribute => {
|
71
|
+
})) || [],
|
72
|
+
product_attributes: ((_b = product === null || product === void 0 ? void 0 : product.attributes) === null || _b === void 0 ? void 0 : _b.map(attribute => {
|
72
73
|
return Object.assign(Object.assign({}, attribute), { native_attribute_id: attribute.native_attribute_id.toString() });
|
73
|
-
}),
|
74
|
-
variants: productVariations
|
74
|
+
})) || [],
|
75
|
+
variants: productVariations,
|
76
|
+
has_all_variants: product.channelCode == 'MGT' ? false : true
|
75
77
|
};
|
76
78
|
});
|
79
|
+
if (products[0].channelCode == 'MGT') {
|
80
|
+
let newList = [];
|
81
|
+
for (let np of newProducts) {
|
82
|
+
if (np.native_product_id == np.variants[0].native_variant_id) {
|
83
|
+
let vars = newProducts
|
84
|
+
.filter(e => e.native_product_id == np.native_product_id)
|
85
|
+
.map(e => {
|
86
|
+
return e.variants[0];
|
87
|
+
});
|
88
|
+
np.variants = vars;
|
89
|
+
newList.push(np);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
newProducts = newList;
|
93
|
+
}
|
77
94
|
return {
|
78
95
|
payload: [...newProducts]
|
79
96
|
};
|
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
|
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,OAA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CAAC,iBAAiB,EAAE;wBAC5D,IAAI,IAAI,GAAG,WAAW;6BACnB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,iBAAiB,CAAC;6BACxD,GAAG,CAAC,CAAC,CAAC,EAAE;4BACP,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;wBACtB,CAAC,CAAC,CAAA;wBACJ,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAA;wBAClB,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;qBACjB;iBACF;gBACD,WAAW,GAAG,OAAO,CAAA;aACtB;YAED,OAAO;gBACL,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC;aAC1B,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AA5GD,oDA4GC"}
|
package/dist-server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.js
CHANGED
@@ -33,10 +33,12 @@ class SellercraftChannelIntegration {
|
|
33
33
|
body: jsondata
|
34
34
|
});
|
35
35
|
if (response.ok) {
|
36
|
-
|
36
|
+
const result = await response.json();
|
37
|
+
return result;
|
37
38
|
}
|
38
39
|
else {
|
39
|
-
|
40
|
+
const result = await response.json();
|
41
|
+
throw new Error(`(${response.status}) ${result.message}`);
|
40
42
|
}
|
41
43
|
}
|
42
44
|
async put(path, data = {}) {
|
@@ -58,7 +60,8 @@ class SellercraftChannelIntegration {
|
|
58
60
|
return await response.json();
|
59
61
|
}
|
60
62
|
else {
|
61
|
-
|
63
|
+
const result = await response.json();
|
64
|
+
throw new Error(`(${response.status}) ${result.message}`);
|
62
65
|
}
|
63
66
|
}
|
64
67
|
async get(path, data = {}) {
|
@@ -82,7 +85,8 @@ class SellercraftChannelIntegration {
|
|
82
85
|
return await response.json();
|
83
86
|
}
|
84
87
|
else {
|
85
|
-
|
88
|
+
const result = await response.json();
|
89
|
+
throw new Error(`(${response.status}) ${result.message}`);
|
86
90
|
}
|
87
91
|
}
|
88
92
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sellercraft-channel-integration.js","sourceRoot":"","sources":["../../../server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA8B;AAC9B,iDAA0B;AAE1B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,oDAAoD,CAAC,CAAA;AAMpF,MAAa,6BAA6B;IAGxC,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,qBACN,MAAM,CACV,CAAA;IACH,CAAC;IAED,UAAU;QACR,OAAO,gCAAgC,CAAA;IACzC,CAAC;IAED,iBAAiB;QACf,OAAO,IAAA,YAAI,GAAE,CAAA;IACf,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY,EAAE,OAAY,EAAE;QACrC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;QAE9B,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QAEnB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;QACrC,MAAM,SAAS,GAAW,IAAI,CAAC,iBAAiB,EAAE,CAAA;QAClD,MAAM,QAAQ,GAAW,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,EAAE,CAAA;QAEtD,MAAM,QAAQ,GAAQ,MAAM,IAAA,oBAAK,EAAC,QAAQ,EAAE;YAC1C,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,UAAU,EAAE,SAAS;gBACrB,WAAW,EAAE,MAAM;aACpB;YACD,IAAI,EAAE,QAAQ;SACf,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,
|
1
|
+
{"version":3,"file":"sellercraft-channel-integration.js","sourceRoot":"","sources":["../../../server/controllers/sell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;aACxD,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,MAAM,QAAQ,GAAW,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,EAAE,CAAA;QACtD,MAAM,QAAQ,GAAG,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;QACnD,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;QAE3B,MAAM,SAAS,GAAW,IAAI,CAAC,iBAAiB,EAAE,CAAA;QAElD,MAAM,QAAQ,GAAQ,MAAM,IAAA,oBAAK,EAAC,QAAQ,EAAE;YAC1C,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,UAAU,EAAE,SAAS;gBACrB,WAAW,EAAE,MAAM;aACpB;SACF,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,EAAE,EAAE;YACf,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;SAC7B;aAAM;YACL,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;YACpC,MAAM,IAAI,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAA;SAC1D;IACH,CAAC;CACF;AApGD,sEAoGC"}
|
@@ -11,6 +11,7 @@ const constants_1 = require("../constants");
|
|
11
11
|
const debug = require('debug')('things-factory:integration-sellercraft:sellercraft-router');
|
12
12
|
exports.sellercraftRouter = new koa_router_1.default();
|
13
13
|
exports.sellercraftRouter.post('/sellercraft/store/update-product-price', async (context, next) => {
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
14
15
|
const sellercraftChannelIntegrationConfig = env_1.config.get('sellercraftChannelIntegrationConfig', {});
|
15
16
|
const { tokenCraftApiKey: apiKey, tokenCraftUrl } = sellercraftChannelIntegrationConfig;
|
16
17
|
const xApiKey = context.headers['x-api-key'];
|
@@ -33,11 +34,12 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-price', async
|
|
33
34
|
store = await response.json();
|
34
35
|
}
|
35
36
|
let mappedStore = {
|
36
|
-
accessKey: store.shop.credential.consumer_key,
|
37
|
-
accessSecret: store.shop.credential.consumer_secret,
|
38
|
-
storeURL: store.shop.credential.store_url,
|
37
|
+
accessKey: ((_b = (_a = store.shop) === null || _a === void 0 ? void 0 : _a.credential) === null || _b === void 0 ? void 0 : _b.consumer_key) || '',
|
38
|
+
accessSecret: ((_d = (_c = store.shop) === null || _c === void 0 ? void 0 : _c.credential) === null || _d === void 0 ? void 0 : _d.consumer_secret) || '',
|
39
|
+
storeURL: (_f = (_e = store.shop) === null || _e === void 0 ? void 0 : _e.credential) === null || _f === void 0 ? void 0 : _f.store_url,
|
39
40
|
platform: constants_1.PLATFORM[`${store.shop.org_prefix}`],
|
40
|
-
accessToken: store.shop.credential.access_token
|
41
|
+
accessToken: (_h = (_g = store.shop) === null || _g === void 0 ? void 0 : _g.credential) === null || _h === void 0 ? void 0 : _h.access_token,
|
42
|
+
channelShopId: (_j = store.shop) === null || _j === void 0 ? void 0 : _j.channel_shop_id
|
41
43
|
};
|
42
44
|
if (requestBody[i].native_variant_id != requestBody[i].native_product_id) {
|
43
45
|
const req = {
|
@@ -63,6 +65,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-price', async
|
|
63
65
|
context.status = 200;
|
64
66
|
});
|
65
67
|
exports.sellercraftRouter.post('/sellercraft/store/update-product-stock', async (context, next) => {
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
66
69
|
const sellercraftChannelIntegrationConfig = env_1.config.get('sellercraftChannelIntegrationConfig', {});
|
67
70
|
const { tokenCraftApiKey: apiKey, tokenCraftUrl } = sellercraftChannelIntegrationConfig;
|
68
71
|
const xApiKey = context.headers['x-api-key'];
|
@@ -85,11 +88,12 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-stock', async
|
|
85
88
|
store = await response.json();
|
86
89
|
}
|
87
90
|
let mappedStore = {
|
88
|
-
accessKey: store.shop.credential.consumer_key,
|
89
|
-
accessSecret: store.shop.credential.consumer_secret,
|
90
|
-
storeURL: store.shop.credential.store_url,
|
91
|
+
accessKey: ((_b = (_a = store.shop) === null || _a === void 0 ? void 0 : _a.credential) === null || _b === void 0 ? void 0 : _b.consumer_key) || '',
|
92
|
+
accessSecret: ((_d = (_c = store.shop) === null || _c === void 0 ? void 0 : _c.credential) === null || _d === void 0 ? void 0 : _d.consumer_secret) || '',
|
93
|
+
storeURL: (_f = (_e = store.shop) === null || _e === void 0 ? void 0 : _e.credential) === null || _f === void 0 ? void 0 : _f.store_url,
|
91
94
|
platform: constants_1.PLATFORM[`${store.shop.org_prefix}`],
|
92
|
-
accessToken: store.shop.credential.access_token
|
95
|
+
accessToken: (_h = (_g = store.shop) === null || _g === void 0 ? void 0 : _g.credential) === null || _h === void 0 ? void 0 : _h.access_token,
|
96
|
+
channelShopId: (_j = store.shop) === null || _j === void 0 ? void 0 : _j.channel_shop_id
|
93
97
|
};
|
94
98
|
if (requestBody[i].native_variant_id != requestBody[i].native_product_id) {
|
95
99
|
const req = {
|
@@ -115,6 +119,7 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-stock', async
|
|
115
119
|
context.status = 200;
|
116
120
|
});
|
117
121
|
exports.sellercraftRouter.post('/sellercraft/store/update-order-status', async (context, next) => {
|
122
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
118
123
|
const sellercraftChannelIntegrationConfig = env_1.config.get('sellercraftChannelIntegrationConfig', {});
|
119
124
|
const { tokenCraftApiKey: apiKey, tokenCraftUrl } = sellercraftChannelIntegrationConfig;
|
120
125
|
const xApiKey = context.headers['x-api-key'];
|
@@ -136,23 +141,26 @@ exports.sellercraftRouter.post('/sellercraft/store/update-order-status', async (
|
|
136
141
|
store = await response.json();
|
137
142
|
}
|
138
143
|
let mappedStore = {
|
139
|
-
accessKey: store.shop.credential.consumer_key,
|
140
|
-
accessSecret: store.shop.credential.consumer_secret,
|
141
|
-
storeURL: store.shop.credential.store_url,
|
144
|
+
accessKey: ((_b = (_a = store.shop) === null || _a === void 0 ? void 0 : _a.credential) === null || _b === void 0 ? void 0 : _b.consumer_key) || '',
|
145
|
+
accessSecret: ((_d = (_c = store.shop) === null || _c === void 0 ? void 0 : _c.credential) === null || _d === void 0 ? void 0 : _d.consumer_secret) || '',
|
146
|
+
storeURL: (_f = (_e = store.shop) === null || _e === void 0 ? void 0 : _e.credential) === null || _f === void 0 ? void 0 : _f.store_url,
|
142
147
|
platform: constants_1.PLATFORM[`${store.shop.org_prefix}`],
|
143
|
-
accessToken: store.shop.credential.access_token
|
148
|
+
accessToken: (_h = (_g = store.shop) === null || _g === void 0 ? void 0 : _g.credential) === null || _h === void 0 ? void 0 : _h.access_token,
|
149
|
+
channelShopId: (_j = store.shop) === null || _j === void 0 ? void 0 : _j.channel_shop_id
|
144
150
|
};
|
145
151
|
const reqBody = {
|
146
152
|
orderId: requestBody.native_order_id,
|
147
153
|
status: requestBody.order_status,
|
148
154
|
carrier: requestBody === null || requestBody === void 0 ? void 0 : requestBody.shipper_last_mile,
|
149
|
-
trackingNo: requestBody === null || requestBody === void 0 ? void 0 : requestBody.tracking_number
|
155
|
+
trackingNo: requestBody === null || requestBody === void 0 ? void 0 : requestBody.tracking_number,
|
156
|
+
orderItems: requestBody === null || requestBody === void 0 ? void 0 : requestBody.order_item_ids
|
150
157
|
};
|
151
158
|
result = await integration_marketplace_1.StoreAPI.updateOrderStatus(mappedStore, reqBody);
|
152
159
|
debug(result);
|
153
160
|
context.status = 200;
|
154
161
|
});
|
155
162
|
exports.sellercraftRouter.post('/sellercraft/store/update-product-attribute', async (context, next) => {
|
163
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
156
164
|
const sellercraftChannelIntegrationConfig = env_1.config.get('sellercraftChannelIntegrationConfig', {});
|
157
165
|
const { tokenCraftApiKey: apiKey, tokenCraftUrl } = sellercraftChannelIntegrationConfig;
|
158
166
|
const xApiKey = context.headers['x-api-key'];
|
@@ -173,11 +181,12 @@ exports.sellercraftRouter.post('/sellercraft/store/update-product-attribute', as
|
|
173
181
|
store = await response.json();
|
174
182
|
}
|
175
183
|
let mappedStore = {
|
176
|
-
accessKey: store.shop.credential.consumer_key,
|
177
|
-
accessSecret: store.shop.credential.consumer_secret,
|
178
|
-
storeURL: store.shop.credential.store_url,
|
184
|
+
accessKey: ((_b = (_a = store.shop) === null || _a === void 0 ? void 0 : _a.credential) === null || _b === void 0 ? void 0 : _b.consumer_key) || '',
|
185
|
+
accessSecret: ((_d = (_c = store.shop) === null || _c === void 0 ? void 0 : _c.credential) === null || _d === void 0 ? void 0 : _d.consumer_secret) || '',
|
186
|
+
storeURL: (_f = (_e = store.shop) === null || _e === void 0 ? void 0 : _e.credential) === null || _f === void 0 ? void 0 : _f.store_url,
|
179
187
|
platform: constants_1.PLATFORM[`${store.shop.org_prefix}`],
|
180
|
-
accessToken: store.shop.credential.access_token
|
188
|
+
accessToken: (_h = (_g = store.shop) === null || _g === void 0 ? void 0 : _g.credential) === null || _h === void 0 ? void 0 : _h.access_token,
|
189
|
+
channelShopId: (_j = store.shop) === null || _j === void 0 ? void 0 : _j.channel_shop_id
|
181
190
|
};
|
182
191
|
let { product_sku: productSku, native_product_id: itemId, variants } = requestBody;
|
183
192
|
variants.map(variant => {
|
@@ -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;
|
1
|
+
{"version":3,"file":"sellercraft-router.js","sourceRoot":"","sources":["../../server/routers/sellercraft-router.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAE/B,6CAA4C;AAC5C,qFAAkE;AAElE,4CAAuC;AAEvC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,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