@things-factory/integration-sellercraft 3.8.0 → 3.8.18

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,16 +24,14 @@ function addInboundOrder() {
24
24
  sellercraftOP.batch_number = orderProduct.batchId;
25
25
  sellercraftOP.expiry_time = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.expiryTime) ? orderProduct.expiryTime : 0;
26
26
  sellercraftOP.force_create_product = forceCreateProduct;
27
- if (forceCreateProduct) {
28
- sellercraftOP.product_name = orderProduct.productName;
29
- sellercraftOP.gtin = orderProduct.gtin;
30
- sellercraftOP.package_weight_gm = orderProduct.weight;
31
- sellercraftOP.package_dimensions = {
32
- length_mm: packageDimension.length,
33
- width_mm: packageDimension.width,
34
- height_mm: packageDimension.height
35
- };
36
- }
27
+ sellercraftOP.product_name = orderProduct.productName;
28
+ sellercraftOP.gtin = orderProduct.gtin;
29
+ sellercraftOP.package_weight_gm = orderProduct.weight;
30
+ sellercraftOP.package_dimensions = {
31
+ length_mm: packageDimension.length,
32
+ width_mm: packageDimension.width,
33
+ height_mm: packageDimension.height
34
+ };
37
35
  return sellercraftOP;
38
36
  });
39
37
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"add-inbound-order.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft/apis/add-inbound-order.ts"],"names":[],"mappings":";AAAA,gGAAgG;;;AAEhG,SAAgB,eAAe;IAC7B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kBAAkB;QACxB,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;YAE/F,IAAI,gBAAgB,GAAQ,EAAE,CAAA;YAC9B,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAA;YACvC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAA;YACvC,gB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CACF,gBAAgB,KACnB,QAAQ,GACT;aACF,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AAlDD,0CAkDC"}
1
+ {"version":3,"file":"add-inbound-order.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft/apis/add-inbound-order.ts"],"names":[],"mappings":";AAAA,gGAAgG;;;AAEhG,SAAgB,eAAe;IAC7B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kBAAkB;QACxB,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;YAE/F,IAAI,gBAAgB,GAAQ,EAAE,CAAA;YAC9B,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAA;YACvC,gBAAgB,CAAC,UAAU,GAAG,SAAS,CAAA;YACvC,gBAAgB,CAAC,YAAY,GAAG,WAAW,CAAA;YAC3C,gBAAgB,CAAC,YAAY,GAAG,WAAW,CAAA;YAC3C,gBAAgB,CAAC,iBAAiB,GAAG,eAAe,CAAA;YAEpD,IAAI,QAAQ,GAAU,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;gBACtD,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAA;gBAC7D,IAAI,aAAa,GAAQ,EAAE,CAAA;gBAC3B,aAAa,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,CAAA;gBACpC,aAAa,CAAC,eAAe,GAAG,YAAY,CAAC,GAAG,CAAA;gBAChD,aAAa,CAAC,uBAAuB,GAAG,YAAY,CAAC,gBAAgB,CAAA;gBACrE,aAAa,CAAC,iBAAiB,GAAG,YAAY,CAAC,WAAW,CAAA;gBAC1D,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC,OAAO,CAAA;gBACjD,aAAa,CAAC,WAAW,GAAG,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,EAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;gBAClF,aAAa,CAAC,oBAAoB,GAAG,kBAAkB,CAAA;gBACvD,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC,WAAW,CAAA;gBACrD,aAAa,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAA;gBACtC,aAAa,CAAC,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAA;gBACrD,aAAa,CAAC,kBAAkB,GAAG;oBACjC,SAAS,EAAE,gBAAgB,CAAC,MAAM;oBAClC,QAAQ,EAAE,gBAAgB,CAAC,KAAK;oBAChC,SAAS,EAAE,gBAAgB,CAAC,MAAM;iBACnC,CAAA;gBAED,OAAO,aAAa,CAAA;YACtB,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,OAAO,kCACF,gBAAgB,KACnB,QAAQ,GACT;aACF,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AA/CD,0CA+CC"}
@@ -7,27 +7,11 @@ function updateProduct() {
7
7
  method: 'put',
8
8
  path: '/product',
9
9
  denormalize(req) {
10
- const { sellercraftInv } = req;
11
- let products = [];
12
- const { packageDimension, accountId: account_id } = sellercraftInv;
13
- let sellercraftOP = {};
14
- sellercraftOP.sku = sellercraftInv.sku;
15
- sellercraftOP.gtin = sellercraftInv.gtin;
16
- sellercraftOP.stock = {
17
- quantity: sellercraftInv.quantity,
18
- unit_of_measure: sellercraftInv.uom
19
- };
20
- sellercraftOP.package_weight_gm = sellercraftInv.weight;
21
- sellercraftOP.package_dimensions = {
22
- length_mm: packageDimension.length,
23
- width_mm: packageDimension.width,
24
- height_mm: packageDimension.height
25
- };
26
- products.push(Object.assign({}, sellercraftOP));
10
+ const { accountId, sellercraftInv } = req;
27
11
  return {
28
12
  payload: {
29
- account_id,
30
- products
13
+ account_id: accountId,
14
+ products: sellercraftInv
31
15
  }
32
16
  };
33
17
  },
@@ -1 +1 @@
1
- {"version":3,"file":"update-product.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft/apis/update-product.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,SAAgB,aAAa;IAC3B,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,UAAU;QAChB,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;YAE9B,IAAI,QAAQ,GAAU,EAAE,CAAA;YACxB,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,cAAc,CAAA;YAClE,IAAI,aAAa,GAAQ,EAAE,CAAA;YAC3B,aAAa,CAAC,GAAG,GAAG,cAAc,CAAC,GAAG,CAAA;YACtC,aAAa,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAA;YACxC,aAAa,CAAC,KAAK,GAAG;gBACpB,QAAQ,EAAE,cAAc,CAAC,QAAQ;gBACjC,eAAe,EAAE,cAAc,CAAC,GAAG;aACpC,CAAA;YACD,aAAa,CAAC,iBAAiB,GAAG,cAAc,CAAC,MAAM,CAAA;YACvD,aAAa,CAAC,kBAAkB,GAAG;gBACjC,SAAS,EAAE,gBAAgB,CAAC,MAAM;gBAClC,QAAQ,EAAE,gBAAgB,CAAC,KAAK;gBAChC,SAAS,EAAE,gBAAgB,CAAC,MAAM;aACnC,CAAA;YAED,QAAQ,CAAC,IAAI,mBAAM,aAAa,EAAG,CAAA;YAEnC,OAAO;gBACL,OAAO,EAAE;oBACP,UAAU;oBACV,QAAQ;iBACT;aACF,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AApCD,sCAoCC"}
1
+ {"version":3,"file":"update-product.js","sourceRoot":"","sources":["../../../../server/controllers/sellercraft/apis/update-product.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,SAAgB,aAAa;IAC3B,OAAO;QACL,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,UAAU;QAChB,WAAW,CAAC,GAAG;YACb,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;YAEzC,OAAO;gBACL,OAAO,EAAE;oBACP,UAAU,EAAE,SAAS;oBACrB,QAAQ,EAAE,cAAc;iBACzB;aACF,CAAA;QACH,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AAlBD,sCAkBC"}
@@ -27,7 +27,7 @@ var SellercraftStatus;
27
27
  });
28
28
  var SellercraftPlatform;
29
29
  (function (SellercraftPlatform) {
30
- SellercraftPlatform["SELLERCRAFT"] = "sellercraft";
30
+ SellercraftPlatform["SELLERCRAFT"] = "SELLERCRAFT";
31
31
  })(SellercraftPlatform = exports.SellercraftPlatform || (exports.SellercraftPlatform = {}));
32
32
  (0, type_graphql_1.registerEnumType)(SellercraftPlatform, {
33
33
  name: 'SellercraftPlatform',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-sellercraft",
3
- "version": "3.8.0",
3
+ "version": "3.8.18",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -31,7 +31,7 @@
31
31
  "@things-factory/context-ui": "^3.8.0",
32
32
  "@things-factory/grist-ui": "^3.7.5",
33
33
  "@things-factory/i18n-ui": "^3.8.0",
34
- "@things-factory/integration-marketplace": "^3.8.0",
34
+ "@things-factory/integration-marketplace": "^3.8.11",
35
35
  "@things-factory/integration-ui": "^3.8.0",
36
36
  "@things-factory/more-ui": "^3.8.0",
37
37
  "@things-factory/resource-ui": "^3.8.0",
@@ -52,5 +52,5 @@
52
52
  "nock": "^13.0.2",
53
53
  "should": "^13.2.3"
54
54
  },
55
- "gitHead": "d3a61edb1a77732db20185aedc47b2cce6dd1f82"
55
+ "gitHead": "77e03326d44b59c82558ae20970babfdaf5e8f3b"
56
56
  }
@@ -24,16 +24,13 @@ export function addInboundOrder() {
24
24
  sellercraftOP.batch_number = orderProduct.batchId
25
25
  sellercraftOP.expiry_time = orderProduct?.expiryTime ? orderProduct.expiryTime : 0
26
26
  sellercraftOP.force_create_product = forceCreateProduct
27
-
28
- if (forceCreateProduct) {
29
- sellercraftOP.product_name = orderProduct.productName
30
- sellercraftOP.gtin = orderProduct.gtin
31
- sellercraftOP.package_weight_gm = orderProduct.weight
32
- sellercraftOP.package_dimensions = {
33
- length_mm: packageDimension.length,
34
- width_mm: packageDimension.width,
35
- height_mm: packageDimension.height
36
- }
27
+ sellercraftOP.product_name = orderProduct.productName
28
+ sellercraftOP.gtin = orderProduct.gtin
29
+ sellercraftOP.package_weight_gm = orderProduct.weight
30
+ sellercraftOP.package_dimensions = {
31
+ length_mm: packageDimension.length,
32
+ width_mm: packageDimension.width,
33
+ height_mm: packageDimension.height
37
34
  }
38
35
 
39
36
  return sellercraftOP
@@ -5,30 +5,12 @@ export function updateProduct() {
5
5
  method: 'put',
6
6
  path: '/product',
7
7
  denormalize(req) {
8
- const { sellercraftInv } = req
9
-
10
- let products: any[] = []
11
- const { packageDimension, accountId: account_id } = sellercraftInv
12
- let sellercraftOP: any = {}
13
- sellercraftOP.sku = sellercraftInv.sku
14
- sellercraftOP.gtin = sellercraftInv.gtin
15
- sellercraftOP.stock = {
16
- quantity: sellercraftInv.quantity,
17
- unit_of_measure: sellercraftInv.uom
18
- }
19
- sellercraftOP.package_weight_gm = sellercraftInv.weight
20
- sellercraftOP.package_dimensions = {
21
- length_mm: packageDimension.length,
22
- width_mm: packageDimension.width,
23
- height_mm: packageDimension.height
24
- }
25
-
26
- products.push({ ...sellercraftOP })
8
+ const { accountId, sellercraftInv } = req
27
9
 
28
10
  return {
29
11
  payload: {
30
- account_id,
31
- products
12
+ account_id: accountId,
13
+ products: sellercraftInv
32
14
  }
33
15
  }
34
16
  },
@@ -25,7 +25,7 @@ registerEnumType(SellercraftStatus, {
25
25
  })
26
26
 
27
27
  export enum SellercraftPlatform {
28
- SELLERCRAFT = 'sellercraft'
28
+ SELLERCRAFT = 'SELLERCRAFT'
29
29
  }
30
30
 
31
31
  registerEnumType(SellercraftPlatform, {