@things-factory/operato-hub 4.3.107 → 4.3.108
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/client/pages/bizplace/register.js +2 -0
- package/dist-server/controllers/bizplace-initializer/dataset/codes.js +1 -1
- package/dist-server/controllers/bizplace-initializer/dataset/codes.js.map +1 -1
- package/dist-server/graphql/resolvers/synchronization/sync-products-to-sellercraft.js +10 -9
- package/dist-server/graphql/resolvers/synchronization/sync-products-to-sellercraft.js.map +1 -1
- package/dist-server/middlewares/store-middleware.js.map +1 -1
- package/dist-server/routers/api/index.js +0 -1
- package/dist-server/routers/api/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/unstable/add-release-order.js +8 -8
- package/dist-server/routers/api/restful-apis/v1/company/add-contact-points.js +105 -0
- package/dist-server/routers/api/restful-apis/v1/company/add-contact-points.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/add-marketplace-order.js +197 -0
- package/dist-server/routers/api/restful-apis/v1/company/add-marketplace-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/add-products.js +69 -0
- package/dist-server/routers/api/restful-apis/v1/company/add-products.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/cancel-marketplace-order.js +90 -0
- package/dist-server/routers/api/restful-apis/v1/company/cancel-marketplace-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-bizplace-list.js +49 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-bizplace-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-contact-point-list.js +62 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-contact-point-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-marketplace-order-shipping-list.js +108 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-marketplace-order-shipping-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-marketplace-store-list.js +51 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-marketplace-store-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-partner-list.js +88 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-partner-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-product-list.js +98 -0
- package/dist-server/routers/api/restful-apis/v1/company/get-product-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/index.js +15 -0
- package/dist-server/routers/api/restful-apis/v1/company/index.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/update-marketplace-order-delivered.js +62 -0
- package/dist-server/routers/api/restful-apis/v1/company/update-marketplace-order-delivered.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/company/update-marketplace-shipping-order.js +44 -0
- package/dist-server/routers/api/restful-apis/v1/company/update-marketplace-shipping-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/index.js +2 -31
- package/dist-server/routers/api/restful-apis/v1/index.js.map +1 -1
- package/dist-server/routers/api/restful-apis/v1/middlewares/business-middleware.js +66 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/business-middleware.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/index.js +40 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/index.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/logging-middleware.js +23 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/logging-middleware.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/store-middleware.js +32 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/store-middleware.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/validation-middleware.js +118 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/validation-middleware.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/warehouse-middleware.js +31 -0
- package/dist-server/routers/api/restful-apis/v1/middlewares/warehouse-middleware.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/utils/error-util.js +71 -0
- package/dist-server/routers/api/restful-apis/v1/utils/error-util.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/utils/params.js +555 -0
- package/dist-server/routers/api/restful-apis/v1/utils/params.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/utils/validate-util.js +60 -0
- package/dist-server/routers/api/restful-apis/v1/utils/validate-util.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/add-inbound-order.js +236 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/add-inbound-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/add-release-order.js +762 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/add-release-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/cancel-inbound-order.js +197 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/cancel-inbound-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/cancel-release-order.js +177 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/cancel-release-order.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-delivery-order-list.js +138 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-delivery-order-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.js +97 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-inbound-order-details.js +81 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-inbound-order-details.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-inbound-order-list.js +94 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-inbound-order-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-inventory-product-group-list.js +87 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-inventory-product-group-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-onhand-inventory-list.js +84 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-onhand-inventory-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-release-order-details.js +96 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-release-order-details.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-release-order-list.js +110 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/get-release-order-list.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/index.js +16 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/index.js.map +1 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js +71 -0
- package/dist-server/routers/api/restful-apis/v1/warehouse/update-release-order-details.js.map +1 -0
- package/openapi/v1/Inventory.yaml +263 -0
- package/package.json +54 -54
- package/server/controllers/bizplace-initializer/dataset/codes.ts +1 -1
- package/server/graphql/resolvers/synchronization/sync-products-to-sellercraft.ts +25 -17
- package/server/middlewares/store-middleware.ts +1 -0
- package/server/routers/api/index.ts +0 -1
- package/server/routers/api/restful-apis/unstable/add-release-order.ts +8 -8
- package/server/routers/api/restful-apis/v1/company/add-contact-points.ts +111 -0
- package/server/routers/api/restful-apis/v1/company/add-marketplace-order.ts +234 -0
- package/server/routers/api/restful-apis/v1/company/add-products.ts +96 -0
- package/server/routers/api/restful-apis/v1/company/cancel-marketplace-order.ts +94 -0
- package/server/routers/api/restful-apis/v1/company/get-bizplace-list.ts +55 -0
- package/server/routers/api/restful-apis/v1/company/get-contact-point-list.ts +67 -0
- package/server/routers/api/restful-apis/v1/company/get-marketplace-order-shipping-list.ts +115 -0
- package/server/routers/api/restful-apis/v1/company/get-marketplace-store-list.ts +57 -0
- package/server/routers/api/restful-apis/v1/company/get-partner-list.ts +95 -0
- package/server/routers/api/restful-apis/v1/company/get-product-list.ts +103 -0
- package/server/routers/api/restful-apis/v1/company/index.ts +12 -0
- package/server/routers/api/restful-apis/v1/company/update-marketplace-order-delivered.ts +66 -0
- package/server/routers/api/restful-apis/v1/company/update-marketplace-shipping-order.ts +55 -0
- package/server/routers/api/restful-apis/v1/index.ts +2 -31
- package/server/routers/api/restful-apis/v1/middlewares/business-middleware.ts +68 -0
- package/server/routers/api/restful-apis/v1/middlewares/index.ts +26 -0
- package/server/routers/api/restful-apis/v1/middlewares/logging-middleware.ts +24 -0
- package/server/routers/api/restful-apis/v1/middlewares/store-middleware.ts +34 -0
- package/server/routers/api/restful-apis/v1/middlewares/validation-middleware.ts +116 -0
- package/server/routers/api/restful-apis/v1/middlewares/warehouse-middleware.ts +31 -0
- package/server/routers/api/restful-apis/v1/utils/error-util.ts +70 -0
- package/server/routers/api/restful-apis/v1/utils/params.ts +555 -0
- package/server/routers/api/restful-apis/v1/utils/validate-util.ts +53 -0
- package/server/routers/api/restful-apis/v1/warehouse/add-inbound-order.ts +324 -0
- package/server/routers/api/restful-apis/v1/warehouse/add-release-order.ts +941 -0
- package/server/routers/api/restful-apis/v1/warehouse/cancel-inbound-order.ts +261 -0
- package/server/routers/api/restful-apis/v1/warehouse/cancel-release-order.ts +258 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-delivery-order-list.ts +141 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-goods-received-note-list.ts +105 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-inbound-order-details.ts +83 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-inbound-order-list.ts +96 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-inventory-product-group-list.ts +112 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-onhand-inventory-list.ts +89 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-release-order-details.ts +99 -0
- package/server/routers/api/restful-apis/v1/warehouse/get-release-order-list.ts +113 -0
- package/server/routers/api/restful-apis/v1/warehouse/index.ts +13 -0
- package/server/routers/api/restful-apis/v1/warehouse/update-release-order-details.ts +96 -0
- package/translations/en.json +2 -0
- package/translations/ko.json +2 -0
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
- package/dist-server/routers/api/restful-apis/v1/add-contact-point.js +0 -64
- package/dist-server/routers/api/restful-apis/v1/add-contact-point.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/add-draft-release-order.js +0 -171
- package/dist-server/routers/api/restful-apis/v1/add-draft-release-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/add-inbound-order.js +0 -213
- package/dist-server/routers/api/restful-apis/v1/add-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/add-marketplace-order.js +0 -144
- package/dist-server/routers/api/restful-apis/v1/add-marketplace-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/add-products.js +0 -88
- package/dist-server/routers/api/restful-apis/v1/add-products.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/add-release-order.js +0 -774
- package/dist-server/routers/api/restful-apis/v1/add-release-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/bizplace.js +0 -45
- package/dist-server/routers/api/restful-apis/v1/bizplace.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/cancel-marketplace-order.js +0 -63
- package/dist-server/routers/api/restful-apis/v1/cancel-marketplace-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/cancel-release-order.js +0 -66
- package/dist-server/routers/api/restful-apis/v1/cancel-release-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-contact-point-list.js +0 -103
- package/dist-server/routers/api/restful-apis/v1/get-contact-point-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-delivery-order-detail.js +0 -47
- package/dist-server/routers/api/restful-apis/v1/get-delivery-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-delivery-order-list.js +0 -124
- package/dist-server/routers/api/restful-apis/v1/get-delivery-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-delivery-orders.js +0 -164
- package/dist-server/routers/api/restful-apis/v1/get-delivery-orders.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-goods-received-notes.js +0 -120
- package/dist-server/routers/api/restful-apis/v1/get-goods-received-notes.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-inbound-order-detail.js +0 -115
- package/dist-server/routers/api/restful-apis/v1/get-inbound-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-inbound-order-list.js +0 -125
- package/dist-server/routers/api/restful-apis/v1/get-inbound-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-inventory-overall-product-group.js +0 -88
- package/dist-server/routers/api/restful-apis/v1/get-inventory-overall-product-group.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-inventory-product-group.js +0 -101
- package/dist-server/routers/api/restful-apis/v1/get-inventory-product-group.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.js +0 -146
- package/dist-server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-marketplace-store-list.js +0 -79
- package/dist-server/routers/api/restful-apis/v1/get-marketplace-store-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-onhand-inventories.js +0 -110
- package/dist-server/routers/api/restful-apis/v1/get-onhand-inventories.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-partners.js +0 -23
- package/dist-server/routers/api/restful-apis/v1/get-partners.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-products.js +0 -210
- package/dist-server/routers/api/restful-apis/v1/get-products.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-release-order-detail.js +0 -122
- package/dist-server/routers/api/restful-apis/v1/get-release-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-release-order-list.js +0 -191
- package/dist-server/routers/api/restful-apis/v1/get-release-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/get-warehouses.js +0 -20
- package/dist-server/routers/api/restful-apis/v1/get-warehouses.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/reject-inbound-order.js +0 -35
- package/dist-server/routers/api/restful-apis/v1/reject-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/set-marketplace-order-delivered.js +0 -45
- package/dist-server/routers/api/restful-apis/v1/set-marketplace-order-delivered.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/set-marketplace-order-failed-delivery.js +0 -45
- package/dist-server/routers/api/restful-apis/v1/set-marketplace-order-failed-delivery.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/update-marketplace-order.js +0 -93
- package/dist-server/routers/api/restful-apis/v1/update-marketplace-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/update-marketplace-shipping-order.js +0 -85
- package/dist-server/routers/api/restful-apis/v1/update-marketplace-shipping-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v1/update-release-order-details.js +0 -82
- package/dist-server/routers/api/restful-apis/v1/update-release-order-details.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/add-contact-point.js +0 -64
- package/dist-server/routers/api/restful-apis/v2/add-contact-point.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/add-draft-release-order.js +0 -171
- package/dist-server/routers/api/restful-apis/v2/add-draft-release-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/add-inbound-order.js +0 -213
- package/dist-server/routers/api/restful-apis/v2/add-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/add-marketplace-order.js +0 -144
- package/dist-server/routers/api/restful-apis/v2/add-marketplace-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/add-products.js +0 -88
- package/dist-server/routers/api/restful-apis/v2/add-products.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/add-release-order.js +0 -774
- package/dist-server/routers/api/restful-apis/v2/add-release-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/bizplace.js +0 -45
- package/dist-server/routers/api/restful-apis/v2/bizplace.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/cancel-marketplace-order.js +0 -63
- package/dist-server/routers/api/restful-apis/v2/cancel-marketplace-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/cancel-release-order.js +0 -66
- package/dist-server/routers/api/restful-apis/v2/cancel-release-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-contact-point-list.js +0 -103
- package/dist-server/routers/api/restful-apis/v2/get-contact-point-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-delivery-order-detail.js +0 -47
- package/dist-server/routers/api/restful-apis/v2/get-delivery-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-delivery-order-list.js +0 -124
- package/dist-server/routers/api/restful-apis/v2/get-delivery-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-delivery-orders.js +0 -164
- package/dist-server/routers/api/restful-apis/v2/get-delivery-orders.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-goods-received-notes.js +0 -120
- package/dist-server/routers/api/restful-apis/v2/get-goods-received-notes.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-inbound-order-detail.js +0 -115
- package/dist-server/routers/api/restful-apis/v2/get-inbound-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-inbound-order-list.js +0 -125
- package/dist-server/routers/api/restful-apis/v2/get-inbound-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-inventory-overall-product-group.js +0 -88
- package/dist-server/routers/api/restful-apis/v2/get-inventory-overall-product-group.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-inventory-product-group.js +0 -101
- package/dist-server/routers/api/restful-apis/v2/get-inventory-product-group.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.js +0 -146
- package/dist-server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-marketplace-store-list.js +0 -79
- package/dist-server/routers/api/restful-apis/v2/get-marketplace-store-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-onhand-inventories.js +0 -110
- package/dist-server/routers/api/restful-apis/v2/get-onhand-inventories.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-partners.js +0 -23
- package/dist-server/routers/api/restful-apis/v2/get-partners.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-products.js +0 -210
- package/dist-server/routers/api/restful-apis/v2/get-products.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-release-order-detail.js +0 -122
- package/dist-server/routers/api/restful-apis/v2/get-release-order-detail.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-release-order-list.js +0 -191
- package/dist-server/routers/api/restful-apis/v2/get-release-order-list.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/get-warehouses.js +0 -20
- package/dist-server/routers/api/restful-apis/v2/get-warehouses.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/index.js +0 -34
- package/dist-server/routers/api/restful-apis/v2/index.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/reject-inbound-order.js +0 -35
- package/dist-server/routers/api/restful-apis/v2/reject-inbound-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/set-marketplace-order-delivered.js +0 -45
- package/dist-server/routers/api/restful-apis/v2/set-marketplace-order-delivered.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/set-marketplace-order-failed-delivery.js +0 -45
- package/dist-server/routers/api/restful-apis/v2/set-marketplace-order-failed-delivery.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/update-marketplace-order.js +0 -93
- package/dist-server/routers/api/restful-apis/v2/update-marketplace-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/update-marketplace-shipping-order.js +0 -85
- package/dist-server/routers/api/restful-apis/v2/update-marketplace-shipping-order.js.map +0 -1
- package/dist-server/routers/api/restful-apis/v2/update-release-order-details.js +0 -82
- package/dist-server/routers/api/restful-apis/v2/update-release-order-details.js.map +0 -1
- package/server/routers/api/restful-apis/v1/add-contact-point.ts +0 -77
- package/server/routers/api/restful-apis/v1/add-draft-release-order.ts +0 -196
- package/server/routers/api/restful-apis/v1/add-inbound-order.ts +0 -242
- package/server/routers/api/restful-apis/v1/add-marketplace-order.ts +0 -172
- package/server/routers/api/restful-apis/v1/add-products.ts +0 -112
- package/server/routers/api/restful-apis/v1/add-release-order.ts +0 -967
- package/server/routers/api/restful-apis/v1/bizplace.ts +0 -45
- package/server/routers/api/restful-apis/v1/cancel-marketplace-order.ts +0 -81
- package/server/routers/api/restful-apis/v1/cancel-release-order.ts +0 -91
- package/server/routers/api/restful-apis/v1/get-contact-point-list.ts +0 -110
- package/server/routers/api/restful-apis/v1/get-delivery-order-detail.ts +0 -46
- package/server/routers/api/restful-apis/v1/get-delivery-order-list.ts +0 -121
- package/server/routers/api/restful-apis/v1/get-delivery-orders.ts +0 -178
- package/server/routers/api/restful-apis/v1/get-goods-received-notes.ts +0 -134
- package/server/routers/api/restful-apis/v1/get-inbound-order-detail.ts +0 -128
- package/server/routers/api/restful-apis/v1/get-inbound-order-list.ts +0 -126
- package/server/routers/api/restful-apis/v1/get-inventory-overall-product-group.ts +0 -99
- package/server/routers/api/restful-apis/v1/get-inventory-product-group.ts +0 -112
- package/server/routers/api/restful-apis/v1/get-marketplace-order-shipping-list.ts +0 -156
- package/server/routers/api/restful-apis/v1/get-marketplace-store-list.ts +0 -81
- package/server/routers/api/restful-apis/v1/get-onhand-inventories.ts +0 -125
- package/server/routers/api/restful-apis/v1/get-partners.ts +0 -24
- package/server/routers/api/restful-apis/v1/get-products.ts +0 -216
- package/server/routers/api/restful-apis/v1/get-release-order-detail.ts +0 -134
- package/server/routers/api/restful-apis/v1/get-release-order-list.ts +0 -198
- package/server/routers/api/restful-apis/v1/get-warehouses.ts +0 -18
- package/server/routers/api/restful-apis/v1/reject-inbound-order.ts +0 -46
- package/server/routers/api/restful-apis/v1/set-marketplace-order-delivered.ts +0 -60
- package/server/routers/api/restful-apis/v1/set-marketplace-order-failed-delivery.ts +0 -60
- package/server/routers/api/restful-apis/v1/update-marketplace-order.ts +0 -111
- package/server/routers/api/restful-apis/v1/update-marketplace-shipping-order.ts +0 -104
- package/server/routers/api/restful-apis/v1/update-release-order-details.ts +0 -94
- package/server/routers/api/restful-apis/v2/add-contact-point.ts +0 -77
- package/server/routers/api/restful-apis/v2/add-draft-release-order.ts +0 -196
- package/server/routers/api/restful-apis/v2/add-inbound-order.ts +0 -242
- package/server/routers/api/restful-apis/v2/add-marketplace-order.ts +0 -172
- package/server/routers/api/restful-apis/v2/add-products.ts +0 -112
- package/server/routers/api/restful-apis/v2/add-release-order.ts +0 -967
- package/server/routers/api/restful-apis/v2/bizplace.ts +0 -45
- package/server/routers/api/restful-apis/v2/cancel-marketplace-order.ts +0 -81
- package/server/routers/api/restful-apis/v2/cancel-release-order.ts +0 -91
- package/server/routers/api/restful-apis/v2/get-contact-point-list.ts +0 -110
- package/server/routers/api/restful-apis/v2/get-delivery-order-detail.ts +0 -46
- package/server/routers/api/restful-apis/v2/get-delivery-order-list.ts +0 -121
- package/server/routers/api/restful-apis/v2/get-delivery-orders.ts +0 -178
- package/server/routers/api/restful-apis/v2/get-goods-received-notes.ts +0 -134
- package/server/routers/api/restful-apis/v2/get-inbound-order-detail.ts +0 -128
- package/server/routers/api/restful-apis/v2/get-inbound-order-list.ts +0 -126
- package/server/routers/api/restful-apis/v2/get-inventory-overall-product-group.ts +0 -99
- package/server/routers/api/restful-apis/v2/get-inventory-product-group.ts +0 -112
- package/server/routers/api/restful-apis/v2/get-marketplace-order-shipping-list.ts +0 -156
- package/server/routers/api/restful-apis/v2/get-marketplace-store-list.ts +0 -81
- package/server/routers/api/restful-apis/v2/get-onhand-inventories.ts +0 -125
- package/server/routers/api/restful-apis/v2/get-partners.ts +0 -24
- package/server/routers/api/restful-apis/v2/get-products.ts +0 -216
- package/server/routers/api/restful-apis/v2/get-release-order-detail.ts +0 -134
- package/server/routers/api/restful-apis/v2/get-release-order-list.ts +0 -198
- package/server/routers/api/restful-apis/v2/get-warehouses.ts +0 -18
- package/server/routers/api/restful-apis/v2/index.ts +0 -31
- package/server/routers/api/restful-apis/v2/reject-inbound-order.ts +0 -46
- package/server/routers/api/restful-apis/v2/set-marketplace-order-delivered.ts +0 -60
- package/server/routers/api/restful-apis/v2/set-marketplace-order-failed-delivery.ts +0 -60
- package/server/routers/api/restful-apis/v2/update-marketplace-order.ts +0 -111
- package/server/routers/api/restful-apis/v2/update-marketplace-shipping-order.ts +0 -104
- package/server/routers/api/restful-apis/v2/update-release-order-details.ts +0 -94
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './cancel-inbound-order'
|
|
2
|
+
import './get-delivery-order-list'
|
|
3
|
+
import './get-goods-received-note-list'
|
|
4
|
+
import './get-inbound-order-details'
|
|
5
|
+
import './get-inbound-order-list'
|
|
6
|
+
import './get-inventory-product-group-list'
|
|
7
|
+
import './get-onhand-inventory-list'
|
|
8
|
+
import './get-release-order-details'
|
|
9
|
+
import './get-release-order-list'
|
|
10
|
+
import './add-release-order'
|
|
11
|
+
import './cancel-release-order'
|
|
12
|
+
import './update-release-order-details'
|
|
13
|
+
import './add-inbound-order'
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { getConnection, EntityManager, Not, In } from 'typeorm'
|
|
2
|
+
|
|
3
|
+
import { restfulApiRouter as router } from '@things-factory/api'
|
|
4
|
+
import { ReleaseGood, ShippingOrder, ORDER_STATUS } from '@things-factory/sales-base'
|
|
5
|
+
import { businessMiddleware, loggingMiddleware, validationMiddleware } from '../middlewares'
|
|
6
|
+
import { ApiError, ApiErrorHandler, throwInternalServerError } from '../utils/error-util'
|
|
7
|
+
import { OrderNoGenerator } from '@things-factory/sales-base'
|
|
8
|
+
import { getMyBizplace } from '@things-factory/biz-base'
|
|
9
|
+
import { User } from '@things-factory/auth-base'
|
|
10
|
+
|
|
11
|
+
const debug = require('debug')('things-factory:operato-hub:restful-api:v1:update-release-order-details')
|
|
12
|
+
|
|
13
|
+
router.post(
|
|
14
|
+
'/v1/warehouse/update-release-order-details',
|
|
15
|
+
businessMiddleware,
|
|
16
|
+
validationMiddleware,
|
|
17
|
+
loggingMiddleware,
|
|
18
|
+
async (context, next) => {
|
|
19
|
+
try {
|
|
20
|
+
const { domain } = context.state
|
|
21
|
+
const bodyReq = context.request.body.data
|
|
22
|
+
const { bizplaceId: customerBizplaceId } = bodyReq
|
|
23
|
+
const { user }: { user: User } = context.state
|
|
24
|
+
|
|
25
|
+
await getConnection().transaction(async (tx: EntityManager) => {
|
|
26
|
+
if (!customerBizplaceId) throw new ApiError('E04', 'warehouse id not found')
|
|
27
|
+
|
|
28
|
+
let patch: any = {}
|
|
29
|
+
patch.releaseGood = bodyReq.releaseGood
|
|
30
|
+
|
|
31
|
+
if (bodyReq?.shippingOrder) patch.shippingOrder = bodyReq.shippingOrder
|
|
32
|
+
else patch.shippingOrder = null
|
|
33
|
+
|
|
34
|
+
context.body = await updateReleaseGoodDetails(tx, domain, patch, user)
|
|
35
|
+
})
|
|
36
|
+
} catch (e) {
|
|
37
|
+
if (e instanceof ApiError) ApiErrorHandler(context, e)
|
|
38
|
+
else throwInternalServerError(context, e)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
async function updateReleaseGoodDetails(tx, domain, patch, user) {
|
|
44
|
+
let { releaseGood, shippingOrder } = patch
|
|
45
|
+
let status = [ORDER_STATUS.DONE, ORDER_STATUS.CANCELLED, ORDER_STATUS.REJECTED]
|
|
46
|
+
let foundReleaseGood = await tx.getRepository(ReleaseGood).findOne({
|
|
47
|
+
where: {
|
|
48
|
+
id: releaseGood.roId,
|
|
49
|
+
domain
|
|
50
|
+
},
|
|
51
|
+
relations: ['shippingOrder']
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
if (!foundReleaseGood) {
|
|
55
|
+
throw new ApiError('E04', `release order: ${releaseGood.roId}`)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (status.indexOf(foundReleaseGood.status) !== -1) {
|
|
59
|
+
throw new ApiError('E04', `release order status: ${foundReleaseGood.status}`)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// case to update existing shippingOrder
|
|
63
|
+
if (shippingOrder !== null) {
|
|
64
|
+
shippingOrder.remark = shippingOrder.exportRemark
|
|
65
|
+
shippingOrder.containerClosureDateTime = shippingOrder.containerClosureDate
|
|
66
|
+
? new Date(shippingOrder?.containerClosureDate)
|
|
67
|
+
: null
|
|
68
|
+
delete shippingOrder.exportRemark
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (foundReleaseGood.shippingOrder && shippingOrder) {
|
|
72
|
+
await tx.getRepository(ShippingOrder).update(foundReleaseGood.shippingOrder.id, shippingOrder)
|
|
73
|
+
}
|
|
74
|
+
// case for new shippingOrder
|
|
75
|
+
else if (!foundReleaseGood.shippingOrder && shippingOrder) {
|
|
76
|
+
let newShippingOrder: ShippingOrder = await tx.getRepository(ShippingOrder).save({
|
|
77
|
+
...shippingOrder,
|
|
78
|
+
name: OrderNoGenerator.shippingOrder(),
|
|
79
|
+
domain,
|
|
80
|
+
bizplace: await getMyBizplace(domain, user),
|
|
81
|
+
status: ORDER_STATUS.PENDING,
|
|
82
|
+
creator: user,
|
|
83
|
+
updater: user
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
releaseGood.shippingOrder = newShippingOrder
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
foundReleaseGood = await tx.getRepository(ReleaseGood).save({
|
|
90
|
+
...foundReleaseGood,
|
|
91
|
+
...releaseGood,
|
|
92
|
+
remark: releaseGood?.remark ? releaseGood.remark : null
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
return foundReleaseGood
|
|
96
|
+
}
|
package/translations/en.json
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"label.warehouse": "warehouse",
|
|
38
38
|
|
|
39
39
|
"text.are_you_sure_to_sync_product": "are you sure to sync product?",
|
|
40
|
+
"text.attachment_info_not_valid": "attachment info not valid",
|
|
40
41
|
"text.nothing_to_sync": "no data available for synchronisation",
|
|
41
42
|
"text.please_select_template_type": "please select template type",
|
|
42
43
|
"text.please_wait": "please wait",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"text.user_deleted_successfully": "user deleted successfully",
|
|
48
49
|
"text.x_cannot_delete": "{x} cannot be deleted",
|
|
49
50
|
"text.transform_to_x": "transform to {x}",
|
|
51
|
+
"text.contact_type_does_not_exist": "contact type does not exist",
|
|
50
52
|
|
|
51
53
|
"error.company not found": "company not found",
|
|
52
54
|
"error.eta date is invalid": "eta date is invalid",
|
package/translations/ko.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"label.state": "상태",
|
|
18
18
|
|
|
19
19
|
"text.are_you_sure_to_sync_product": "상품을 동기화하시겠습니까?",
|
|
20
|
+
"text.attachment_info_not_valid": "첨부파일 정보 유효하지 않음",
|
|
20
21
|
"text.nothing_to_sync": "[ko]no data available for synchronisation",
|
|
21
22
|
"text.please_wait": "잠시만 기다려주세요.",
|
|
22
23
|
"text.product_sync_to_accounting": "[ko]synchronising product to accounting platform",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"text.transform_to_x": "{x}로 변경",
|
|
56
57
|
"text.user_deleted_successfully": "성공적으로 사용자를 삭제하였습니다.",
|
|
57
58
|
"text.x_cannot_delete": "{x}(은)는 삭제할 수 없습니다.",
|
|
59
|
+
"text.contact_type_does_not_exist": "[ko]contact type does not exist",
|
|
58
60
|
"error.warehouse not found": "웨어하우스를 찾을 수 없습니다.",
|
|
59
61
|
"error.warehouse not found in the company": "회사내에서 웨어하우스를 찾을 수 없습니다.",
|
|
60
62
|
|
package/translations/ms.json
CHANGED
|
@@ -32,12 +32,14 @@
|
|
|
32
32
|
"label.warehouse": "[ms] warehouse",
|
|
33
33
|
|
|
34
34
|
"text.are_you_sure_to_sync_product": "[ms] are you sure to sync product?",
|
|
35
|
+
"text.attachment_info_not_valid": "informasi lampiran tidak sah",
|
|
35
36
|
"text.nothing_to_sync": "[ms] no data available for synchronisation",
|
|
36
37
|
"text.please_select_template_type": "[ms] please select template type",
|
|
37
38
|
"text.please_wait": "[ms] please wait",
|
|
38
39
|
"text.product_sync_to_accounting": "[ms] synchronising product to accounting platform",
|
|
39
40
|
"text.success": "[ms] success",
|
|
40
41
|
"text.transform_to_x": "[ms] transform to {x}",
|
|
42
|
+
"text.contact_type_does_not_exist": "[ms]contact type does not exist",
|
|
41
43
|
|
|
42
44
|
"error.company not found": "[ms] company not found",
|
|
43
45
|
"error.eta date is invalid": "[ms] eta date is invalid",
|
package/translations/zh.json
CHANGED
|
@@ -36,12 +36,14 @@
|
|
|
36
36
|
"label.warehouse": "仓库",
|
|
37
37
|
|
|
38
38
|
"text.are_you_sure_to_sync_product": "您确定要同步产品信息吗?",
|
|
39
|
+
"text.attachment_info_not_valid": "attachment info not valid",
|
|
39
40
|
"text.nothing_to_sync": "没有可用于同步的数据!",
|
|
40
41
|
"text.please_select_template_type": "请选择模板类型!",
|
|
41
42
|
"text.please_wait": "请等待",
|
|
42
43
|
"text.product_sync_to_accounting": "正在将产品与会计平台同步",
|
|
43
44
|
"text.success": "成功",
|
|
44
45
|
"text.transform_to_x": "变更为{x}",
|
|
46
|
+
"text.contact_type_does_not_exist": "[zh]contact type does not exist",
|
|
45
47
|
|
|
46
48
|
"error.company not found": "未找到公司信息。",
|
|
47
49
|
"error.eta date is invalid": "[zh] eta date is invalid",
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkMandatoryKey = void 0;
|
|
7
|
-
const api_1 = require("@things-factory/api");
|
|
8
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
9
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
10
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
11
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:v1:add-contact-point');
|
|
12
|
-
api_1.restfulApiRouter.post('/v1/warehouse/:warehouseId/add-contact-point', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
13
|
-
var _a;
|
|
14
|
-
const { client, warehouse: bizplace, domain } = context.state;
|
|
15
|
-
const { warehouseId } = context.params;
|
|
16
|
-
const { t } = context;
|
|
17
|
-
let bodyReq = context.request.body;
|
|
18
|
-
if (!warehouseId)
|
|
19
|
-
context.throw(404, t('error.warehouse id not found'));
|
|
20
|
-
if (typeof bodyReq === undefined || !((_a = Object.keys(bodyReq)) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
21
|
-
context.throw(400, context.t('error.invalid body request format'));
|
|
22
|
-
}
|
|
23
|
-
await checkMandatoryKey(context, bodyReq);
|
|
24
|
-
debug('post:/add-contact-point request.body', bodyReq);
|
|
25
|
-
let patches = bodyReq.map(record => {
|
|
26
|
-
let patch = Object.assign({}, record);
|
|
27
|
-
patch.cuFlag = '+';
|
|
28
|
-
return patch;
|
|
29
|
-
});
|
|
30
|
-
context.body = {
|
|
31
|
-
result: (await client.query({
|
|
32
|
-
query: (0, graphql_tag_1.default) `
|
|
33
|
-
mutation updateMultipleContactPoint($patches: [ContactPointPatch]!) {
|
|
34
|
-
updateMultipleContactPoint(patches: $patches) {
|
|
35
|
-
name
|
|
36
|
-
companyName
|
|
37
|
-
phone
|
|
38
|
-
address
|
|
39
|
-
address2
|
|
40
|
-
city
|
|
41
|
-
state
|
|
42
|
-
postalCode
|
|
43
|
-
type
|
|
44
|
-
fax
|
|
45
|
-
email
|
|
46
|
-
address
|
|
47
|
-
billingAddress
|
|
48
|
-
accountNo
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`,
|
|
52
|
-
variables: { patches },
|
|
53
|
-
context: Object.assign(Object.assign({}, context), { state: Object.assign(Object.assign({}, context.state), { bizplace,
|
|
54
|
-
domain }) })
|
|
55
|
-
})).data
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
async function checkMandatoryKey(context, params) {
|
|
59
|
-
let noparams = ['name', 'email', 'phone', 'address', 'billingAddress', 'type'].filter(param => !(param in params));
|
|
60
|
-
if (noparams === null || noparams === void 0 ? void 0 : noparams.length)
|
|
61
|
-
context.throw(400, context.t('error.required param x not found', { x: `${noparams.join(', ')}` }));
|
|
62
|
-
}
|
|
63
|
-
exports.checkMandatoryKey = checkMandatoryKey;
|
|
64
|
-
//# sourceMappingURL=add-contact-point.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-contact-point.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v1/add-contact-point.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAgE;AAChE,8DAA6B;AAC7B,qFAAgF;AAChF,uFAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,6DAA6D,CAAC,CAAA;AAE7F,sBAAM,CAAC,IAAI,CACT,8CAA8C,EAC9C,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;;IACtB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC7D,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;IACtC,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;IACrB,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;IAElC,IAAI,CAAC,WAAW;QAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA;IAEvE,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,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AAE,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AACtG,CAAC;AALD,8CAKC"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkMandatoryKey = void 0;
|
|
7
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
const typeorm_1 = require("typeorm");
|
|
9
|
-
const api_1 = require("@things-factory/api");
|
|
10
|
-
const biz_base_1 = require("@things-factory/biz-base");
|
|
11
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
12
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
13
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:unstable:add-draft-release-order');
|
|
14
|
-
api_1.restfulApiRouter.post('/v1/warehouse/:warehouseId/add-draft-release-order', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
15
|
-
return await (0, typeorm_1.getConnection)().transaction(async (tx) => {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
17
|
-
const { client, domain } = context.state;
|
|
18
|
-
const { warehouseId: customerBizplaceId } = context.params;
|
|
19
|
-
const { t } = context;
|
|
20
|
-
if (!customerBizplaceId)
|
|
21
|
-
context.throw(404, t('error.warehouse id not found'));
|
|
22
|
-
let bodyReq = context.request.body;
|
|
23
|
-
if (typeof bodyReq === undefined || !((_a = Object.keys(bodyReq)) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
24
|
-
context.throw(400, t('error.invalid body request format'));
|
|
25
|
-
}
|
|
26
|
-
debug('post:/add-draft-release-order request.body', bodyReq);
|
|
27
|
-
await checkMandatoryKey(context, bodyReq);
|
|
28
|
-
// get customer company's bizplace
|
|
29
|
-
const customerBizplace = await tx.getRepository(biz_base_1.Bizplace).findOne({
|
|
30
|
-
where: { id: customerBizplaceId }
|
|
31
|
-
});
|
|
32
|
-
const orderInventories = bodyReq.orderInventories;
|
|
33
|
-
context.body = {
|
|
34
|
-
result: (await client.mutate({
|
|
35
|
-
mutation: (0, graphql_tag_1.default) `
|
|
36
|
-
mutation upsertDraftReleaseGood(
|
|
37
|
-
$draftReleaseGood: DraftReleaseGoodPatch!
|
|
38
|
-
$orderProducts: [OrderProductPatch!]!
|
|
39
|
-
$files: [Upload!]
|
|
40
|
-
) {
|
|
41
|
-
upsertDraftReleaseGood(
|
|
42
|
-
draftReleaseGood: $draftReleaseGood
|
|
43
|
-
orderProducts: $orderProducts
|
|
44
|
-
files: $files
|
|
45
|
-
) {
|
|
46
|
-
id
|
|
47
|
-
name
|
|
48
|
-
refNo
|
|
49
|
-
refNo2
|
|
50
|
-
refNo3
|
|
51
|
-
status
|
|
52
|
-
truckNo
|
|
53
|
-
ownTransport
|
|
54
|
-
marketplaceOrderStatus
|
|
55
|
-
billingAddress
|
|
56
|
-
deliveryAddress1
|
|
57
|
-
deliveryAddress2
|
|
58
|
-
deliveryAddress3
|
|
59
|
-
deliveryAddress4
|
|
60
|
-
deliveryAddress5
|
|
61
|
-
attentionTo
|
|
62
|
-
attentionCompany
|
|
63
|
-
city
|
|
64
|
-
state
|
|
65
|
-
postalCode
|
|
66
|
-
country
|
|
67
|
-
phone1
|
|
68
|
-
phone2
|
|
69
|
-
email
|
|
70
|
-
type
|
|
71
|
-
exportOption
|
|
72
|
-
releaseDate
|
|
73
|
-
collectionOrderNo
|
|
74
|
-
bizplace {
|
|
75
|
-
name
|
|
76
|
-
}
|
|
77
|
-
orderProducts {
|
|
78
|
-
product {
|
|
79
|
-
sku
|
|
80
|
-
name
|
|
81
|
-
description
|
|
82
|
-
}
|
|
83
|
-
packingType
|
|
84
|
-
packingSize
|
|
85
|
-
releaseQty
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`,
|
|
90
|
-
variables: {
|
|
91
|
-
draftReleaseGood: {
|
|
92
|
-
bizplace: {
|
|
93
|
-
id: customerBizplace.id
|
|
94
|
-
},
|
|
95
|
-
courierOption: bodyReq.courierOption,
|
|
96
|
-
collectionOrderNo: bodyReq.collectionOrderNo,
|
|
97
|
-
exportOption: bodyReq.exportOption,
|
|
98
|
-
ownTransport: bodyReq.ownTransport,
|
|
99
|
-
packingOption: bodyReq.packingOption,
|
|
100
|
-
refNo: bodyReq.refNo,
|
|
101
|
-
refNo2: bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.refNo2,
|
|
102
|
-
refNo3: bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.refNo3,
|
|
103
|
-
releaseDate: bodyReq.releaseDate,
|
|
104
|
-
type: bodyReq.type,
|
|
105
|
-
marketplaceOrderStatus: bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.marketplaceOrderStatus,
|
|
106
|
-
remark: (bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.remark) || null,
|
|
107
|
-
billingAddress: ((_b = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.billTo) === null || _b === void 0 ? void 0 : _b.billingAddress) || null,
|
|
108
|
-
deliveryAddress1: ((_c = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _c === void 0 ? void 0 : _c.deliveryAddress1) || null,
|
|
109
|
-
deliveryAddress2: ((_d = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _d === void 0 ? void 0 : _d.deliveryAddress2) || null,
|
|
110
|
-
deliveryAddress3: ((_e = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _e === void 0 ? void 0 : _e.deliveryAddress3) || null,
|
|
111
|
-
deliveryAddress4: ((_f = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _f === void 0 ? void 0 : _f.deliveryAddress4) || null,
|
|
112
|
-
deliveryAddress5: ((_g = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _g === void 0 ? void 0 : _g.deliveryAddress5) || null,
|
|
113
|
-
attentionTo: ((_h = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _h === void 0 ? void 0 : _h.attentionTo) || null,
|
|
114
|
-
attentionCompany: ((_j = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _j === void 0 ? void 0 : _j.attentionCompany) || null,
|
|
115
|
-
city: ((_k = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _k === void 0 ? void 0 : _k.city) || null,
|
|
116
|
-
state: ((_l = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _l === void 0 ? void 0 : _l.state) || null,
|
|
117
|
-
postalCode: ((_m = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _m === void 0 ? void 0 : _m.postalCode) || null,
|
|
118
|
-
country: ((_o = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _o === void 0 ? void 0 : _o.country) || null,
|
|
119
|
-
phone1: ((_p = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _p === void 0 ? void 0 : _p.phone1) || null,
|
|
120
|
-
phone2: ((_q = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _q === void 0 ? void 0 : _q.phone2) || null,
|
|
121
|
-
email: ((_r = bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.deliverTo) === null || _r === void 0 ? void 0 : _r.email) || null
|
|
122
|
-
},
|
|
123
|
-
orderProducts: orderInventories,
|
|
124
|
-
files: []
|
|
125
|
-
},
|
|
126
|
-
context: Object.assign(Object.assign({}, context), { hasUpload: true, state: Object.assign(Object.assign({}, context.state), { customerBizplace,
|
|
127
|
-
domain, type: 'api' }) })
|
|
128
|
-
})).data
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
async function checkMandatoryKey(context, params) {
|
|
133
|
-
let noparams = ['releaseDate', 'exportOption'].filter(param => !(param in params));
|
|
134
|
-
if ('ownTransport' in params) {
|
|
135
|
-
if (params.ownTransport == true) {
|
|
136
|
-
if (!params.hasOwnProperty('collectionOrderNo')) {
|
|
137
|
-
noparams.push('collectionOrderNo');
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
noparams.push('ownTransport');
|
|
143
|
-
}
|
|
144
|
-
if ('exportOption' in params) {
|
|
145
|
-
if (params.exportOption === true) {
|
|
146
|
-
if (params.exportOption.filter(record => !record.containerNo || !record.containerArrivalDate || !record.containerLeavingDate || !record.shipName).length) {
|
|
147
|
-
noparams.push('exportOption');
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
if ('orderInventories' in params) {
|
|
152
|
-
params.orderInventories.forEach((param, key) => {
|
|
153
|
-
let noSubParams = [];
|
|
154
|
-
if (!(param === null || param === void 0 ? void 0 : param.releaseQty))
|
|
155
|
-
noSubParams.push('releaseQty');
|
|
156
|
-
if (!(param === null || param === void 0 ? void 0 : param.product))
|
|
157
|
-
noSubParams.push('product');
|
|
158
|
-
if (noSubParams === null || noSubParams === void 0 ? void 0 : noSubParams.length)
|
|
159
|
-
context.throw(400, context.t('error.required param x not found', { x: `${noSubParams.join(', ')}` }));
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
noparams.push('orderInventories');
|
|
164
|
-
}
|
|
165
|
-
if (noparams === null || noparams === void 0 ? void 0 : noparams.length) {
|
|
166
|
-
context.throw(400, context.t('error.required param x not found', { x: `${noparams.join(', ')}` }));
|
|
167
|
-
}
|
|
168
|
-
return params;
|
|
169
|
-
}
|
|
170
|
-
exports.checkMandatoryKey = checkMandatoryKey;
|
|
171
|
-
//# sourceMappingURL=add-draft-release-order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-draft-release-order.js","sourceRoot":"","sources":["../../../../../server/routers/api/restful-apis/v1/add-draft-release-order.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAC7B,qCAAsD;AAEtD,6CAAgE;AAChE,uDAAmD;AAGnD,qFAAgF;AAChF,uFAAkF;AAElF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,yEAAyE,CAAC,CAAA;AAEzG,sBAAM,CAAC,IAAI,CACT,oDAAoD,EACpD,wCAAkB,EAClB,0CAAmB,EACnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IACtB,OAAO,MAAM,IAAA,uBAAa,GAAE,CAAC,WAAW,CAAC,KAAK,EAAE,EAAiB,EAAE,EAAE;;QACnE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QACxC,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,MAAM,CAAA;QAC1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAA;QAErB,IAAI,CAAC,kBAAkB;YAAE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAA;QAE9E,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAA;QAClC,IAAI,OAAO,OAAO,KAAK,SAAS,IAAI,CAAC,CAAA,MAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,0CAAE,MAAM,CAAA,EAAE;YACjE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAA;SAC3D;QACD,KAAK,CAAC,4CAA4C,EAAE,OAAO,CAAC,CAAA;QAC5D,MAAM,iBAAiB,CAAC,OAAO,EAAE,OAAO,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": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkMandatoryKey = void 0;
|
|
7
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
const typeorm_1 = require("typeorm");
|
|
9
|
-
const api_1 = require("@things-factory/api");
|
|
10
|
-
const biz_base_1 = require("@things-factory/biz-base");
|
|
11
|
-
const product_base_1 = require("@things-factory/product-base");
|
|
12
|
-
const business_middleware_1 = require("../../../../middlewares/business-middleware");
|
|
13
|
-
const warehouse_middleware_1 = require("../../../../middlewares/warehouse-middleware");
|
|
14
|
-
const debug = require('debug')('things-factory:operato-hub:restful-api:v1:add-inbound-order');
|
|
15
|
-
api_1.restfulApiRouter.post('/v1/warehouse/:warehouseId/add-inbound-order', business_middleware_1.businessMiddleware, warehouse_middleware_1.warehouseMiddleware, async (context, next) => {
|
|
16
|
-
var _a;
|
|
17
|
-
const { client, domain } = context.state;
|
|
18
|
-
const { warehouseId } = context.params;
|
|
19
|
-
const { t } = context;
|
|
20
|
-
const attachments = undefined;
|
|
21
|
-
let bodyReq = context.request.body;
|
|
22
|
-
if (!warehouseId)
|
|
23
|
-
context.throw(404, t('error.warehouse id not found'));
|
|
24
|
-
if (typeof bodyReq === undefined || !((_a = Object.keys(bodyReq)) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
25
|
-
context.throw(400, t('error.invalid body request format'));
|
|
26
|
-
}
|
|
27
|
-
await checkMandatoryKey(context, bodyReq);
|
|
28
|
-
debug('post:/add-inbound-order request.body', bodyReq);
|
|
29
|
-
// get customer company's bizplace
|
|
30
|
-
const custCompanyBizplace = await (0, biz_base_1.getCompanyBizplace)(null, null, warehouseId);
|
|
31
|
-
const customerBizplace = await (0, typeorm_1.getRepository)(biz_base_1.Bizplace).findOne({
|
|
32
|
-
where: { id: warehouseId }
|
|
33
|
-
});
|
|
34
|
-
//#1 to get all product list
|
|
35
|
-
const productDetails = await (0, typeorm_1.getRepository)(product_base_1.ProductDetail).find({
|
|
36
|
-
where: {
|
|
37
|
-
domain: custCompanyBizplace.domain,
|
|
38
|
-
refCode: (0, typeorm_1.In)(bodyReq.orderProducts.map(orderProduct => orderProduct.product.sku))
|
|
39
|
-
},
|
|
40
|
-
relations: ['product']
|
|
41
|
-
});
|
|
42
|
-
//#2 assign product id found to order product
|
|
43
|
-
bodyReq.orderProducts = bodyReq.orderProducts.map(orderProduct => {
|
|
44
|
-
productDetails.forEach(productDetail => {
|
|
45
|
-
const product = productDetail.product;
|
|
46
|
-
const packingType = productDetail.packingType;
|
|
47
|
-
const packingSize = productDetail.packingSize;
|
|
48
|
-
if (orderProduct.product.sku === productDetail.refCode) {
|
|
49
|
-
orderProduct.product.id = product.id;
|
|
50
|
-
if (packingType) {
|
|
51
|
-
orderProduct.packingType = packingType;
|
|
52
|
-
orderProduct.packingSize = packingSize;
|
|
53
|
-
orderProduct.uom = productDetail.uom;
|
|
54
|
-
orderProduct.uomValue = productDetail.uomValue;
|
|
55
|
-
orderProduct.totalUomValue = `${(productDetail.uomValue * orderProduct.packQty).toFixed(2)} ${productDetail.uom}`;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
productDetail = productDetails.find(productDetail => productDetail.isDefault);
|
|
59
|
-
orderProduct.packingType = productDetail.packingType;
|
|
60
|
-
orderProduct.packingSize = productDetail.packingSize;
|
|
61
|
-
orderProduct.uom = productDetail.uom;
|
|
62
|
-
orderProduct.uomValue = productDetail.uomValue;
|
|
63
|
-
orderProduct.totalUomValue = `${(productDetail.uomValue * orderProduct.packQty).toFixed(2)} ${productDetail.uom}`;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return orderProduct;
|
|
68
|
-
});
|
|
69
|
-
//#3 check if product is not found
|
|
70
|
-
bodyReq.orderProducts.forEach(orderProduct => {
|
|
71
|
-
var _a;
|
|
72
|
-
if (!((_a = orderProduct.product) === null || _a === void 0 ? void 0 : _a.id))
|
|
73
|
-
context.throw(404, t(`error.sku code ${orderProduct.product.sku} is not exist`));
|
|
74
|
-
});
|
|
75
|
-
//#4 include supplier id if there's any
|
|
76
|
-
if (bodyReq === null || bodyReq === void 0 ? void 0 : bodyReq.supplier) {
|
|
77
|
-
const supplierInfo = bodyReq.supplier;
|
|
78
|
-
const foundSupplier = await (0, typeorm_1.getRepository)(biz_base_1.ContactPoint).findOne({
|
|
79
|
-
where: {
|
|
80
|
-
domain,
|
|
81
|
-
bizplace: warehouseId,
|
|
82
|
-
name: supplierInfo.name,
|
|
83
|
-
companyName: supplierInfo.companyName,
|
|
84
|
-
email: supplierInfo.email,
|
|
85
|
-
accountNo: supplierInfo.accountNo,
|
|
86
|
-
type: 'SUPPLIER'
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
if (foundSupplier)
|
|
90
|
-
bodyReq.supplier = foundSupplier.id;
|
|
91
|
-
else
|
|
92
|
-
context.throw(404, t('error.supplier not found'));
|
|
93
|
-
}
|
|
94
|
-
context.body = {
|
|
95
|
-
result: (await client.mutate({
|
|
96
|
-
mutation: (0, graphql_tag_1.default) `
|
|
97
|
-
mutation addArrivalNotice($arrivalNotice: NewArrivalNotice!, $attachments: Upload) {
|
|
98
|
-
addArrivalNotice(arrivalNotice: $arrivalNotice, file: $attachments) {
|
|
99
|
-
name
|
|
100
|
-
refNo
|
|
101
|
-
etaDate
|
|
102
|
-
containerNo
|
|
103
|
-
ownTransport
|
|
104
|
-
crossDocking
|
|
105
|
-
releaseGood {
|
|
106
|
-
name
|
|
107
|
-
}
|
|
108
|
-
etaDate
|
|
109
|
-
looseItem
|
|
110
|
-
deliveryOrderNo
|
|
111
|
-
status
|
|
112
|
-
truckNo
|
|
113
|
-
refNo
|
|
114
|
-
importCargo
|
|
115
|
-
orderProducts {
|
|
116
|
-
batchId
|
|
117
|
-
product {
|
|
118
|
-
sku
|
|
119
|
-
name
|
|
120
|
-
description
|
|
121
|
-
packingType
|
|
122
|
-
type
|
|
123
|
-
}
|
|
124
|
-
packingType
|
|
125
|
-
uom
|
|
126
|
-
uomValue
|
|
127
|
-
packQty
|
|
128
|
-
totalUomValue
|
|
129
|
-
palletQty
|
|
130
|
-
}
|
|
131
|
-
orderVass {
|
|
132
|
-
vas {
|
|
133
|
-
name
|
|
134
|
-
operationGuide
|
|
135
|
-
operationGuideType
|
|
136
|
-
}
|
|
137
|
-
set
|
|
138
|
-
targetType
|
|
139
|
-
targetBatchId
|
|
140
|
-
targetProduct {
|
|
141
|
-
name
|
|
142
|
-
description
|
|
143
|
-
}
|
|
144
|
-
packingType
|
|
145
|
-
qty
|
|
146
|
-
uomValue
|
|
147
|
-
otherTarget
|
|
148
|
-
description
|
|
149
|
-
remark
|
|
150
|
-
operationGuide
|
|
151
|
-
}
|
|
152
|
-
supplier {
|
|
153
|
-
companyName
|
|
154
|
-
name
|
|
155
|
-
phone
|
|
156
|
-
email
|
|
157
|
-
address
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
`,
|
|
162
|
-
variables: { arrivalNotice: Object.assign(Object.assign({}, bodyReq), { warehouseId }), attachments },
|
|
163
|
-
context: Object.assign(Object.assign({}, context), { hasUpload: true, state: Object.assign(Object.assign({}, context.state), { bizplace: customerBizplace, domain, type: 'api' }) })
|
|
164
|
-
})).data
|
|
165
|
-
};
|
|
166
|
-
});
|
|
167
|
-
function checkMandatoryKey(context, params) {
|
|
168
|
-
let noparams = [];
|
|
169
|
-
if ('container' in params) {
|
|
170
|
-
if (params.container === true) {
|
|
171
|
-
if (!params.hasOwnProperty('containerNo') || !params.hasOwnProperty('containerSize')) {
|
|
172
|
-
noparams.push('containerInfo');
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
if ('orderProducts' in params) {
|
|
177
|
-
params.orderProducts.forEach((param, key) => {
|
|
178
|
-
let noSubParams = [];
|
|
179
|
-
if (!param.batchId)
|
|
180
|
-
noSubParams.push('batchId');
|
|
181
|
-
if (!param.packQty)
|
|
182
|
-
noSubParams.push('packQty');
|
|
183
|
-
if (!param.product.sku)
|
|
184
|
-
noSubParams.push('sku');
|
|
185
|
-
if (noSubParams === null || noSubParams === void 0 ? void 0 : noSubParams.length)
|
|
186
|
-
context.throw(400, context.t('error.required param x not found', { x: `${noSubParams.join(', ')}` }));
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
noparams.push('orderProducts');
|
|
191
|
-
}
|
|
192
|
-
if ('etaDate' in params) {
|
|
193
|
-
const etaDate = new Date(params.etaDate);
|
|
194
|
-
if (isNaN(etaDate.getDate()))
|
|
195
|
-
context.throw(400, context.t('error.eta date is invalid'));
|
|
196
|
-
}
|
|
197
|
-
if ('supplier' in params) {
|
|
198
|
-
const supplierInfo = params.supplier;
|
|
199
|
-
if (!(supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.name))
|
|
200
|
-
context.throw(400, context.t('error.required param x not found', { x: 'supplierInfo.name' }));
|
|
201
|
-
if (!(supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.companyName))
|
|
202
|
-
context.throw(400, context.t('error.required param x not found', { x: 'supplierInfo.companyName' }));
|
|
203
|
-
if (!(supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.email))
|
|
204
|
-
context.throw(400, context.t('error.required param x not found', { x: 'supplierInfo.email' }));
|
|
205
|
-
if (!(supplierInfo === null || supplierInfo === void 0 ? void 0 : supplierInfo.accountNo))
|
|
206
|
-
context.throw(400, context.t('error.required param x not found', { x: 'supplierInfo.accountNo' }));
|
|
207
|
-
}
|
|
208
|
-
if (noparams.length > 0) {
|
|
209
|
-
context.throw(400, context.t('error.required param x not found', { x: `${noparams.join(', ')}` }));
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
exports.checkMandatoryKey = checkMandatoryKey;
|
|
213
|
-
//# sourceMappingURL=add-inbound-order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-inbound-order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