test(acceptance): align current gateway contracts

This commit is contained in:
2026-09-02 13:26:24 +08:00
parent f7f8ff53c0
commit 68340eb616
8 changed files with 105 additions and 100 deletions
@@ -4,7 +4,7 @@ const CONTAINERS = '/api/platform/v1/containers'
const FIRST_LEG = '/api/platform/v1/first-leg'
export const DOCUMENT_TYPES = Object.freeze([
'DESTINATION_CLEARANCE', 'CUSTOMS_DECLARATION', 'DELIVERY_ORDER', 'PICKUP_ORDER',
'DESTINATION_CLEARANCE', 'DELIVERY_ORDER', 'PICKUP_ORDER',
])
function id(value) { return value == null ? '' : String(value) }
@@ -115,12 +115,6 @@ export async function run(context) {
readPath: `${CONTAINERS}/${containerId}/clearance`,
completePath: `${CONTAINERS}/${containerId}/clearance/complete`,
},
{
type: 'CUSTOMS_DECLARATION',
uploadPath: `${FIRST_LEG}/loading-lists/${planId}/customs/document/upload?warehouseId=${encodeURIComponent(warehouseId)}`,
readPath: `${FIRST_LEG}/loading-lists/${planId}/customs?warehouseId=${encodeURIComponent(warehouseId)}`,
completePath: `${FIRST_LEG}/loading-lists/${planId}/customs/complete?warehouseId=${encodeURIComponent(warehouseId)}`,
},
...['DELIVERY_ORDER', 'PICKUP_ORDER'].map((type) => ({
type,
uploadPath: `${CONTAINERS}/${containerId}/documents/${type}/upload`,