@things-factory/integration-sellercraft 4.2.5 → 4.2.7
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 +11 -1
- 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.js +1 -1
- 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 +5 -4
- 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/service/marketplace-channel/marketplace-channel-order-mutation.js +253 -243
- 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 +30 -16
- 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 +11 -1
- package/server/constants/platform.ts +2 -1
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-order.ts +1 -1
- package/server/controllers/sellercraft-channel-integration/apis/ingest-channel-product.ts +13 -11
- package/server/controllers/sellercraft-channel-integration/sellercraft-channel-integration.ts +8 -4
- package/server/service/marketplace-channel/marketplace-channel-order-mutation.ts +303 -282
- package/server/service/marketplace-channel/marketplace-channel-product-mutation.ts +30 -28
@@ -9,6 +9,16 @@ exports.ORDER_STATUS = {
|
|
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
|
13
23
|
};
|
14
24
|
//# 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,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;
|
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"}
|
@@ -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.js
CHANGED
@@ -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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E,KAAK,CAAC,YAAY;wBAC1B,MAAM,EAAE,KAAK,CAAC,YAAY;wBAC1B,MAAM,EAAE,KAAK,CAAC,YAAY;wBAC1B,MAAM,EAAE,KAAK,CAAC,YAAY;wBAC1B,IAAI,EAAE,KAAK,CAAC,QAAQ;wBACpB,WAAW,EAAE,KAAK,CAAC,cAAc;wBACjC,OAAO,EAAE,KAAK,CAAC,WAAW;wBAC1B,OAAO,EAAE,KAAK,CAAC,UAAU;wBACzB,OAAO,EAAE,KAAK,CAAC,UAAU;qBAC1B;oBACD,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;wBAClD,OAAO;4BACL,cAAc,EAAE,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE;4BACvC,iBAAiB,EAAE,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE;4BACnD,aAAa,EAAE,SAAS,CAAC,QAAQ;4BACjC,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,eAAe,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;4BACxD,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,GA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AAW,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,
|
@@ -63,14 +64,14 @@ function ingestChannelProduct() {
|
|
63
64
|
brand: product.brand || '',
|
64
65
|
is_verified: product.isVerified || true,
|
65
66
|
flexible_attributes: product.channelCode == 'WCM' || product.channelCode == 'MGT' ? true : false,
|
66
|
-
images: product === null || product === void 0 ? void 0 : product.images.map(image => {
|
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
|
+
})) || [],
|
74
75
|
variants: productVariations,
|
75
76
|
has_all_variants: product.channelCode == 'MGT' ? false : true
|
76
77
|
};
|
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,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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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/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,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