@things-factory/integration-sellercraft 4.0.26 → 4.0.31

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.
@@ -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": "4.0.26",
3
+ "version": "4.0.31",
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.0.26",
28
- "@things-factory/auth-ui": "^4.0.26",
29
- "@things-factory/biz-base": "^4.0.26",
30
- "@things-factory/code-ui": "^4.0.26",
31
- "@things-factory/context-ui": "^4.0.26",
32
- "@things-factory/grist-ui": "^4.0.26",
33
- "@things-factory/i18n-ui": "^4.0.26",
34
- "@things-factory/integration-marketplace": "^4.0.26",
35
- "@things-factory/integration-ui": "^4.0.26",
36
- "@things-factory/more-ui": "^4.0.26",
37
- "@things-factory/resource-ui": "^4.0.26",
38
- "@things-factory/setting-ui": "^4.0.26",
39
- "@things-factory/system-ui": "^4.0.26",
27
+ "@things-factory/apptool-ui": "^4.0.31",
28
+ "@things-factory/auth-ui": "^4.0.31",
29
+ "@things-factory/biz-base": "^4.0.31",
30
+ "@things-factory/code-ui": "^4.0.31",
31
+ "@things-factory/context-ui": "^4.0.31",
32
+ "@things-factory/grist-ui": "^4.0.31",
33
+ "@things-factory/i18n-ui": "^4.0.31",
34
+ "@things-factory/integration-marketplace": "^4.0.31",
35
+ "@things-factory/integration-ui": "^4.0.31",
36
+ "@things-factory/more-ui": "^4.0.31",
37
+ "@things-factory/resource-ui": "^4.0.31",
38
+ "@things-factory/setting-ui": "^4.0.31",
39
+ "@things-factory/system-ui": "^4.0.31",
40
40
  "debug": "^4.1.1",
41
41
  "node-fetch": "^2.6.0",
42
42
  "querystring": "^0.2.1"
@@ -45,12 +45,12 @@
45
45
  "@microsoft/tsdoc": "^0.12.20",
46
46
  "@types/chai": "^4.2.11",
47
47
  "@types/mocha": "^8.0.0",
48
- "@types/node": "^14.0.23",
48
+ "@types/node": "^17.0.8",
49
49
  "@types/should": "^13.0.0",
50
50
  "chai": "^4.2.0",
51
51
  "mocha": "^8.0.1",
52
52
  "nock": "^13.0.2",
53
53
  "should": "^13.2.3"
54
54
  },
55
- "gitHead": "c4b39c74b9ce2472f30c26eb36ec62054c1ecf82"
55
+ "gitHead": "6c021ffdeacc9d123298528f6bba91f61389f33d"
56
56
  }
@@ -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, {