@things-factory/operato-hub 4.3.744 → 4.3.745

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.
Files changed (25) hide show
  1. package/dist-server/routers/api/restful-apis/v1/company/add-contact-points.js +71 -2
  2. package/dist-server/routers/api/restful-apis/v1/company/add-contact-points.js.map +1 -1
  3. package/dist-server/routers/api/restful-apis/v1/company/index.js +1 -0
  4. package/dist-server/routers/api/restful-apis/v1/company/index.js.map +1 -1
  5. package/dist-server/routers/api/restful-apis/v1/company/update-contact-points.js +243 -0
  6. package/dist-server/routers/api/restful-apis/v1/company/update-contact-points.js.map +1 -0
  7. package/dist-server/routers/api/restful-apis/v1/utils/params.js +109 -28
  8. package/dist-server/routers/api/restful-apis/v1/utils/params.js.map +1 -1
  9. package/dist-server/routers/api/restful-apis/v1/warehouse/index.js +1 -0
  10. package/dist-server/routers/api/restful-apis/v1/warehouse/index.js.map +1 -1
  11. package/dist-server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.js +365 -0
  12. package/dist-server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.js.map +1 -0
  13. package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js +946 -19
  14. package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js.map +1 -1
  15. package/openapi/v1/contact-point.yaml +266 -0
  16. package/openapi/v1/inbound.yaml +349 -0
  17. package/openapi/v1/outbound.yaml +256 -150
  18. package/package.json +18 -18
  19. package/server/routers/api/restful-apis/v1/company/add-contact-points.ts +91 -2
  20. package/server/routers/api/restful-apis/v1/company/index.ts +1 -0
  21. package/server/routers/api/restful-apis/v1/company/update-contact-points.ts +267 -0
  22. package/server/routers/api/restful-apis/v1/utils/params.ts +109 -28
  23. package/server/routers/api/restful-apis/v1/warehouse/index.ts +1 -0
  24. package/server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.ts +429 -0
  25. package/server/routers/api/restful-apis/v1/warehouse/update-release-order-details.ts +1122 -29
@@ -240,96 +240,80 @@ definitions:
240
240
  UpdateReleaseOrderDetails:
241
241
  type: 'object'
242
242
  properties:
243
+ responseCode:
244
+ type: 'string'
245
+ example: '200'
246
+ message:
247
+ type: 'string'
248
+ example: 'success'
243
249
  data:
244
250
  type: 'object'
245
251
  properties:
246
252
  id:
247
253
  type: 'string'
254
+ description: 'Release order UUID'
248
255
  example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
249
- roNo:
256
+ name:
250
257
  type: 'string'
251
- example: 'xxxxx'
252
- collectionOrderNo:
258
+ description: 'Release order number'
259
+ example: 'RO-20240115001'
260
+ refOrderId:
253
261
  type: 'string'
254
- example: 'string'
262
+ description: 'Reference order ID'
263
+ example: 'ORDER-12345'
255
264
  refNo:
256
265
  type: 'string'
257
- example: 'string'
266
+ description: 'Reference number 1'
267
+ example: 'reference doc 1'
258
268
  refNo2:
259
269
  type: 'string'
260
- example: 'string'
270
+ description: 'Reference number 2'
271
+ example: 'reference doc 2'
261
272
  refNo3:
262
273
  type: 'string'
263
- example: 'string'
264
- refOrderId:
265
- type: 'string'
266
- example: 'string'
267
- marketplaceOrderStatus:
268
- type: 'string'
269
- example: 'string'
270
- billingAddress:
271
- type: 'string'
272
- example: 'string'
273
- deliveryAddress1:
274
- type: 'string'
275
- example: 'string'
276
- attentionTo:
277
- type: 'string'
278
- example: 'string'
279
- ward:
280
- type: 'string'
281
- example: 'string'
282
- city:
283
- type: 'string'
284
- example: 'string'
285
- district:
286
- type: 'string'
287
- example: 'string'
288
- country:
289
- type: 'string'
290
- example: 'string'
291
- postalCode:
274
+ description: 'Reference number 3'
275
+ example: 'reference doc 3'
276
+ description:
292
277
  type: 'string'
293
- example: 'string'
294
- phone1:
278
+ description: 'Order description'
279
+ example: 'Order description'
280
+ truckNo:
295
281
  type: 'string'
296
- example: 'string'
297
- transporter:
282
+ description: 'Truck number'
283
+ example: 'TRUCK-12345'
284
+ collectionOrderNo:
298
285
  type: 'string'
299
- example: 'string'
300
- trackingNo:
286
+ description: 'Collection order number'
287
+ example: 'CO-001'
288
+ releaseDate:
301
289
  type: 'string'
302
- example: 'string'
303
- airwayBill:
290
+ format: 'date'
291
+ description: 'Release date'
292
+ example: '2024-02-15'
293
+ ownTransport:
294
+ type: 'boolean'
295
+ description: 'Whether using own transport'
296
+ example: false
297
+ exportOption:
298
+ type: 'boolean'
299
+ description: 'Whether it is export order'
300
+ example: false
301
+ packingOption:
302
+ type: 'boolean'
303
+ description: 'Whether packing is required'
304
+ example: false
305
+ courierOption:
306
+ type: 'boolean'
307
+ description: 'Whether courier is required'
308
+ example: false
309
+ status:
304
310
  type: 'string'
305
- example: 'string'
306
- invoice:
311
+ description: 'Current status of the release order'
312
+ example: 'PENDING_RECEIVE'
313
+ remark:
307
314
  type: 'string'
308
- example: 'string'
309
- shippingOrder:
310
- type: 'object'
311
- properties:
312
- shipName:
313
- type: 'string'
314
- example: 'string'
315
- containerNo:
316
- type: 'string'
317
- example: 'string'
318
- loadType:
319
- type: 'string'
320
- example: 'string'
321
- from:
322
- type: 'string'
323
- example: 'string'
324
- to:
325
- type: 'string'
326
- example: 'string'
327
- containerArrivalDate:
328
- type: 'string'
329
- example: '2020-02-14'
330
- containerLeavingDate:
331
- type: 'string'
332
- example: '2020-02-14'
315
+ description: 'Remarks'
316
+ example: 'Additional notes'
333
317
  xml:
334
318
  name: 'UpdateReleaseOrderDetails'
335
319
 
@@ -3289,8 +3273,18 @@ paths:
3289
3273
  post:
3290
3274
  tags:
3291
3275
  - 'Outbound'
3292
- summary: 'Update release order details.'
3293
- description: 'Update Release Order Details'
3276
+ summary: 'Update Release Order Details.'
3277
+ description: |
3278
+ Update release order information and manage order products (add, update quantity, remove items).
3279
+
3280
+ **Status Restrictions:**
3281
+ - **Order Information Updates** (refNo, refNo2, refNo3, description, etc.) are allowed when status is: PENDING, PENDING_RECEIVE, PENDING_WORKSHEET, READY_TO_PICK, PICKING, READY_TO_LOAD, LOADING, READY_TO_PACK, or PACKING.
3282
+ - **Order Product Updates** (add, update, remove items) are only allowed when status is: PENDING, PENDING_RECEIVE, PENDING_WORKSHEET, or READY_TO_PICK.
3283
+
3284
+ **Order Product Matching:**
3285
+ - To update an existing item, provide matching fields: id, sku, refCode, batchId, packingType, or refItemId
3286
+ - To add a new item, provide product information (sku or refCode) without matching existing items
3287
+ - To remove an item, set _action: 'remove' with matching fields
3294
3288
  operationId: 'updateReleaseOrderDetails'
3295
3289
  produces:
3296
3290
  - 'application/json'
@@ -3303,121 +3297,233 @@ paths:
3303
3297
  data:
3304
3298
  type: 'object'
3305
3299
  required:
3306
- - 'releaseGood'
3300
+ - bizplaceId
3301
+ - releaseGood
3307
3302
  properties:
3308
3303
  bizplaceId:
3309
3304
  type: 'string'
3310
- example: "ed2cd631-ac50-44aa-b798-6567d7acde63'(MANDATORY)"
3311
- required: true
3305
+ description: 'UUID of the bizplace/warehouse'
3306
+ example: 'ed2cd631-ac50-44aa-b798-6567d7acde63'
3312
3307
  releaseGood:
3313
3308
  type: 'object'
3314
3309
  required:
3315
- - 'bizplaceId'
3316
- - 'roId'
3310
+ - roId
3317
3311
  properties:
3318
3312
  roId:
3319
3313
  type: 'string'
3320
- example: "1d61cd39-f9de-4a28-8d24-981e6ea5c626'(MANDATORY)"
3321
- required: true
3322
- collectionOrderNo:
3314
+ description: 'UUID of the release order. Alternatively, use refOrderId.'
3315
+ example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
3316
+ refOrderId:
3323
3317
  type: 'string'
3324
- example: "string'(MANDATORY)"
3318
+ description: 'Reference order ID. Alternative to roId.'
3319
+ example: 'ORDER-12345'
3325
3320
  refNo:
3326
3321
  type: 'string'
3327
- example: "string'(MANDATORY)"
3322
+ description: 'Reference number 1 (optional - only update if provided)'
3323
+ example: 'reference doc 1'
3328
3324
  refNo2:
3329
3325
  type: 'string'
3330
- example: "string'(MANDATORY)"
3326
+ description: 'Reference number 2 (optional - only update if provided)'
3327
+ example: 'reference doc 2'
3331
3328
  refNo3:
3332
3329
  type: 'string'
3333
- example: "string'(MANDATORY)"
3334
- refOrderId:
3335
- type: 'string'
3336
- example: "string'(MANDATORY)"
3337
- marketplaceOrderStatus:
3338
- type: 'string'
3339
- example: "string'(MANDATORY)"
3340
- billingAddress:
3341
- type: 'string'
3342
- example: "string'(MANDATORY)"
3343
- deliveryAddress1:
3344
- type: 'string'
3345
- example: "string'(MANDATORY)"
3346
- attentionTo:
3347
- type: 'string'
3348
- example: "string'(MANDATORY)"
3349
- ward:
3350
- type: 'string'
3351
- example: "PHƯỜNG HÀNG BUỒM'(MANDATORY)"
3352
- city:
3353
- type: 'string'
3354
- example: "string'(MANDATORY)"
3355
- district:
3356
- type: 'string'
3357
- example: "string'(MANDATORY)"
3358
- country:
3359
- type: 'string'
3360
- example: "string'(MANDATORY)"
3361
- postalCode:
3362
- type: 'string'
3363
- example: "string'(MANDATORY)"
3364
- phone1:
3330
+ description: 'Reference number 3 (optional - only update if provided)'
3331
+ example: 'reference doc 3'
3332
+ description:
3365
3333
  type: 'string'
3366
- example: "string'(MANDATORY)"
3367
- transporter:
3334
+ description: 'Description (optional - only update if provided)'
3335
+ example: 'Order description'
3336
+ truckNo:
3368
3337
  type: 'string'
3369
- example: "string'(MANDATORY)"
3370
- trackingNo:
3338
+ description: 'Truck number (optional - only update if provided)'
3339
+ example: 'TRUCK-12345'
3340
+ collectionOrderNo:
3371
3341
  type: 'string'
3372
- example: "string'(MANDATORY)"
3373
- airwayBill:
3342
+ description: 'Collection order number (optional - only update if provided)'
3343
+ example: 'CO-001'
3344
+ releaseDate:
3374
3345
  type: 'string'
3375
- example: "string'(MANDATORY)"
3376
- invoice:
3346
+ format: 'date'
3347
+ description: 'Release date (optional - only update if provided)'
3348
+ example: '2024-02-15'
3349
+ ownTransport:
3350
+ type: 'boolean'
3351
+ description: 'Whether using own transport (optional - only update if provided)'
3352
+ example: false
3353
+ exportOption:
3354
+ type: 'boolean'
3355
+ description: 'Whether it is export order (optional - only update if provided)'
3356
+ example: false
3357
+ packingOption:
3358
+ type: 'boolean'
3359
+ description: 'Whether packing is required (optional - only update if provided)'
3360
+ example: false
3361
+ courierOption:
3362
+ type: 'boolean'
3363
+ description: 'Whether courier is required (optional - only update if provided)'
3364
+ example: false
3365
+ remark:
3377
3366
  type: 'string'
3378
- example: "string'(MANDATORY)"
3367
+ description: 'Remarks (optional - only update if provided)'
3368
+ example: 'Additional notes'
3379
3369
  shippingOrder:
3380
3370
  type: 'object'
3381
- required:
3382
- - 'shipName'
3383
- - 'containerNo'
3384
- - 'containerArrivalDate'
3385
- - 'containerLeavingDate'
3371
+ description: 'Shipping order information (optional - only update if provided)'
3386
3372
  properties:
3387
- shipName:
3388
- type: 'string'
3389
- example: "string'(MANDATORY)"
3390
- required: true
3391
3373
  containerNo:
3392
3374
  type: 'string'
3393
- example: "string'(MANDATORY)"
3394
- required: true
3395
- loadType:
3375
+ description: 'Container number'
3376
+ example: 'CONT-001'
3377
+ containerArrivalDate:
3396
3378
  type: 'string'
3397
- example: "string'(MANDATORY)"
3398
- from:
3379
+ format: 'date'
3380
+ description: 'Container arrival date'
3381
+ example: '2024-02-15'
3382
+ containerLeavingDate:
3399
3383
  type: 'string'
3400
- example: 'string'
3401
- to:
3384
+ format: 'date'
3385
+ description: 'Container leaving date'
3386
+ example: '2024-02-20'
3387
+ containerClosureDate:
3402
3388
  type: 'string'
3403
- example: 'string'
3404
- containerArrivalDate:
3389
+ format: 'date'
3390
+ description: 'Container closure date'
3391
+ example: '2024-02-18'
3392
+ containerSize:
3405
3393
  type: 'string'
3406
- example: "2020-02-14'(MANDATORY)"
3407
- required: true
3408
- containerLeavingDate:
3394
+ description: 'Container size'
3395
+ example: '20ft'
3396
+ remark:
3409
3397
  type: 'string'
3410
- example: "2020-02-14'(MANDATORY)"
3411
- required: true
3398
+ description: 'Remarks'
3399
+ example: 'Shipping notes'
3400
+ exportRemark:
3401
+ type: 'string'
3402
+ description: 'Export remarks (mapped to remark)'
3403
+ example: 'Export notes'
3404
+ orderProducts:
3405
+ type: 'array'
3406
+ description: 'Array of order products to add, update, or remove. Only allowed when release order status is PENDING, PENDING_RECEIVE, PENDING_WORKSHEET, or READY_TO_PICK.'
3407
+ items:
3408
+ type: 'object'
3409
+ properties:
3410
+ id:
3411
+ type: 'string'
3412
+ description: 'Order product ID (optional - for matching existing items)'
3413
+ example: 'uuid2669-646f-42a0-8364-56f670fuuid'
3414
+ product:
3415
+ type: 'object'
3416
+ description: 'Product information (required for new items, optional for updates)'
3417
+ properties:
3418
+ sku:
3419
+ type: 'string'
3420
+ description: 'Product SKU (for matching or new items)'
3421
+ example: 'SKU-001'
3422
+ refCode:
3423
+ type: 'string'
3424
+ description: 'Product reference code (alternative to SKU)'
3425
+ example: 'REF-001'
3426
+ sku:
3427
+ type: 'string'
3428
+ description: 'Product SKU (alternative to product.sku)'
3429
+ example: 'SKU-001'
3430
+ refCode:
3431
+ type: 'string'
3432
+ description: 'Product reference code (alternative to product.refCode)'
3433
+ example: 'REF-001'
3434
+ batchId:
3435
+ type: 'string'
3436
+ description: 'Batch ID (for matching or new items)'
3437
+ example: 'BATCH-001'
3438
+ packingType:
3439
+ type: 'string'
3440
+ description: 'Packing type (for matching or new items)'
3441
+ example: 'CARTON'
3442
+ packingSize:
3443
+ type: 'integer'
3444
+ description: 'Packing size (for new items)'
3445
+ example: 24
3446
+ releaseQty:
3447
+ type: 'number'
3448
+ description: 'Quantity to update (for updates) or add (for new items). Must be greater than 0.'
3449
+ example: 10
3450
+ qty:
3451
+ type: 'number'
3452
+ description: 'Alternative to releaseQty'
3453
+ example: 10
3454
+ refItemId:
3455
+ type: 'string'
3456
+ description: 'Reference item ID (for matching or new items)'
3457
+ example: 'REF-12345'
3458
+ unitPrice:
3459
+ type: 'number'
3460
+ description: 'Unit price (optional - only update if provided)'
3461
+ example: 100.50
3462
+ remark:
3463
+ type: 'string'
3464
+ description: 'Item remark (optional - only update if provided)'
3465
+ example: 'Item remark'
3466
+ _action:
3467
+ type: 'string'
3468
+ description: 'Set to "remove" to delete this item. Provide matching fields (id, sku, refCode, batchId, packingType, or refItemId) along with this field.'
3469
+ enum:
3470
+ - 'remove'
3471
+ example: 'remove'
3412
3472
  responses:
3413
3473
  '200':
3414
3474
  description: 'success'
3415
3475
  content:
3416
3476
  application/json:
3417
3477
  schema:
3418
- type: 'array'
3419
- items:
3420
- $ref: '#/definitions/UpdateReleaseOrderDetails'
3478
+ $ref: '#/definitions/UpdateReleaseOrderDetails'
3479
+ '400':
3480
+ description: 'Bad request - validation error'
3481
+ content:
3482
+ application/json:
3483
+ schema:
3484
+ type: 'object'
3485
+ properties:
3486
+ error:
3487
+ type: 'object'
3488
+ properties:
3489
+ code:
3490
+ type: 'string'
3491
+ example: 'E01'
3492
+ message:
3493
+ type: 'string'
3494
+ example: 'warehouse id not found'
3495
+ '404':
3496
+ description: 'Not found - release order not found or status not allowed for updates'
3497
+ content:
3498
+ application/json:
3499
+ schema:
3500
+ type: 'object'
3501
+ properties:
3502
+ error:
3503
+ type: 'object'
3504
+ properties:
3505
+ code:
3506
+ type: 'string'
3507
+ example: 'E04'
3508
+ message:
3509
+ type: 'string'
3510
+ example: 'Release order status "DONE" does not allow updates. Allowed statuses: PENDING, PENDING_RECEIVE, PENDING_WORKSHEET, READY_TO_PICK, PICKING, READY_TO_LOAD, LOADING, READY_TO_PACK, PACKING'
3511
+ '500':
3512
+ description: 'Internal server error'
3513
+ content:
3514
+ application/json:
3515
+ schema:
3516
+ type: 'object'
3517
+ properties:
3518
+ error:
3519
+ type: 'object'
3520
+ properties:
3521
+ code:
3522
+ type: 'string'
3523
+ example: 'INTERNAL_SERVER_ERROR'
3524
+ message:
3525
+ type: 'string'
3526
+ example: 'An unexpected error occurred'
3421
3527
 
3422
3528
  # get-release-order-list
3423
3529
  api/v1/warehouse/get-release-order-list:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-hub",
3
- "version": "4.3.744",
3
+ "version": "4.3.745",
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.743",
61
61
  "@things-factory/auth-base": "^4.3.743",
62
62
  "@things-factory/auth-ui": "^4.3.743",
63
- "@things-factory/biz-base": "^4.3.743",
64
- "@things-factory/biz-ui": "^4.3.743",
63
+ "@things-factory/biz-base": "^4.3.745",
64
+ "@things-factory/biz-ui": "^4.3.745",
65
65
  "@things-factory/board-service": "^4.3.743",
66
66
  "@things-factory/board-ui": "^4.3.743",
67
67
  "@things-factory/code-ui": "^4.3.743",
@@ -77,22 +77,22 @@
77
77
  "@things-factory/i18n-base": "^4.3.743",
78
78
  "@things-factory/import-ui": "^4.3.743",
79
79
  "@things-factory/import-ui-excel": "^4.3.743",
80
- "@things-factory/integration-accounting": "^4.3.743",
81
- "@things-factory/integration-fulfillment": "^4.3.743",
82
- "@things-factory/integration-lmd": "^4.3.743",
83
- "@things-factory/integration-marketplace": "^4.3.743",
84
- "@things-factory/integration-pos": "^4.3.743",
85
- "@things-factory/integration-powrup": "^4.3.743",
86
- "@things-factory/integration-sellercraft": "^4.3.743",
87
- "@things-factory/integration-sftp": "^4.3.743",
80
+ "@things-factory/integration-accounting": "^4.3.745",
81
+ "@things-factory/integration-fulfillment": "^4.3.745",
82
+ "@things-factory/integration-lmd": "^4.3.745",
83
+ "@things-factory/integration-marketplace": "^4.3.745",
84
+ "@things-factory/integration-pos": "^4.3.745",
85
+ "@things-factory/integration-powrup": "^4.3.745",
86
+ "@things-factory/integration-sellercraft": "^4.3.745",
87
+ "@things-factory/integration-sftp": "^4.3.745",
88
88
  "@things-factory/lite-menu": "^4.3.743",
89
- "@things-factory/marketplace-base": "^4.3.743",
89
+ "@things-factory/marketplace-base": "^4.3.745",
90
90
  "@things-factory/more-ui": "^4.3.743",
91
91
  "@things-factory/notification": "^4.3.743",
92
92
  "@things-factory/pdf": "^4.3.743",
93
- "@things-factory/product-ui": "^4.3.743",
93
+ "@things-factory/product-ui": "^4.3.745",
94
94
  "@things-factory/resource-ui": "^4.3.743",
95
- "@things-factory/sales-base": "^4.3.743",
95
+ "@things-factory/sales-base": "^4.3.745",
96
96
  "@things-factory/scene-data-transform": "^4.3.743",
97
97
  "@things-factory/scene-excel": "^4.3.743",
98
98
  "@things-factory/scene-firebase": "^4.3.743",
@@ -107,9 +107,9 @@
107
107
  "@things-factory/setting-ui": "^4.3.743",
108
108
  "@things-factory/shell": "^4.3.743",
109
109
  "@things-factory/system-ui": "^4.3.743",
110
- "@things-factory/transport-base": "^4.3.743",
111
- "@things-factory/warehouse-base": "^4.3.743",
112
- "@things-factory/worksheet-base": "^4.3.744",
110
+ "@things-factory/transport-base": "^4.3.745",
111
+ "@things-factory/warehouse-base": "^4.3.745",
112
+ "@things-factory/worksheet-base": "^4.3.745",
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": "1519990fa45b1edfdfa52b0ac3748b841fb18afd"
125
+ "gitHead": "89c8b3c8c7ac589d4f547a984c1027a6f509671f"
126
126
  }