@things-factory/operato-hub 4.3.698 → 4.3.700

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.
@@ -251,6 +251,93 @@ definitions:
251
251
  updatedAt:
252
252
  type: string
253
253
  example: '2025-05-05T12:00:00Z'
254
+ newInventories:
255
+ type: array
256
+ description: 'New inventories from return order'
257
+ items:
258
+ type: object
259
+ properties:
260
+ batchId:
261
+ type: string
262
+ example: 'batch-001'
263
+ refItemId:
264
+ type: string
265
+ example: 'EXT-ITEM-123'
266
+ product:
267
+ type: object
268
+ properties:
269
+ id:
270
+ type: string
271
+ example: 'product-uuid'
272
+ sku:
273
+ type: string
274
+ example: '1234567890'
275
+ brandSku:
276
+ type: string
277
+ example: '1234567890'
278
+ brand:
279
+ type: string
280
+ example: 'Brand A'
281
+ subBrand:
282
+ type: string
283
+ example: 'Sub Brand A'
284
+ productDetail:
285
+ type: object
286
+ properties:
287
+ id:
288
+ type: string
289
+ example: 'product-detail-uuid'
290
+ refCode:
291
+ type: string
292
+ example: '1234567890'
293
+ packingType:
294
+ type: string
295
+ example: 'box'
296
+ packingSize:
297
+ type: integer
298
+ example: 24
299
+ uom:
300
+ type: string
301
+ example: 'PCS'
302
+ uomValue:
303
+ type: number
304
+ example: 10.0
305
+ qty:
306
+ type: integer
307
+ example: 10
308
+ status:
309
+ type: string
310
+ example: 'PUTTING_AWAY'
311
+ remark:
312
+ type: string
313
+ example: 'Putaway in progress'
314
+ location:
315
+ type: object
316
+ properties:
317
+ id:
318
+ type: string
319
+ example: 'location-uuid'
320
+ name:
321
+ type: string
322
+ example: 'A-01-01'
323
+ type:
324
+ type: string
325
+ example: 'STORAGE'
326
+ zone:
327
+ type: string
328
+ example: 'A'
329
+ warehouse:
330
+ type: object
331
+ properties:
332
+ id:
333
+ type: string
334
+ example: 'warehouse-uuid'
335
+ name:
336
+ type: string
337
+ example: 'Main Warehouse'
338
+ description:
339
+ type: string
340
+ example: 'Primary storage facility'
254
341
  itemInfos:
255
342
  type: array
256
343
  items:
@@ -334,33 +421,6 @@ definitions:
334
421
  status:
335
422
  type: string
336
423
  example: 'PENDING'
337
- location:
338
- type: object
339
- properties:
340
- id:
341
- type: string
342
- example: 'location-uuid'
343
- name:
344
- type: string
345
- example: 'A-01-01'
346
- type:
347
- type: string
348
- example: 'STORAGE'
349
- zone:
350
- type: string
351
- example: 'A'
352
- warehouse:
353
- type: object
354
- properties:
355
- id:
356
- type: string
357
- example: 'warehouse-uuid'
358
- name:
359
- type: string
360
- example: 'Main Warehouse'
361
- description:
362
- type: string
363
- example: 'Primary storage facility'
364
424
  xml:
365
425
  name: 'ReturnOrderDetail'
366
426
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-hub",
3
- "version": "4.3.698",
3
+ "version": "4.3.700",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -60,8 +60,8 @@
60
60
  "@things-factory/attachment-base": "^4.3.695",
61
61
  "@things-factory/auth-base": "^4.3.695",
62
62
  "@things-factory/auth-ui": "^4.3.695",
63
- "@things-factory/biz-base": "^4.3.695",
64
- "@things-factory/biz-ui": "^4.3.695",
63
+ "@things-factory/biz-base": "^4.3.700",
64
+ "@things-factory/biz-ui": "^4.3.700",
65
65
  "@things-factory/board-service": "^4.3.695",
66
66
  "@things-factory/board-ui": "^4.3.695",
67
67
  "@things-factory/code-ui": "^4.3.695",
@@ -76,23 +76,23 @@
76
76
  "@things-factory/help": "^4.3.695",
77
77
  "@things-factory/i18n-base": "^4.3.695",
78
78
  "@things-factory/import-ui": "^4.3.695",
79
- "@things-factory/import-ui-excel": "^4.3.695",
80
- "@things-factory/integration-accounting": "^4.3.695",
81
- "@things-factory/integration-fulfillment": "^4.3.695",
82
- "@things-factory/integration-lmd": "^4.3.695",
83
- "@things-factory/integration-marketplace": "^4.3.695",
84
- "@things-factory/integration-pos": "^4.3.695",
85
- "@things-factory/integration-powrup": "^4.3.695",
86
- "@things-factory/integration-sellercraft": "^4.3.695",
87
- "@things-factory/integration-sftp": "^4.3.695",
79
+ "@things-factory/import-ui-excel": "^4.3.700",
80
+ "@things-factory/integration-accounting": "^4.3.700",
81
+ "@things-factory/integration-fulfillment": "^4.3.700",
82
+ "@things-factory/integration-lmd": "^4.3.700",
83
+ "@things-factory/integration-marketplace": "^4.3.700",
84
+ "@things-factory/integration-pos": "^4.3.700",
85
+ "@things-factory/integration-powrup": "^4.3.700",
86
+ "@things-factory/integration-sellercraft": "^4.3.700",
87
+ "@things-factory/integration-sftp": "^4.3.700",
88
88
  "@things-factory/lite-menu": "^4.3.695",
89
- "@things-factory/marketplace-base": "^4.3.695",
89
+ "@things-factory/marketplace-base": "^4.3.700",
90
90
  "@things-factory/more-ui": "^4.3.695",
91
91
  "@things-factory/notification": "^4.3.695",
92
92
  "@things-factory/pdf": "^4.3.591",
93
- "@things-factory/product-ui": "^4.3.695",
93
+ "@things-factory/product-ui": "^4.3.700",
94
94
  "@things-factory/resource-ui": "^4.3.695",
95
- "@things-factory/sales-base": "^4.3.697",
95
+ "@things-factory/sales-base": "^4.3.700",
96
96
  "@things-factory/scene-data-transform": "^4.3.591",
97
97
  "@things-factory/scene-excel": "^4.3.591",
98
98
  "@things-factory/scene-firebase": "^4.3.591",
@@ -107,9 +107,9 @@
107
107
  "@things-factory/setting-ui": "^4.3.695",
108
108
  "@things-factory/shell": "^4.3.695",
109
109
  "@things-factory/system-ui": "^4.3.695",
110
- "@things-factory/transport-base": "^4.3.695",
111
- "@things-factory/warehouse-base": "^4.3.695",
112
- "@things-factory/worksheet-base": "^4.3.697",
110
+ "@things-factory/transport-base": "^4.3.700",
111
+ "@things-factory/warehouse-base": "^4.3.700",
112
+ "@things-factory/worksheet-base": "^4.3.700",
113
113
  "cron-parser": "^4.7.0",
114
114
  "koa2-swagger-ui": "^5.0.2",
115
115
  "swagger-jsdoc": "^5.0.0",
@@ -122,5 +122,5 @@
122
122
  "resolutions": {
123
123
  "core-js": "^3.16.0"
124
124
  },
125
- "gitHead": "1a0a2828c1aa397acb656eea3ceb4d29ddc9d6ad"
125
+ "gitHead": "f1b712fc8f3a7b7b5136204e4c4fd6bfad0e766e"
126
126
  }
@@ -26,11 +26,15 @@ router.post(
26
26
  // check if phone or email already belongs in bizplace
27
27
  const phones = []
28
28
  const emails = []
29
+ const ids = []
29
30
  let values = []
30
31
  for (const datapoint of context.request.body.data) {
31
32
  phones.push(datapoint.phone)
32
33
  emails.push(datapoint.email)
33
- const value = {
34
+ if (datapoint.id) {
35
+ ids.push(datapoint.id)
36
+ }
37
+ const value: any = {
34
38
  name: datapoint.name,
35
39
  description: datapoint.description,
36
40
  companyName: datapoint.companyName,
@@ -43,6 +47,8 @@ router.post(
43
47
  address2: datapoint.address2,
44
48
  city: datapoint.city,
45
49
  state: datapoint.state,
50
+ country: datapoint.country,
51
+ releaseShelfLife: datapoint.releaseShelfLife,
46
52
  postCode: datapoint.postCode,
47
53
  type: datapoint.type,
48
54
  domain: context.state.domain,
@@ -50,9 +56,28 @@ router.post(
50
56
  creator: context.state.user,
51
57
  updater: context.state.user
52
58
  }
59
+ // Add id if provided by external system
60
+ if (datapoint.id) {
61
+ value.id = datapoint.id
62
+ }
53
63
  values.push(value)
54
64
  }
55
65
 
66
+ // Check for duplicate IDs if provided
67
+ if (ids.length > 0) {
68
+ const checkDuplicateIds: ContactPoint[] = await tx
69
+ .getRepository(ContactPoint)
70
+ .createQueryBuilder('cp')
71
+ .where('cp.id IN (:...ids)', { ids })
72
+ .getMany()
73
+ if (checkDuplicateIds.length > 0) {
74
+ throw new ApiError(
75
+ 'E05',
76
+ `Contact point ID(s) already exist: ${checkDuplicateIds.map(cp => cp.id).join(', ')}`
77
+ )
78
+ }
79
+ }
80
+
56
81
  const checkDuplicateEmailPhone: ContactPoint = await tx
57
82
  .getRepository(ContactPoint)
58
83
  .createQueryBuilder('cp')
@@ -80,6 +105,7 @@ router.post(
80
105
  let data = []
81
106
  for (const contactPoint of result.generatedMaps) {
82
107
  const datapoint = {
108
+ id: contactPoint.id,
83
109
  name: contactPoint.name,
84
110
  description: contactPoint.description,
85
111
  companyName: contactPoint.companyName,
@@ -92,6 +118,8 @@ router.post(
92
118
  address2: contactPoint.address2,
93
119
  city: contactPoint.city,
94
120
  state: contactPoint.state,
121
+ country: contactPoint.country,
122
+ releaseShelfLife: contactPoint.releaseShelfLife,
95
123
  postCode: contactPoint.postCode,
96
124
  type: contactPoint.type,
97
125
  createdAt: contactPoint.createdAt
@@ -83,6 +83,7 @@ export const params = {
83
83
  'get-webhook-details': ['warehouseBizplaceId', 'webhookId'],
84
84
  'add-contact-points': [
85
85
  'bizplaceId',
86
+ 'id',
86
87
  'name',
87
88
  'companyName',
88
89
  'description',
@@ -95,6 +96,8 @@ export const params = {
95
96
  'address2',
96
97
  'city',
97
98
  'state',
99
+ 'country',
100
+ 'releaseShelfLife',
98
101
  'postCode',
99
102
  'type'
100
103
  ],
@@ -358,6 +361,7 @@ export const params = {
358
361
  'refNo2',
359
362
  'refNo3',
360
363
  'refOrderId',
364
+ 'contactPointId',
361
365
  'type',
362
366
  'transporter',
363
367
  'trackingNo',
@@ -1112,6 +1116,11 @@ export const reqParams = {
1112
1116
  required: true,
1113
1117
  type: 'field'
1114
1118
  },
1119
+ {
1120
+ name: 'contactPointId',
1121
+ required: false,
1122
+ type: 'field'
1123
+ },
1115
1124
  {
1116
1125
  name: 'shippingOrder',
1117
1126
  required: false,