@things-factory/integration-sellercraft 4.1.35 → 4.1.40

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.
@@ -24,7 +24,7 @@ function ingestChannelCategories() {
24
24
  category_name: childrenCategory.categoryName,
25
25
  is_leaf: childrenCategory.isLeaf,
26
26
  is_active: childrenCategory.isActive,
27
- children_categories: {}
27
+ children_categories: []
28
28
  };
29
29
  })
30
30
  };
@@ -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,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;gBAC5C,OAAO;oBACL,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;oBAClD,YAAY,EAAE,QAAQ,CAAC,WAAW;oBAClC,eAAe,EAAE,QAAQ,CAAC,WAAW;oBACrC,aAAa,EAAE,QAAQ,CAAC,YAAY;oBACpC,OAAO,EAAE,QAAQ,CAAC,MAAM;oBACxB,SAAS,EAAE,QAAQ,CAAC,QAAQ;oBAC5B,mBAAmB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;wBACtE,OAAO;4BACL,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;4BAClD,YAAY,EAAE,QAAQ,CAAC,WAAW;4BAClC,eAAe,EAAE,QAAQ,CAAC,WAAW;4BACrC,aAAa,EAAE,gBAAgB,CAAC,YAAY;4BAC5C,OAAO,EAAE,gBAAgB,CAAC,MAAM;4BAChC,SAAS,EAAE,gBAAgB,CAAC,QAAQ;4BACpC,mBAAmB,EAAE,EAAE;yBACxB,CAAA;oBACH,CAAC,CAAC;iBACH,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,OAAO,EAAE,CAAE,GAAG,aAAa,CAAE;aAC9B,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AArCD,0DAqCC"}
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,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;gBAC5C,OAAO;oBACL,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;oBAClD,YAAY,EAAE,QAAQ,CAAC,WAAW;oBAClC,eAAe,EAAE,QAAQ,CAAC,WAAW;oBACrC,aAAa,EAAE,QAAQ,CAAC,YAAY;oBACpC,OAAO,EAAE,QAAQ,CAAC,MAAM;oBACxB,SAAS,EAAE,QAAQ,CAAC,QAAQ;oBAC5B,mBAAmB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;wBACtE,OAAO;4BACL,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE;4BAClD,YAAY,EAAE,QAAQ,CAAC,WAAW;4BAClC,eAAe,EAAE,QAAQ,CAAC,WAAW;4BACrC,aAAa,EAAE,gBAAgB,CAAC,YAAY;4BAC5C,OAAO,EAAE,gBAAgB,CAAC,MAAM;4BAChC,SAAS,EAAE,gBAAgB,CAAC,QAAQ;4BACpC,mBAAmB,EAAE,EAAE;yBACxB,CAAA;oBACH,CAAC,CAAC;iBACH,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,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;AArCD,0DAqCC"}
@@ -17,12 +17,6 @@ function ingestChannelProduct() {
17
17
  is_enabled: variant.isEnabled,
18
18
  is_sellable: variant.isSellable,
19
19
  is_deleted: false,
20
- // variant_attributes: variant?.attributes.map(attribute => {
21
- // return {
22
- // ...attribute,
23
- // native_attribute_id: attribute.native_attribute_id.toString()
24
- // }
25
- // }) || [],
26
20
  stock_locked: (variant === null || variant === void 0 ? void 0 : variant.stockLocked) ? variant.stockLocked : 0,
27
21
  native_stock_reported: (variant === null || variant === void 0 ? void 0 : variant.stockReported) ? variant.stockReported : 0,
28
22
  price_full: variant.fullPrice || 0,
@@ -30,7 +24,7 @@ function ingestChannelProduct() {
30
24
  inventory_products: (variant === null || variant === void 0 ? void 0 : variant.inventoryProducts)
31
25
  ? variant.inventoryProducts.map(inventoryProduct => {
32
26
  return {
33
- quantity: inventoryProduct.qty,
27
+ quantity: inventoryProduct.qty || 0,
34
28
  name: inventoryProduct.name,
35
29
  inventory_sku: inventoryProduct.sku,
36
30
  product_versions: (inventoryProduct === null || inventoryProduct === void 0 ? void 0 : inventoryProduct.productVersions)
@@ -61,7 +55,7 @@ function ingestChannelProduct() {
61
55
  native_category_id: product.categoryId.toString(),
62
56
  native_product_id: product.productId.toString(),
63
57
  label: product.name,
64
- brand: product.brand,
58
+ brand: product.brand || '',
65
59
  is_verified: product.isVerified,
66
60
  flexible_attributes: product.channelCode == 'WCM' ? true : false,
67
61
  images: product.images.map(image => {
@@ -69,12 +63,6 @@ function ingestChannelProduct() {
69
63
  file_url: image.url
70
64
  };
71
65
  }),
72
- // product_attributes: product.attributes.map(attribute => {
73
- // return {
74
- // ...attribute,
75
- // native_attribute_id: attribute.native_attribute_id.toString()
76
- // }
77
- // }),
78
66
  variants: productVariations
79
67
  };
80
68
  });
@@ -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;wBAC7B,WAAW,EAAE,OAAO,CAAC,UAAU;wBAC/B,UAAU,EAAE,KAAK;wBACjB,6DAA6D;wBAC7D,aAAa;wBACb,oBAAoB;wBACpB,oEAAoE;wBACpE,MAAM;wBACN,YAAY;wBACZ,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,I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wCACJ,CAAC,CAAC,EAAE;iCACP,CAAA;4BACH,CAAC,CAAC;4BACJ,CAAC,CAAC,EAAE;qBACP,CAAA;gBACH,CAAC,CAAC,CAAA;gBAEF,OAAO;oBACL,eAAe,EAAE,OAAO,CAAC,cAAc;oBACvC,eAAe,EAAE,OAAO,CAAC,aAAa;oBACtC,YAAY,EAAE,OAAO,CAAC,WAAW;oBACjC,eAAe,EAAE,OAAO,CAAC,cAAc;oBACvC,kBAAkB,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE;oBACjD,iBAAiB,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;oBAC/C,KAAK,EAAE,OAAO,CAAC,IAAI;oBACnB,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,WAAW,EAAE,OAAO,CAAC,UAAU;oBAC/B,mBAAmB,EAAE,OAAO,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;oBAChE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;wBACjC,OAAO;4BACL,QAAQ,EAAE,KAAK,CAAC,GAAG;yBACpB,CAAA;oBACH,CAAC,CAAC;oBACF,4DAA4D;oBAC5D,aAAa;oBACb,oBAAoB;oBACpB,oEAAoE;oBACpE,MAAM;oBACN,MAAM;oBACN,QAAQ,EAAE,iBAAiB;iBAC5B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,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;AAvFD,oDAuFC"}
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,oBAAo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,EAAE;oBAC/C,KAAK,EAAE,OAAO,CAAC,IAAI;oBACnB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,EAAE;oBAC1B,WAAW,EAAE,OAAO,CAAC,UAAU;oBAC/B,mBAAmB,EAAE,OAAO,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;oBAChE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;wBACjC,OAAO;4BACL,QAAQ,EAAE,KAAK,CAAC,GAAG;yBACpB,CAAA;oBACH,CAAC,CAAC;oBACF,QAAQ,EAAE,iBAAiB;iBAC5B,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,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;AA3ED,oDA2EC"}
@@ -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 + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody[i].shop_id;
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: {
@@ -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 + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody[i].shop_id;
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: {
@@ -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 + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody.shop_id;
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 + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody.shop_id;
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,M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ceChannelOrderMutation = class MarketplaceChannelOrderMutation {
119
119
  };
120
120
  });
121
121
  if (mappedOrderResult.length > 0) {
122
- const ingestOrder = await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelOrder(sellercraftStore, { orders: mappedOrderResult });
122
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelOrder(sellercraftStore, { orders: mappedOrderResult });
123
123
  }
124
124
  }
125
125
  return true;
@@ -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,+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,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U,EAAE,QAAQ;iCACrB;gCACD;oCACE,IAAI,EAAE,OAAO;oCACb,WAAW,EAAE,QAAQ;oCACrB,UAAU,EAAE,WAAW;iCACxB;6BACF;4BACD,YAAY;yBACb,CAAA;oBACH,CAAC,CAAC,CAAA;oBAEF,OAAO;wBACL,aAAa;wBACb,YAAY;wBACZ,SAAS;wBACT,SAAS;wBACT,EAAE;wBACF,aAAa;wBACb,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,QAAQ;wBACR,cAAc;wBACd,WAAW;wBACX,UAAU;wBACV,UAAU;wBACV,aAAa;wBACb,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,QAAQ;wBACR,cAAc;wBACd,WAAW;wBACX,UAAU;wBACV,UAAU;wBACV,UAAU;wBACV,aAAa;wBACb,cAAc;wBACd,MAAM;qBACP,CAAA;gBAEH,CAAC,CAAC,CAAA;gBAEF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;oBAChC,MAAM,WAAW,GAAG,MAAM,sEAAgC,CAAC,kBAAkB,CAC3E,gBAAgB,EAChB,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAC9B,CAAA;iBACF;aACF;YAED,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;CACF,CAAA;AAzKC;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IAE1B,WAAA,IAAA,kBAAG,EAAC,UAAU,CAAC,CAAA;IACf,WAAA,IAAA,kBAAG,EAAC,QAAQ,CAAC,CAAA;IACb,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;sFAqKP;AA1KU,+BAA+B;IAD3C,IAAA,uBAAQ,GAAE;GACE,+BAA+B,CA2K3C;AA3KY,0EAA+B"}
1
+ {"version":3,"file":"marketplace-channel-order-mutation.js","sourceRoot":"","sources":["../../../server/service/marketplace-chann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wBACd,WAAW;wBACX,UAAU;wBACV,UAAU;wBACV,aAAa;wBACb,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,YAAY;wBACZ,QAAQ;wBACR,cAAc;wBACd,WAAW;wBACX,UAAU;wBACV,UAAU;wBACV,UAAU;wBACV,aAAa;wBACb,cAAc;wBACd,MAAM;qBACP,CAAA;gBACH,CAAC,CAAC,CAAA;gBAEF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;oBAChC,MAAM,sEAAgC,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAA;iBAC3G;aACF;YAED,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;CACF,CAAA;AA7JC;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IAE1B,WAAA,IAAA,kBAAG,EAAC,UAAU,CAAC,CAAA;IACf,WAAA,IAAA,kBAAG,EAAC,QAAQ,CAAC,CAAA;IACb,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;sFAyJP;AA9JU,+BAA+B;IAD3C,IAAA,uBAAQ,GAAE;GACE,+BAA+B,CA+J3C;AA/JY,0EAA+B"}
@@ -47,12 +47,12 @@ let MarketplaceChannelProductMutation = class MarketplaceChannelProductMutation
47
47
  };
48
48
  let countryCode = shops[j].country_code;
49
49
  let channelCode = shops[j].org_prefix;
50
- let organisationId = shops[j].credential.account_id;
51
- let channelShopId = shops[j].credential.channel_shop_id;
50
+ let organisationId = shops[j].account_id;
51
+ let channelShopId = shops[j].channel_shop_id;
52
52
  var sellercraftStore = Object.assign(Object.assign({}, store), { platform: 'sellercraftChannelIntegration' });
53
53
  const productResult = await integration_marketplace_1.StoreAPI.getStoreProducts(store, {});
54
54
  const categoryResult = await integration_marketplace_1.StoreAPI.getStoreProductCategories(store, {});
55
- let mappedProducts = productResult.results.map((item) => {
55
+ let mappedProducts = productResult.results.map(item => {
56
56
  let { categoryId, itemId: productId, name, brand, isVerified, images, attributes, variations } = item;
57
57
  variations = variations.map(variation => {
58
58
  let { variationSku, variationId, name, isEnabled: isEnabled, isEnabled: isSellable, attributes, stockLocked, qty: stockReported, costPrice: fullPrice, sellPrice: priceDiscounted, length, width, height, weight } = variation;
@@ -67,19 +67,23 @@ let MarketplaceChannelProductMutation = class MarketplaceChannelProductMutation
67
67
  stockReported,
68
68
  fullPrice,
69
69
  priceDiscounted,
70
- inventoryProducts: [{
70
+ inventoryProducts: [
71
+ {
71
72
  qty: stockReported,
72
73
  name: `${name} - ${variationSku}`,
73
74
  sku: variationSku,
74
- productVersions: [{
75
+ productVersions: [
76
+ {
75
77
  label: 'Default',
76
78
  packageLengthMM: length,
77
79
  packageWidthMM: width,
78
80
  packageHeightMM: height,
79
81
  packageWeightGram: weight,
80
82
  qty: 1
81
- }]
82
- }]
83
+ }
84
+ ]
85
+ }
86
+ ]
83
87
  };
84
88
  });
85
89
  images = images.map(image => {
@@ -102,7 +106,7 @@ let MarketplaceChannelProductMutation = class MarketplaceChannelProductMutation
102
106
  variations
103
107
  };
104
108
  });
105
- let mappedCategories = categoryResult.results.map((category) => {
109
+ let mappedCategories = categoryResult.results.map(category => {
106
110
  let { id: categoryId, name: categoryName, parent, isActive } = category;
107
111
  return {
108
112
  categoryId,
@@ -114,11 +118,13 @@ let MarketplaceChannelProductMutation = class MarketplaceChannelProductMutation
114
118
  countryCode
115
119
  };
116
120
  });
117
- mappedCategories.map((category) => {
121
+ mappedCategories.map(category => {
118
122
  category.childrenCategories = mappedCategories.filter(e => e.parent == category.categoryId);
119
123
  });
120
- const ingestCategory = await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelCategories(sellercraftStore, { categories: mappedCategories });
121
- const ingestProduct = await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelProduct(sellercraftStore, { products: mappedProducts });
124
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelCategories(sellercraftStore, {
125
+ categories: mappedCategories
126
+ });
127
+ await sellercraft_channel_integration_api_1.SellercraftChannelIntegrationAPI.ingestChannelProduct(sellercraftStore, { products: mappedProducts });
122
128
  }
123
129
  return true;
124
130
  }
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace-channel-product-mutation.js","sourceRoot":"","sources":["../../../server/service/marketplace-channel/marketplace-channel-product-mutation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAsD;AACtD,qCAAuC;AAEvC,+DAA0D;AAE1D,6CAA4C;AAC5C,qFAAkE;AAClE,+GAAwG;AAGxG,IAAa,iCAAiC,GAA9C,MAAa,iCAAiC;IAE5C,KAAK,CAAC,iCAAiC,CAC9B,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,aAAa,GAAG,MAAM,eAA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E,OAAO;wBACL,UAAU;wBACV,YAAY;wBACZ,MAAM;wBACN,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;wBAClC,QAAQ,EAAE,QAAQ,IAAI,IAAI;wBAC1B,WAAW;wBACX,WAAW;qBACZ,CAAA;gBACH,CAAC,CAAC,CAAA;gBAEF,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;oBAC9B,QAAQ,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAA;gBAC7F,CAAC,CAAC,CAAA;gBAEF,MAAM,sEAAgC,CAAC,uBAAuB,CAAC,gBAAgB,EAAE;oBAC/E,UAAU,EAAE,gBAAgB;iBAC7B,CAAC,CAAA;gBAEF,MAAM,sEAAgC,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAA;aAC5G;YAED,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;CACF,CAAA;AA/IC;IADC,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IACY,WAAA,IAAA,kBAAG,GAAE,CAAA;;;;0FA8I7C;AAhJU,iCAAiC;IAD7C,IAAA,uBAAQ,GAAE;GACE,iCAAiC,CAiJ7C;AAjJY,8EAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-sellercraft",
3
- "version": "4.1.35",
3
+ "version": "4.1.40",
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.1.28",
28
- "@things-factory/auth-ui": "^4.1.28",
29
- "@things-factory/biz-base": "^4.1.28",
30
- "@things-factory/code-ui": "^4.1.28",
31
- "@things-factory/context-ui": "^4.1.28",
32
- "@things-factory/grist-ui": "^4.1.28",
33
- "@things-factory/i18n-base": "^4.1.28",
34
- "@things-factory/integration-marketplace": "^4.1.35",
35
- "@things-factory/integration-ui": "^4.1.28",
36
- "@things-factory/more-ui": "^4.1.28",
37
- "@things-factory/resource-ui": "^4.1.28",
38
- "@things-factory/setting-ui": "^4.1.28",
39
- "@things-factory/system-ui": "^4.1.28",
27
+ "@things-factory/apptool-ui": "^4.1.40",
28
+ "@things-factory/auth-ui": "^4.1.40",
29
+ "@things-factory/biz-base": "^4.1.40",
30
+ "@things-factory/code-ui": "^4.1.40",
31
+ "@things-factory/context-ui": "^4.1.40",
32
+ "@things-factory/grist-ui": "^4.1.40",
33
+ "@things-factory/i18n-base": "^4.1.40",
34
+ "@things-factory/integration-marketplace": "^4.1.40",
35
+ "@things-factory/integration-ui": "^4.1.40",
36
+ "@things-factory/more-ui": "^4.1.40",
37
+ "@things-factory/resource-ui": "^4.1.40",
38
+ "@things-factory/setting-ui": "^4.1.40",
39
+ "@things-factory/system-ui": "^4.1.40",
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": "a7e4a62c6ab05d18879ab945ac0f10be440a5f34"
54
+ "gitHead": "060b5c664e80a6fcba09598f2c7ceffe067e02bf"
55
55
  }
@@ -23,14 +23,14 @@ export function ingestChannelCategories() {
23
23
  category_name: childrenCategory.categoryName,
24
24
  is_leaf: childrenCategory.isLeaf,
25
25
  is_active: childrenCategory.isActive,
26
- children_categories: {}
26
+ children_categories: []
27
27
  }
28
28
  })
29
29
  }
30
30
  })
31
31
 
32
32
  return {
33
- payload: [ ...newCategories ]
33
+ payload: [...newCategories]
34
34
  }
35
35
  },
36
36
  normalize(res) {
@@ -16,12 +16,6 @@ export function ingestChannelProduct() {
16
16
  is_enabled: variant.isEnabled,
17
17
  is_sellable: variant.isSellable,
18
18
  is_deleted: false, // default
19
- // variant_attributes: variant?.attributes.map(attribute => {
20
- // return {
21
- // ...attribute,
22
- // native_attribute_id: attribute.native_attribute_id.toString()
23
- // }
24
- // }) || [],
25
19
  stock_locked: variant?.stockLocked ? variant.stockLocked : 0,
26
20
  native_stock_reported: variant?.stockReported ? variant.stockReported : 0,
27
21
  price_full: variant.fullPrice || 0,
@@ -29,7 +23,7 @@ export function ingestChannelProduct() {
29
23
  inventory_products: variant?.inventoryProducts
30
24
  ? variant.inventoryProducts.map(inventoryProduct => {
31
25
  return {
32
- quantity: inventoryProduct.qty,
26
+ quantity: inventoryProduct.qty || 0,
33
27
  name: inventoryProduct.name,
34
28
  inventory_sku: inventoryProduct.sku,
35
29
  product_versions: inventoryProduct?.productVersions
@@ -61,7 +55,7 @@ export function ingestChannelProduct() {
61
55
  native_category_id: product.categoryId.toString(),
62
56
  native_product_id: product.productId.toString(),
63
57
  label: product.name,
64
- brand: product.brand,
58
+ brand: product.brand || '',
65
59
  is_verified: product.isVerified,
66
60
  flexible_attributes: product.channelCode == 'WCM' ? true : false, // add channels that do not support category_attributes ingestion
67
61
  images: product.images.map(image => {
@@ -69,12 +63,6 @@ export function ingestChannelProduct() {
69
63
  file_url: image.url
70
64
  }
71
65
  }),
72
- // product_attributes: product.attributes.map(attribute => {
73
- // return {
74
- // ...attribute,
75
- // native_attribute_id: attribute.native_attribute_id.toString()
76
- // }
77
- // }),
78
66
  variants: productVariations
79
67
  }
80
68
  })
@@ -23,7 +23,7 @@ sellercraftRouter.post('/sellercraft/store/update-product-price', async (context
23
23
  var result
24
24
 
25
25
  // https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
26
- var fullPath = tokenCraftUrl + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody[i].shop_id
26
+ var fullPath = `${tokenCraftUrl}?channel_id=${requestBody[i].channel_id}&shop_id=${requestBody[i].shop_id}`
27
27
  const response: any = await fetch(fullPath, {
28
28
  method: 'get',
29
29
  headers: {
@@ -79,7 +79,7 @@ sellercraftRouter.post('/sellercraft/store/update-product-stock', async (context
79
79
  var result
80
80
 
81
81
  // https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
82
- var fullPath = tokenCraftUrl + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody[i].shop_id
82
+ var fullPath = `${tokenCraftUrl}?channel_id=${requestBody[i].channel_id}&shop_id=${requestBody[i].shop_id}`
83
83
  const response: any = await fetch(fullPath, {
84
84
  method: 'get',
85
85
  headers: {
@@ -131,7 +131,7 @@ sellercraftRouter.post('/sellercraft/store/update-order-status', async (context,
131
131
  var store: any = {}
132
132
 
133
133
  // https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
134
- var fullPath = tokenCraftUrl + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody.shop_id
134
+ var fullPath = `${tokenCraftUrl}?channel_id=${requestBody.channel_id}&shop_id=${requestBody.shop_id}`
135
135
  const response: any = await fetch(fullPath, {
136
136
  method: 'get',
137
137
  headers: {
@@ -170,7 +170,7 @@ sellercraftRouter.post('/sellercraft/store/update-product-attribute', async (con
170
170
  var store: any = {}
171
171
 
172
172
  // https://staging-tokencraft.sellercraft.co/v1/get-shop?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=dd9cf3b7-114f-4d74-a7e2-7b524ae086f2
173
- var fullPath = tokenCraftUrl + '?channel_id=4bfb3362-d57c-47f8-8781-007316d179bf&shop_id=' + requestBody.shop_id
173
+ var fullPath = `${tokenCraftUrl}?channel_id=${requestBody.channel_id}&shop_id=${requestBody.shop_id}`
174
174
  const response: any = await fetch(fullPath, {
175
175
  method: 'get',
176
176
  headers: {
@@ -188,26 +188,14 @@ sellercraftRouter.post('/sellercraft/store/update-product-attribute', async (con
188
188
  storeURL: store.shop.credential.store_url,
189
189
  platform: PLATFORM[`${store.shop.org_prefix}`]
190
190
  }
191
-
192
- let {
193
- product_sku: productSku,
194
- native_product_id: itemId,
195
- variants
196
- } = requestBody
191
+
192
+ let { product_sku: productSku, native_product_id: itemId, variants } = requestBody
197
193
 
198
194
  variants.map(variant => {
199
- let {
200
- variant_sku: variantSku,
201
- native_variant_id: variantId,
202
- attributes
203
- } = variant
195
+ let { variant_sku: variantSku, native_variant_id: variantId, attributes } = variant
204
196
 
205
197
  attributes.map(attribute => {
206
- let {
207
- native_attribute_id: id,
208
- attribute_key: name,
209
- attribute_value: value
210
- } = attribute
198
+ let { native_attribute_id: id, attribute_key: name, attribute_value: value } = attribute
211
199
 
212
200
  return {
213
201
  id,
@@ -47,7 +47,7 @@ export class MarketplaceChannelOrderMutation {
47
47
  // let countryCode = shops[j].country_code
48
48
  // let channelCode = shops[j].org_prefix
49
49
  let organisationId = shops[j].credential.account_id
50
- let channelShopId = shops[j].credential.channel_shop_id
50
+ let channelShopId = shops[j].credential.channel_shop_id
51
51
 
52
52
  const orderReq = {
53
53
  fromDate: fromDate,
@@ -98,15 +98,7 @@ export class MarketplaceChannelOrderMutation {
98
98
  } = order.shipping
99
99
 
100
100
  let orderItems = order.orderItems.map(item => {
101
- let {
102
- name: id,
103
- variationId: variationId,
104
- slaExpiresAt,
105
- total,
106
- totalTax,
107
- subtotal,
108
- subtotalTax
109
- } = item
101
+ let { name: id, variationId: variationId, slaExpiresAt, total, totalTax, subtotal, subtotalTax } = item
110
102
 
111
103
  return {
112
104
  id,
@@ -165,14 +157,10 @@ export class MarketplaceChannelOrderMutation {
165
157
  organisationId,
166
158
  status
167
159
  }
168
-
169
160
  })
170
161
 
171
162
  if (mappedOrderResult.length > 0) {
172
- const ingestOrder = await SellercraftChannelIntegrationAPI.ingestChannelOrder(
173
- sellercraftStore,
174
- { orders: mappedOrderResult }
175
- )
163
+ await SellercraftChannelIntegrationAPI.ingestChannelOrder(sellercraftStore, { orders: mappedOrderResult })
176
164
  }
177
165
  }
178
166
 
@@ -10,9 +10,7 @@ import { SellercraftChannelIntegrationAPI } from '../../controllers/sellercraft-
10
10
  @Resolver()
11
11
  export class MarketplaceChannelProductMutation {
12
12
  @Mutation(returns => Boolean)
13
- async syncAllMarketplaceChannelProducts(
14
- @Ctx() context: any
15
- ): Promise<boolean> {
13
+ async syncAllMarketplaceChannelProducts(@Ctx() context: any): Promise<boolean> {
16
14
  const sellercraftChannelIntegrationConfig = config.get('sellercraftChannelIntegrationConfig', {})
17
15
  const { tokenCraftApiKey: apiKey, getShopsTokenCraftUrl } = sellercraftChannelIntegrationConfig
18
16
 
@@ -44,8 +42,8 @@ export class MarketplaceChannelProductMutation {
44
42
 
45
43
  let countryCode = shops[j].country_code
46
44
  let channelCode = shops[j].org_prefix
47
- let organisationId = shops[j].credential.account_id
48
- let channelShopId = shops[j].credential.channel_shop_id
45
+ let organisationId = shops[j].account_id
46
+ let channelShopId = shops[j].channel_shop_id
49
47
 
50
48
  var sellercraftStore = { ...store, platform: 'sellercraftChannelIntegration' }
51
49
 
@@ -53,17 +51,8 @@ export class MarketplaceChannelProductMutation {
53
51
 
54
52
  const categoryResult = await StoreAPI.getStoreProductCategories(store, {})
55
53
 
56
- let mappedProducts = productResult.results.map((item) => {
57
- let {
58
- categoryId,
59
- itemId: productId,
60
- name,
61
- brand,
62
- isVerified,
63
- images,
64
- attributes,
65
- variations
66
- } = item
54
+ let mappedProducts = productResult.results.map(item => {
55
+ let { categoryId, itemId: productId, name, brand, isVerified, images, attributes, variations } = item
67
56
 
68
57
  variations = variations.map(variation => {
69
58
  let {
@@ -94,19 +83,23 @@ export class MarketplaceChannelProductMutation {
94
83
  stockReported,
95
84
  fullPrice,
96
85
  priceDiscounted,
97
- inventoryProducts: [{
98
- qty: stockReported,
99
- name: `${name} - ${variationSku}`,
100
- sku: variationSku,
101
- productVersions: [{
102
- label: 'Default',
103
- packageLengthMM: length,
104
- packageWidthMM: width,
105
- packageHeightMM: height,
106
- packageWeightGram: weight,
107
- qty: 1
108
- }]
109
- }]
86
+ inventoryProducts: [
87
+ {
88
+ qty: stockReported,
89
+ name: `${name} - ${variationSku}`,
90
+ sku: variationSku,
91
+ productVersions: [
92
+ {
93
+ label: 'Default',
94
+ packageLengthMM: length,
95
+ packageWidthMM: width,
96
+ packageHeightMM: height,
97
+ packageWeightGram: weight,
98
+ qty: 1
99
+ }
100
+ ]
101
+ }
102
+ ]
110
103
  }
111
104
  })
112
105
 
@@ -132,13 +125,8 @@ export class MarketplaceChannelProductMutation {
132
125
  }
133
126
  })
134
127
 
135
- let mappedCategories = categoryResult.results.map((category) => {
136
- let {
137
- id: categoryId,
138
- name: categoryName,
139
- parent,
140
- isActive
141
- } = category
128
+ let mappedCategories = categoryResult.results.map(category => {
129
+ let { id: categoryId, name: categoryName, parent, isActive } = category
142
130
 
143
131
  return {
144
132
  categoryId,
@@ -151,14 +139,15 @@ export class MarketplaceChannelProductMutation {
151
139
  }
152
140
  })
153
141
 
154
- mappedCategories.map((category) => {
155
- category.childrenCategories = mappedCategories.filter(e => e.parent == category.categoryId )
142
+ mappedCategories.map(category => {
143
+ category.childrenCategories = mappedCategories.filter(e => e.parent == category.categoryId)
144
+ })
145
+
146
+ await SellercraftChannelIntegrationAPI.ingestChannelCategories(sellercraftStore, {
147
+ categories: mappedCategories
156
148
  })
157
149
 
158
- const ingestCategory = await SellercraftChannelIntegrationAPI.ingestChannelCategories(sellercraftStore, { categories: mappedCategories})
159
-
160
- const ingestProduct = await SellercraftChannelIntegrationAPI.ingestChannelProduct(sellercraftStore, { products: mappedProducts })
161
-
150
+ await SellercraftChannelIntegrationAPI.ingestChannelProduct(sellercraftStore, { products: mappedProducts })
162
151
  }
163
152
 
164
153
  return true