@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.
- package/dist-server/routers/api/restful-apis/v1/company/add-contact-points.js +71 -2
- package/dist-server/routers/api/restful-apis/v1/company/add-contact-points.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/company/index.js +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/company/update-contact-points.js +243 -0
- package/dist-server/routers/api/restful-apis/v1/company/update-contact-points.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/utils/params.js +109 -28
- package/dist-server/routers/api/restful-apis/v1/utils/params.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/warehouse/index.js +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.js +365 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js +946 -19
- package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js.map +1 -1
- package/openapi/v1/contact-point.yaml +266 -0
- package/openapi/v1/inbound.yaml +349 -0
- package/openapi/v1/outbound.yaml +256 -150
- package/package.json +18 -18
- package/server/routers/api/restful-apis/v1/company/add-contact-points.ts +91 -2
- package/server/routers/api/restful-apis/v1/company/index.ts +1 -0
- package/server/routers/api/restful-apis/v1/company/update-contact-points.ts +267 -0
- package/server/routers/api/restful-apis/v1/utils/params.ts +109 -28
- package/server/routers/api/restful-apis/v1/warehouse/index.ts +1 -0
- package/server/routers/api/restful-apis/v1/warehouse/update-arrival-notice.ts +429 -0
- package/server/routers/api/restful-apis/v1/warehouse/update-release-order-details.ts +1122 -29
package/openapi/v1/inbound.yaml
CHANGED
|
@@ -708,6 +708,137 @@ definitions:
|
|
|
708
708
|
xml:
|
|
709
709
|
name: 'UpdateGANtoARRIVED'
|
|
710
710
|
|
|
711
|
+
# UpdateArrivalNotice
|
|
712
|
+
UpdateArrivalNotice:
|
|
713
|
+
type: 'object'
|
|
714
|
+
properties:
|
|
715
|
+
responseCode:
|
|
716
|
+
type: 'string'
|
|
717
|
+
example: '200'
|
|
718
|
+
message:
|
|
719
|
+
type: 'string'
|
|
720
|
+
example: 'success'
|
|
721
|
+
data:
|
|
722
|
+
type: 'object'
|
|
723
|
+
properties:
|
|
724
|
+
id:
|
|
725
|
+
type: 'string'
|
|
726
|
+
example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
|
|
727
|
+
ganNo:
|
|
728
|
+
type: 'string'
|
|
729
|
+
example: 'GAN-20240115001'
|
|
730
|
+
refNo:
|
|
731
|
+
type: 'string'
|
|
732
|
+
example: 'reference doc 1'
|
|
733
|
+
refNo2:
|
|
734
|
+
type: 'string'
|
|
735
|
+
example: 'reference doc 2'
|
|
736
|
+
refNo3:
|
|
737
|
+
type: 'string'
|
|
738
|
+
example: 'reference doc 3'
|
|
739
|
+
status:
|
|
740
|
+
type: 'string'
|
|
741
|
+
example: 'PENDING_RECEIVE'
|
|
742
|
+
description: 'Current status of the arrival notice. Updates are only allowed when status is PENDING, PENDING_RECEIVE, INTRANSIT, ARRIVED, or READY_TO_UNLOAD.'
|
|
743
|
+
etaDate:
|
|
744
|
+
type: 'string'
|
|
745
|
+
example: '2019-10-31'
|
|
746
|
+
ownTransport:
|
|
747
|
+
type: 'boolean'
|
|
748
|
+
example: false
|
|
749
|
+
importCargo:
|
|
750
|
+
type: 'boolean'
|
|
751
|
+
example: false
|
|
752
|
+
container:
|
|
753
|
+
type: 'boolean'
|
|
754
|
+
example: false
|
|
755
|
+
truckNo:
|
|
756
|
+
type: 'string'
|
|
757
|
+
example: 'ANN1020'
|
|
758
|
+
deliveryOrderNo:
|
|
759
|
+
type: 'string'
|
|
760
|
+
example: 'DO1905739'
|
|
761
|
+
containerNo:
|
|
762
|
+
type: 'string'
|
|
763
|
+
example: 'TEM10203'
|
|
764
|
+
containerSize:
|
|
765
|
+
type: 'string'
|
|
766
|
+
example: '5 tonnes'
|
|
767
|
+
remark:
|
|
768
|
+
type: 'string'
|
|
769
|
+
example: 'Additional notes'
|
|
770
|
+
description:
|
|
771
|
+
type: 'string'
|
|
772
|
+
example: 'Order description'
|
|
773
|
+
orderProducts:
|
|
774
|
+
type: 'array'
|
|
775
|
+
items:
|
|
776
|
+
type: 'object'
|
|
777
|
+
properties:
|
|
778
|
+
id:
|
|
779
|
+
type: 'string'
|
|
780
|
+
example: 'uuid2669-646f-42a0-8364-56f670fuuid'
|
|
781
|
+
product:
|
|
782
|
+
type: 'object'
|
|
783
|
+
properties:
|
|
784
|
+
name:
|
|
785
|
+
type: 'string'
|
|
786
|
+
example: 'Product Name'
|
|
787
|
+
sku:
|
|
788
|
+
type: 'string'
|
|
789
|
+
example: '00F8Y6'
|
|
790
|
+
batchId:
|
|
791
|
+
type: 'string'
|
|
792
|
+
example: 'batch no 1'
|
|
793
|
+
packingType:
|
|
794
|
+
type: 'string'
|
|
795
|
+
example: 'CARTON'
|
|
796
|
+
packingSize:
|
|
797
|
+
type: 'integer'
|
|
798
|
+
example: 24
|
|
799
|
+
qty:
|
|
800
|
+
type: 'number'
|
|
801
|
+
example: 10
|
|
802
|
+
palletQty:
|
|
803
|
+
type: 'number'
|
|
804
|
+
example: 1
|
|
805
|
+
uom:
|
|
806
|
+
type: 'string'
|
|
807
|
+
example: 'UNIT'
|
|
808
|
+
uomValue:
|
|
809
|
+
type: 'number'
|
|
810
|
+
example: 24.23
|
|
811
|
+
refItemId:
|
|
812
|
+
type: 'string'
|
|
813
|
+
example: 'ref item id'
|
|
814
|
+
unitPrice:
|
|
815
|
+
type: 'number'
|
|
816
|
+
example: 100.50
|
|
817
|
+
manufactureDate:
|
|
818
|
+
type: 'string'
|
|
819
|
+
example: '2024-01-15'
|
|
820
|
+
remark:
|
|
821
|
+
type: 'string'
|
|
822
|
+
example: 'Item remark'
|
|
823
|
+
supplier:
|
|
824
|
+
type: 'object'
|
|
825
|
+
nullable: true
|
|
826
|
+
properties:
|
|
827
|
+
id:
|
|
828
|
+
type: 'string'
|
|
829
|
+
example: 'uuid2669-646f-42a0-8364-56f670fuuid'
|
|
830
|
+
name:
|
|
831
|
+
type: 'string'
|
|
832
|
+
example: 'Supplier A'
|
|
833
|
+
email:
|
|
834
|
+
type: 'string'
|
|
835
|
+
example: 'email@companyA.com'
|
|
836
|
+
phone:
|
|
837
|
+
type: 'string'
|
|
838
|
+
example: '012-3456789'
|
|
839
|
+
xml:
|
|
840
|
+
name: 'UpdateArrivalNotice'
|
|
841
|
+
|
|
711
842
|
paths:
|
|
712
843
|
# add-inbound-order
|
|
713
844
|
|
|
@@ -1089,3 +1220,221 @@ paths:
|
|
|
1089
1220
|
type: 'array'
|
|
1090
1221
|
items:
|
|
1091
1222
|
$ref: '#/definitions/UpdateGANtoARRIVED'
|
|
1223
|
+
|
|
1224
|
+
# update-arrival-notice
|
|
1225
|
+
api/v1/warehouse/update-arrival-notice:
|
|
1226
|
+
post:
|
|
1227
|
+
tags:
|
|
1228
|
+
- 'Inbound'
|
|
1229
|
+
summary: 'Update Arrival Notice.'
|
|
1230
|
+
description: |
|
|
1231
|
+
Update arrival notice information and manage order products (add, update quantity, remove items).
|
|
1232
|
+
Updates are only allowed when arrival notice status is: PENDING, PENDING_RECEIVE, INTRANSIT, ARRIVED, or READY_TO_UNLOAD.
|
|
1233
|
+
|
|
1234
|
+
**Order Product Matching:**
|
|
1235
|
+
- To update an existing item, provide matching fields: id, sku, batchId, packingType, or refItemId
|
|
1236
|
+
- To add a new item, provide product information without matching existing items
|
|
1237
|
+
- To remove an item, set _action: 'remove' with matching fields
|
|
1238
|
+
operationId: 'updateArrivalNotice'
|
|
1239
|
+
produces:
|
|
1240
|
+
- 'application/json'
|
|
1241
|
+
parameters:
|
|
1242
|
+
- in: 'body'
|
|
1243
|
+
name: 'body'
|
|
1244
|
+
schema:
|
|
1245
|
+
type: 'object'
|
|
1246
|
+
required:
|
|
1247
|
+
- data
|
|
1248
|
+
properties:
|
|
1249
|
+
data:
|
|
1250
|
+
type: 'object'
|
|
1251
|
+
required:
|
|
1252
|
+
- arrivalNoticeId
|
|
1253
|
+
properties:
|
|
1254
|
+
arrivalNoticeId:
|
|
1255
|
+
type: 'string'
|
|
1256
|
+
description: 'UUID of the arrival notice. Alternatively, use ganNo.'
|
|
1257
|
+
example: '1d61cd39-f9de-4a28-8d24-981e6ea5c626'
|
|
1258
|
+
ganNo:
|
|
1259
|
+
type: 'string'
|
|
1260
|
+
description: 'GAN number of the arrival notice. Alternative to arrivalNoticeId.'
|
|
1261
|
+
example: 'GAN-20240115001'
|
|
1262
|
+
refNo:
|
|
1263
|
+
type: 'string'
|
|
1264
|
+
description: 'Reference number 1 (optional - only update if provided)'
|
|
1265
|
+
example: 'reference doc 1'
|
|
1266
|
+
refNo2:
|
|
1267
|
+
type: 'string'
|
|
1268
|
+
description: 'Reference number 2 (optional - only update if provided)'
|
|
1269
|
+
example: 'reference doc 2'
|
|
1270
|
+
refNo3:
|
|
1271
|
+
type: 'string'
|
|
1272
|
+
description: 'Reference number 3 (optional - only update if provided)'
|
|
1273
|
+
example: 'reference doc 3'
|
|
1274
|
+
etaDate:
|
|
1275
|
+
type: 'string'
|
|
1276
|
+
description: 'Estimated time of arrival date (optional - only update if provided)'
|
|
1277
|
+
example: '2019-10-31'
|
|
1278
|
+
ownTransport:
|
|
1279
|
+
type: 'boolean'
|
|
1280
|
+
description: 'Whether using own transport (optional - only update if provided)'
|
|
1281
|
+
example: false
|
|
1282
|
+
importCargo:
|
|
1283
|
+
type: 'boolean'
|
|
1284
|
+
description: 'Whether it is import cargo (optional - only update if provided)'
|
|
1285
|
+
example: false
|
|
1286
|
+
container:
|
|
1287
|
+
type: 'boolean'
|
|
1288
|
+
description: 'Whether using container (optional - only update if provided)'
|
|
1289
|
+
example: false
|
|
1290
|
+
containerNo:
|
|
1291
|
+
type: 'string'
|
|
1292
|
+
description: 'Container number (optional - only update if provided)'
|
|
1293
|
+
example: 'TEM10203'
|
|
1294
|
+
containerSize:
|
|
1295
|
+
type: 'string'
|
|
1296
|
+
description: 'Container size (optional - only update if provided)'
|
|
1297
|
+
example: '5 tonnes'
|
|
1298
|
+
truckNo:
|
|
1299
|
+
type: 'string'
|
|
1300
|
+
description: 'Truck number (optional - only update if provided)'
|
|
1301
|
+
example: 'ANN1020'
|
|
1302
|
+
deliveryOrderNo:
|
|
1303
|
+
type: 'string'
|
|
1304
|
+
description: 'Delivery order number (optional - only update if provided)'
|
|
1305
|
+
example: 'DO1905739'
|
|
1306
|
+
remark:
|
|
1307
|
+
type: 'string'
|
|
1308
|
+
description: 'Remarks (optional - only update if provided)'
|
|
1309
|
+
example: 'Additional notes'
|
|
1310
|
+
description:
|
|
1311
|
+
type: 'string'
|
|
1312
|
+
description: 'Description (optional - only update if provided)'
|
|
1313
|
+
example: 'Order description'
|
|
1314
|
+
supplierId:
|
|
1315
|
+
type: 'string'
|
|
1316
|
+
description: 'Supplier contact point ID. Set to null to remove supplier. (optional - only update if provided)'
|
|
1317
|
+
example: '69a462c5-9a58-4a61-915d-7ef4c31c8937'
|
|
1318
|
+
orderProducts:
|
|
1319
|
+
type: 'array'
|
|
1320
|
+
description: 'Array of order products to add, update, or remove'
|
|
1321
|
+
items:
|
|
1322
|
+
type: 'object'
|
|
1323
|
+
properties:
|
|
1324
|
+
id:
|
|
1325
|
+
type: 'string'
|
|
1326
|
+
description: 'Order product ID (optional - for matching existing items)'
|
|
1327
|
+
example: 'uuid2669-646f-42a0-8364-56f670fuuid'
|
|
1328
|
+
product:
|
|
1329
|
+
type: 'object'
|
|
1330
|
+
description: 'Product information (required for new items, optional for updates)'
|
|
1331
|
+
properties:
|
|
1332
|
+
sku:
|
|
1333
|
+
type: 'string'
|
|
1334
|
+
description: 'Product SKU (for matching or new items)'
|
|
1335
|
+
example: '00F8Y6'
|
|
1336
|
+
refCode:
|
|
1337
|
+
type: 'string'
|
|
1338
|
+
description: 'Product reference code (alternative to SKU)'
|
|
1339
|
+
example: 'REF-001'
|
|
1340
|
+
sku:
|
|
1341
|
+
type: 'string'
|
|
1342
|
+
description: 'Product SKU (alternative to product.sku)'
|
|
1343
|
+
example: '00F8Y6'
|
|
1344
|
+
batchId:
|
|
1345
|
+
type: 'string'
|
|
1346
|
+
description: 'Batch ID (for matching or new items)'
|
|
1347
|
+
example: 'batch no 1'
|
|
1348
|
+
packingType:
|
|
1349
|
+
type: 'string'
|
|
1350
|
+
description: 'Packing type (for matching or new items)'
|
|
1351
|
+
example: 'CARTON'
|
|
1352
|
+
packingSize:
|
|
1353
|
+
type: 'integer'
|
|
1354
|
+
description: 'Packing size (for new items)'
|
|
1355
|
+
example: 24
|
|
1356
|
+
qty:
|
|
1357
|
+
type: 'number'
|
|
1358
|
+
description: 'Quantity to update (for updates) or add (for new items). Must be greater than 0.'
|
|
1359
|
+
example: 10
|
|
1360
|
+
packQty:
|
|
1361
|
+
type: 'number'
|
|
1362
|
+
description: 'Alternative to qty'
|
|
1363
|
+
example: 10
|
|
1364
|
+
refItemId:
|
|
1365
|
+
type: 'string'
|
|
1366
|
+
description: 'Reference item ID (for matching or new items)'
|
|
1367
|
+
example: 'ref item id'
|
|
1368
|
+
unitPrice:
|
|
1369
|
+
type: 'number'
|
|
1370
|
+
description: 'Unit price (optional - only update if provided)'
|
|
1371
|
+
example: 100.50
|
|
1372
|
+
manufactureDate:
|
|
1373
|
+
type: 'string'
|
|
1374
|
+
description: 'Manufacture date (optional - only update if provided)'
|
|
1375
|
+
example: '2024-01-15'
|
|
1376
|
+
remark:
|
|
1377
|
+
type: 'string'
|
|
1378
|
+
description: 'Item remark (optional - only update if provided)'
|
|
1379
|
+
example: 'Item remark'
|
|
1380
|
+
_action:
|
|
1381
|
+
type: 'string'
|
|
1382
|
+
description: 'Set to "remove" to delete this item. Provide matching fields (id, sku, batchId, packingType, or refItemId) along with this field.'
|
|
1383
|
+
enum:
|
|
1384
|
+
- 'remove'
|
|
1385
|
+
example: 'remove'
|
|
1386
|
+
responses:
|
|
1387
|
+
'200':
|
|
1388
|
+
description: 'success'
|
|
1389
|
+
content:
|
|
1390
|
+
application/json:
|
|
1391
|
+
schema:
|
|
1392
|
+
$ref: '#/definitions/UpdateArrivalNotice'
|
|
1393
|
+
'400':
|
|
1394
|
+
description: 'Bad request - validation error'
|
|
1395
|
+
content:
|
|
1396
|
+
application/json:
|
|
1397
|
+
schema:
|
|
1398
|
+
type: 'object'
|
|
1399
|
+
properties:
|
|
1400
|
+
error:
|
|
1401
|
+
type: 'object'
|
|
1402
|
+
properties:
|
|
1403
|
+
code:
|
|
1404
|
+
type: 'string'
|
|
1405
|
+
example: 'E01'
|
|
1406
|
+
message:
|
|
1407
|
+
type: 'string'
|
|
1408
|
+
example: 'arrivalNoticeId or ganNo is required'
|
|
1409
|
+
'404':
|
|
1410
|
+
description: 'Not found - arrival notice not found or status not allowed for updates'
|
|
1411
|
+
content:
|
|
1412
|
+
application/json:
|
|
1413
|
+
schema:
|
|
1414
|
+
type: 'object'
|
|
1415
|
+
properties:
|
|
1416
|
+
error:
|
|
1417
|
+
type: 'object'
|
|
1418
|
+
properties:
|
|
1419
|
+
code:
|
|
1420
|
+
type: 'string'
|
|
1421
|
+
example: 'E04'
|
|
1422
|
+
message:
|
|
1423
|
+
type: 'string'
|
|
1424
|
+
example: 'Arrival notice not found: GAN-20240115001'
|
|
1425
|
+
'500':
|
|
1426
|
+
description: 'Internal server error'
|
|
1427
|
+
content:
|
|
1428
|
+
application/json:
|
|
1429
|
+
schema:
|
|
1430
|
+
type: 'object'
|
|
1431
|
+
properties:
|
|
1432
|
+
error:
|
|
1433
|
+
type: 'object'
|
|
1434
|
+
properties:
|
|
1435
|
+
code:
|
|
1436
|
+
type: 'string'
|
|
1437
|
+
example: 'INTERNAL_SERVER_ERROR'
|
|
1438
|
+
message:
|
|
1439
|
+
type: 'string'
|
|
1440
|
+
example: 'An unexpected error occurred'
|