@things-factory/operato-hub 4.3.744 → 4.3.746

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 (28) 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 -11
  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/add-inbound-order.js +2 -0
  10. package/dist-server/routers/api/restful-apis/v1/warehouse/add-inbound-order.js.map +1 -1
  11. package/dist-server/routers/api/restful-apis/v1/warehouse/index.js +1 -0
  12. package/dist-server/routers/api/restful-apis/v1/warehouse/index.js.map +1 -1
  13. package/dist-server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.js +365 -0
  14. package/dist-server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.js.map +1 -0
  15. package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js +965 -19
  16. package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js.map +1 -1
  17. package/openapi/v1/contact-point.yaml +266 -0
  18. package/openapi/v1/inbound.yaml +353 -0
  19. package/openapi/v1/outbound.yaml +298 -77
  20. package/package.json +18 -18
  21. package/server/routers/api/restful-apis/v1/company/add-contact-points.ts +91 -2
  22. package/server/routers/api/restful-apis/v1/company/index.ts +1 -0
  23. package/server/routers/api/restful-apis/v1/company/update-contact-points.ts +267 -0
  24. package/server/routers/api/restful-apis/v1/utils/params.ts +109 -11
  25. package/server/routers/api/restful-apis/v1/warehouse/add-inbound-order.ts +2 -0
  26. package/server/routers/api/restful-apis/v1/warehouse/index.ts +1 -0
  27. package/server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.ts +429 -0
  28. package/server/routers/api/restful-apis/v1/warehouse/update-release-order-details.ts +1153 -29
@@ -240,45 +240,59 @@ 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
256
  roNo:
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:
274
+ description: 'Reference number 3'
275
+ example: 'reference doc 3'
276
+ description:
265
277
  type: 'string'
266
- example: 'string'
278
+ description: 'Order description'
279
+ example: 'Order description'
267
280
  marketplaceOrderStatus:
268
281
  type: 'string'
269
- example: 'string'
282
+ description: 'Marketplace order status'
283
+ example: 'Ready To Ship'
270
284
  billingAddress:
271
285
  type: 'string'
272
- example: 'string'
273
- deliveryAddress1:
286
+ description: 'Billing address'
287
+ example: '36 Jalan Kerongsang 2 Bandar Puteri KlangSelangor Klang 41200 Malaysia'
288
+ deliveryAddress:
274
289
  type: 'string'
275
- example: 'string'
290
+ description: 'Delivery address'
291
+ example: '36 Jalan Kerongsang 2'
276
292
  attentionTo:
277
293
  type: 'string'
278
- example: 'string'
279
- ward:
280
- type: 'string'
281
- example: 'string'
294
+ description: 'Attention to'
295
+ example: 'Annie'
282
296
  city:
283
297
  type: 'string'
284
298
  example: 'string'
@@ -291,7 +305,7 @@ definitions:
291
305
  postalCode:
292
306
  type: 'string'
293
307
  example: 'string'
294
- phone1:
308
+ phone:
295
309
  type: 'string'
296
310
  example: 'string'
297
311
  transporter:
@@ -306,6 +320,43 @@ definitions:
306
320
  invoice:
307
321
  type: 'string'
308
322
  example: 'string'
323
+ truckNo:
324
+ type: 'string'
325
+ description: 'Truck number'
326
+ example: 'TRUCK-12345'
327
+ collectionOrderNo:
328
+ type: 'string'
329
+ description: 'Collection order number'
330
+ example: 'CO-001'
331
+ releaseDate:
332
+ type: 'string'
333
+ format: 'date'
334
+ description: 'Release date'
335
+ example: '2024-02-15'
336
+ ownTransport:
337
+ type: 'boolean'
338
+ description: 'Whether using own transport'
339
+ example: false
340
+ exportOption:
341
+ type: 'boolean'
342
+ description: 'Whether it is export order'
343
+ example: false
344
+ packingOption:
345
+ type: 'boolean'
346
+ description: 'Whether packing is required'
347
+ example: false
348
+ courierOption:
349
+ type: 'boolean'
350
+ description: 'Whether courier is required'
351
+ example: false
352
+ status:
353
+ type: 'string'
354
+ description: 'Current status of the release order'
355
+ example: 'PENDING_RECEIVE'
356
+ remark:
357
+ type: 'string'
358
+ description: 'Remarks'
359
+ example: 'Additional notes'
309
360
  shippingOrder:
310
361
  type: 'object'
311
362
  properties:
@@ -3289,8 +3340,18 @@ paths:
3289
3340
  post:
3290
3341
  tags:
3291
3342
  - 'Outbound'
3292
- summary: 'Update release order details.'
3293
- description: 'Update Release Order Details'
3343
+ summary: 'Update Release Order Details.'
3344
+ description: |
3345
+ Update release order information and manage order products (add, update quantity, remove items).
3346
+
3347
+ **Status Restrictions:**
3348
+ - **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.
3349
+ - **Order Product Updates** (add, update, remove items) are only allowed when status is: PENDING, PENDING_RECEIVE, PENDING_WORKSHEET, or READY_TO_PICK.
3350
+
3351
+ **Order Product Matching:**
3352
+ - To update an existing item, provide matching fields: id, sku, refCode, batchId, packingType, or refItemId
3353
+ - To add a new item, provide product information (sku or refCode) without matching existing items
3354
+ - To remove an item, set _action: 'remove' with matching fields
3294
3355
  operationId: 'updateReleaseOrderDetails'
3295
3356
  produces:
3296
3357
  - 'application/json'
@@ -3303,121 +3364,281 @@ paths:
3303
3364
  data:
3304
3365
  type: 'object'
3305
3366
  required:
3306
- - 'releaseGood'
3367
+ - bizplaceId
3368
+ - releaseGood
3307
3369
  properties:
3308
3370
  bizplaceId:
3309
3371
  type: 'string'
3310
- example: "ed2cd631-ac50-44aa-b798-6567d7acde63'(MANDATORY)"
3311
- required: true
3372
+ description: 'UUID of the bizplace/warehouse'
3373
+ example: 'ed2cd631-ac50-44aa-b798-6567d7acde63'
3312
3374
  releaseGood:
3313
3375
  type: 'object'
3314
3376
  required:
3315
- - 'bizplaceId'
3316
- - 'roId'
3377
+ - roId
3317
3378
  properties:
3318
3379
  roId:
3319
3380
  type: 'string'
3320
- example: "1d61cd39-f9de-4a28-8d24-981e6ea5c626'(MANDATORY)"
3321
- required: true
3381
+ description: 'UUID of the release order. Alternatively, use refOrderId.'
3382
+ example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
3383
+ refOrderId:
3384
+ type: 'string'
3385
+ description: 'Reference order ID. Alternative to roId.'
3386
+ example: 'ORDER-12345'
3322
3387
  collectionOrderNo:
3323
3388
  type: 'string'
3324
- example: "string'(MANDATORY)"
3389
+ description: 'Collection order number'
3390
+ example: 'CO-001'
3325
3391
  refNo:
3326
3392
  type: 'string'
3327
- example: "string'(MANDATORY)"
3393
+ description: 'Reference number 1'
3394
+ example: 'reference doc 1'
3328
3395
  refNo2:
3329
3396
  type: 'string'
3330
- example: "string'(MANDATORY)"
3397
+ description: 'Reference number 2'
3398
+ example: 'reference doc 2'
3331
3399
  refNo3:
3332
3400
  type: 'string'
3333
- example: "string'(MANDATORY)"
3334
- refOrderId:
3335
- type: 'string'
3336
- example: "string'(MANDATORY)"
3401
+ description: 'Reference number 3'
3402
+ example: 'reference doc 3'
3337
3403
  marketplaceOrderStatus:
3338
3404
  type: 'string'
3339
- example: "string'(MANDATORY)"
3340
- billingAddress:
3341
- type: 'string'
3342
- example: "string'(MANDATORY)"
3405
+ description: 'Marketplace order status'
3406
+ example: 'ready_to_ship'
3343
3407
  deliveryAddress1:
3344
3408
  type: 'string'
3345
- example: "string'(MANDATORY)"
3409
+ description: 'Delivery address line 1'
3410
+ example: '123 Main St'
3346
3411
  attentionTo:
3347
3412
  type: 'string'
3348
- example: "string'(MANDATORY)"
3349
- ward:
3350
- type: 'string'
3351
- example: "PHƯỜNG HÀNG BUỒM'(MANDATORY)"
3413
+ description: 'Attention to'
3414
+ example: 'John Doe'
3352
3415
  city:
3353
3416
  type: 'string'
3354
- example: "string'(MANDATORY)"
3417
+ description: 'City'
3418
+ example: 'Kuala Lumpur'
3355
3419
  district:
3356
3420
  type: 'string'
3357
- example: "string'(MANDATORY)"
3421
+ description: 'District'
3422
+ example: 'Petaling'
3358
3423
  country:
3359
3424
  type: 'string'
3360
- example: "string'(MANDATORY)"
3425
+ description: 'Country'
3426
+ example: 'MY'
3361
3427
  postalCode:
3362
3428
  type: 'string'
3363
- example: "string'(MANDATORY)"
3429
+ description: 'Postal code'
3430
+ example: '50000'
3364
3431
  phone1:
3365
3432
  type: 'string'
3366
- example: "string'(MANDATORY)"
3433
+ description: 'Phone number 1'
3434
+ example: '60123456789'
3367
3435
  transporter:
3368
3436
  type: 'string'
3369
- example: "string'(MANDATORY)"
3437
+ description: 'Transporter'
3438
+ example: 'DHL'
3370
3439
  trackingNo:
3371
3440
  type: 'string'
3372
- example: "string'(MANDATORY)"
3441
+ description: 'Tracking number'
3442
+ example: 'TRACK-12345'
3373
3443
  airwayBill:
3374
3444
  type: 'string'
3375
- example: "string'(MANDATORY)"
3445
+ description: 'Url to airwayBill'
3446
+ example: 'http://example.com/airwaybill.pdf'
3376
3447
  invoice:
3377
3448
  type: 'string'
3378
- example: "string'(MANDATORY)"
3449
+ description: 'Url to invoice'
3450
+ example: 'http://example.com/invoice.pdf'
3451
+ description:
3452
+ type: 'string'
3453
+ description: 'Description'
3454
+ example: 'Order description'
3455
+ truckNo:
3456
+ type: 'string'
3457
+ description: 'Truck number'
3458
+ example: 'TRUCK-12345'
3459
+ collectionOrderNo:
3460
+ type: 'string'
3461
+ description: 'Collection order number'
3462
+ example: 'CO-001'
3463
+ releaseDate:
3464
+ type: 'string'
3465
+ format: 'date'
3466
+ description: 'Release date'
3467
+ example: '2024-02-15'
3468
+ ownTransport:
3469
+ type: 'boolean'
3470
+ description: 'Whether using own transport'
3471
+ example: false
3472
+ exportOption:
3473
+ type: 'boolean'
3474
+ description: 'Whether it is export order'
3475
+ example: false
3476
+ packingOption:
3477
+ type: 'boolean'
3478
+ description: 'Whether packing is required'
3479
+ example: false
3480
+ courierOption:
3481
+ type: 'boolean'
3482
+ description: 'Whether courier is required'
3483
+ example: false
3484
+ remark:
3485
+ type: 'string'
3486
+ description: 'Remarks'
3487
+ example: 'Additional notes'
3379
3488
  shippingOrder:
3380
3489
  type: 'object'
3381
- required:
3382
- - 'shipName'
3383
- - 'containerNo'
3384
- - 'containerArrivalDate'
3385
- - 'containerLeavingDate'
3490
+ description: 'Shipping order information'
3386
3491
  properties:
3387
- shipName:
3388
- type: 'string'
3389
- example: "string'(MANDATORY)"
3390
- required: true
3391
3492
  containerNo:
3392
3493
  type: 'string'
3393
- example: "string'(MANDATORY)"
3394
- required: true
3395
- loadType:
3494
+ description: 'Container number'
3495
+ example: 'CONT-001'
3496
+ containerArrivalDate:
3396
3497
  type: 'string'
3397
- example: "string'(MANDATORY)"
3398
- from:
3498
+ format: 'date'
3499
+ description: 'Container arrival date'
3500
+ example: '2024-02-15'
3501
+ containerLeavingDate:
3399
3502
  type: 'string'
3400
- example: 'string'
3401
- to:
3503
+ format: 'date'
3504
+ description: 'Container leaving date'
3505
+ example: '2024-02-20'
3506
+ containerClosureDate:
3402
3507
  type: 'string'
3403
- example: 'string'
3404
- containerArrivalDate:
3508
+ format: 'date'
3509
+ description: 'Container closure date'
3510
+ example: '2024-02-18'
3511
+ containerSize:
3405
3512
  type: 'string'
3406
- example: "2020-02-14'(MANDATORY)"
3407
- required: true
3408
- containerLeavingDate:
3513
+ description: 'Container size'
3514
+ example: '20ft'
3515
+ exportRemark:
3409
3516
  type: 'string'
3410
- example: "2020-02-14'(MANDATORY)"
3411
- required: true
3517
+ description: 'Export remarks (mapped to remark)'
3518
+ example: 'Export notes'
3519
+ orderProducts:
3520
+ type: 'array'
3521
+ 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.'
3522
+ items:
3523
+ type: 'object'
3524
+ properties:
3525
+ id:
3526
+ type: 'string'
3527
+ description: 'Order product ID (optional - for matching existing items)'
3528
+ example: 'uuid2669-646f-42a0-8364-56f670fuuid'
3529
+ product:
3530
+ type: 'object'
3531
+ description: 'Product information (required for new items, optional for updates)'
3532
+ properties:
3533
+ sku:
3534
+ type: 'string'
3535
+ description: 'Product SKU'
3536
+ example: 'SKU-001'
3537
+ refCode:
3538
+ type: 'string'
3539
+ description: 'Product reference code'
3540
+ example: 'REF-001'
3541
+ sku:
3542
+ type: 'string'
3543
+ description: 'Product SKU'
3544
+ example: 'SKU-001'
3545
+ refCode:
3546
+ type: 'string'
3547
+ description: 'Product reference code'
3548
+ example: 'REF-001'
3549
+ batchId:
3550
+ type: 'string'
3551
+ description: 'Batch ID'
3552
+ example: 'BATCH-001'
3553
+ packingType:
3554
+ type: 'string'
3555
+ description: 'Packing type'
3556
+ example: 'CARTON'
3557
+ packingSize:
3558
+ type: 'integer'
3559
+ description: 'Packing size (for new items)'
3560
+ example: 24
3561
+ releaseQty:
3562
+ type: 'number'
3563
+ description: 'Quantity to update (for updates) or add (for new items). Must be greater than 0.'
3564
+ example: 10
3565
+ qty:
3566
+ type: 'number'
3567
+ description: 'Alternative to releaseQty'
3568
+ example: 10
3569
+ refItemId:
3570
+ type: 'string'
3571
+ description: 'Reference item ID (for matching or new items)'
3572
+ example: 'REF-12345'
3573
+ unitPrice:
3574
+ type: 'number'
3575
+ description: 'Unit price'
3576
+ example: 100.50
3577
+ remark:
3578
+ type: 'string'
3579
+ description: 'Item remark'
3580
+ example: 'Item remark'
3581
+ _action:
3582
+ type: 'string'
3583
+ description: 'Set to "remove" to delete this item. Provide matching fields (id, sku, refCode, batchId, packingType, or refItemId) along with this field.'
3584
+ enum:
3585
+ - 'remove'
3586
+ example: 'remove'
3412
3587
  responses:
3413
3588
  '200':
3414
3589
  description: 'success'
3415
3590
  content:
3416
3591
  application/json:
3417
3592
  schema:
3418
- type: 'array'
3419
- items:
3420
- $ref: '#/definitions/UpdateReleaseOrderDetails'
3593
+ $ref: '#/definitions/UpdateReleaseOrderDetails'
3594
+ '400':
3595
+ description: 'Bad request - validation error'
3596
+ content:
3597
+ application/json:
3598
+ schema:
3599
+ type: 'object'
3600
+ properties:
3601
+ error:
3602
+ type: 'object'
3603
+ properties:
3604
+ code:
3605
+ type: 'string'
3606
+ example: 'E01'
3607
+ message:
3608
+ type: 'string'
3609
+ example: 'warehouse id not found'
3610
+ '404':
3611
+ description: 'Not found - release order not found or status not allowed for updates'
3612
+ content:
3613
+ application/json:
3614
+ schema:
3615
+ type: 'object'
3616
+ properties:
3617
+ error:
3618
+ type: 'object'
3619
+ properties:
3620
+ code:
3621
+ type: 'string'
3622
+ example: 'E04'
3623
+ message:
3624
+ type: 'string'
3625
+ 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'
3626
+ '500':
3627
+ description: 'Internal server error'
3628
+ content:
3629
+ application/json:
3630
+ schema:
3631
+ type: 'object'
3632
+ properties:
3633
+ error:
3634
+ type: 'object'
3635
+ properties:
3636
+ code:
3637
+ type: 'string'
3638
+ example: 'INTERNAL_SERVER_ERROR'
3639
+ message:
3640
+ type: 'string'
3641
+ example: 'An unexpected error occurred'
3421
3642
 
3422
3643
  # get-release-order-list
3423
3644
  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.746",
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": "6895d09e02b72d5adfac4ea120bef1ae7981a60a"
126
126
  }