@things-factory/integration-marketplace 6.0.0-alpha.6 → 6.0.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-marketplace",
3
- "version": "6.0.0-alpha.6",
3
+ "version": "6.0.0-alpha.7",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -25,19 +25,19 @@
25
25
  "test": "DEBUG=things-factory:* NODE_ENV=development npx mocha -r ts-node/register ./test/**/*spec.ts"
26
26
  },
27
27
  "dependencies": {
28
- "@things-factory/apptool-ui": "^6.0.0-alpha.6",
29
- "@things-factory/auth-ui": "^6.0.0-alpha.6",
30
- "@things-factory/biz-base": "^6.0.0-alpha.6",
31
- "@things-factory/code-ui": "^6.0.0-alpha.6",
32
- "@things-factory/context-ui": "^6.0.0-alpha.6",
33
- "@things-factory/grist-ui": "^6.0.0-alpha.6",
34
- "@things-factory/i18n-base": "^6.0.0-alpha.6",
35
- "@things-factory/integration-lmd": "^6.0.0-alpha.6",
36
- "@things-factory/integration-ui": "^6.0.0-alpha.6",
37
- "@things-factory/more-ui": "^6.0.0-alpha.6",
38
- "@things-factory/resource-ui": "^6.0.0-alpha.6",
39
- "@things-factory/setting-ui": "^6.0.0-alpha.6",
40
- "@things-factory/system-ui": "^6.0.0-alpha.6",
28
+ "@things-factory/apptool-ui": "^6.0.0-alpha.7",
29
+ "@things-factory/auth-ui": "^6.0.0-alpha.7",
30
+ "@things-factory/biz-base": "^6.0.0-alpha.7",
31
+ "@things-factory/code-ui": "^6.0.0-alpha.7",
32
+ "@things-factory/context-ui": "^6.0.0-alpha.7",
33
+ "@things-factory/grist-ui": "^6.0.0-alpha.7",
34
+ "@things-factory/i18n-base": "^6.0.0-alpha.7",
35
+ "@things-factory/integration-lmd": "^6.0.0-alpha.7",
36
+ "@things-factory/integration-ui": "^6.0.0-alpha.7",
37
+ "@things-factory/more-ui": "^6.0.0-alpha.7",
38
+ "@things-factory/resource-ui": "^6.0.0-alpha.7",
39
+ "@things-factory/setting-ui": "^6.0.0-alpha.7",
40
+ "@things-factory/system-ui": "^6.0.0-alpha.7",
41
41
  "debug": "^4.1.1",
42
42
  "node-fetch": "^2.6.0",
43
43
  "querystring": "^0.2.1"
@@ -52,5 +52,5 @@
52
52
  "nock": "^13.0.2",
53
53
  "should": "^13.2.3"
54
54
  },
55
- "gitHead": "633ba4d4b8dafbe71ff34a96c46a0db53867c4a2"
55
+ "gitHead": "3f2bc58876ef158759040c977b96b554c1220859"
56
56
  }
@@ -10,17 +10,16 @@ export function createOrderShip() {
10
10
 
11
11
  const items: any[] = orderItems.map(orderItem => {
12
12
  return {
13
- extension_attributes: {},
14
- order_item_id: parseInt(orderItem.name),
13
+ order_item_id: parseInt(orderItem.name.replaceAll('"', '')),
15
14
  qty: orderItem.qty
16
15
  }
17
16
  })
18
17
 
19
18
  const tracks: any[] = shippings.map(shipping => {
20
19
  return {
21
- extension_attributes: {},
22
20
  carrier_code: shipping.carrierCode,
23
- track_number: shipping.trackingNo
21
+ track_number: shipping.trackingNo,
22
+ title: shipping.carrierCode
24
23
  }
25
24
  })
26
25
 
@@ -5,12 +5,14 @@ export function getStoreProductCategories() {
5
5
  method: 'get',
6
6
  path: '/products/categories',
7
7
  denormalize(req) {
8
- return { payload: {} }
8
+ return { payload: {
9
+ per_page: 100
10
+ } }
9
11
  },
10
12
  normalize(res, { store }) {
11
13
  const { items, totalItems } = res
12
14
 
13
- return { results: items, total: totalItems }
15
+ return { results: items, total: parseInt(totalItems) }
14
16
  }
15
17
  }
16
18
  }
@@ -18,7 +18,7 @@ export const Query = {
18
18
  const convertedParams = convertListParams(params)
19
19
  const [items, total] = await tx.getRepository(MarketplaceSettingEntity).findAndCount({
20
20
  ...convertedParams,
21
- where: { domain },
21
+ where: { domain: { id: domain.id } },
22
22
  relations: ['marketplaceStore']
23
23
  })
24
24
 
@@ -37,7 +37,7 @@ export const generateLazadaAccessToken = {
37
37
 
38
38
  marketplaceSettingCategories.forEach(async category => {
39
39
  const foundMarketplaceSetting: MarketplaceSetting = await tx.getRepository(MarketplaceSetting).findOne({
40
- where: { marketplaceStore, domain, category }
40
+ where: { marketplaceStore: { id: marketplaceStore.id }, domain: { id: domain.id }, category }
41
41
  })
42
42
 
43
43
  if (!foundMarketplaceSetting) {
@@ -31,7 +31,7 @@ export const generateZaloraAccessToken = {
31
31
 
32
32
  marketplaceSettingCategories.forEach(async category => {
33
33
  const foundMarketplaceSetting: MarketplaceSetting = await tx.getRepository(MarketplaceSetting).findOne({
34
- where: { marketplaceStore, domain, category }
34
+ where: { marketplaceStore: { id: marketplaceStore.id }, domain: { id: domain.id }, category }
35
35
  })
36
36
 
37
37
  if (!foundMarketplaceSetting) {