feat(client): show customs clearance results

This commit is contained in:
2026-09-27 20:41:38 +08:00
parent a2934aad9d
commit 8c8fdbc2ab
2 changed files with 56 additions and 0 deletions
+25
View File
@@ -58,6 +58,24 @@ export interface MerchantCustomsContainer {
completedAt?: string | null
}
export type MerchantClearanceResultType = 'INSPECTION' | 'SUPPLEMENT_REQUIRED' | 'RELEASED' | 'DETAINED' | 'OTHER'
export type MerchantClearanceResultStatus = 'OPEN' | 'RESOLVED' | 'CANCELLED'
export interface MerchantClearanceResult {
id: string
declarationBatchId: string
customsContainerId: string
resultType: MerchantClearanceResultType
resultStatus: MerchantClearanceResultStatus
customsEntryNo: string | null
occurredAt: string
resolution: string | null
evidenceFileId: string | null
recordedByName: string
recordedAt: string
previousResultId: string | null
}
export interface ApiErrorMeta {
code: string
requestId: string | null
@@ -105,6 +123,13 @@ export function getMerchantCustomsForOrder(orderId: string) {
})
}
export function getMerchantClearanceResults(orderId: string) {
return apiRequest<MerchantClearanceResult[]>({
method: 'GET',
url: `/merchant/v1/customs/orders/${encodedId(orderId)}/clearance-results`,
})
}
export function uploadMerchantCustomsDocument(planId: string, inboundIds: string[], file: File) {
validateMerchantCustomsFile(file)
return apiRequest<MerchantCustomsDocument>({