feat: expose phase three client progress

This commit is contained in:
2026-08-10 12:05:43 +08:00
parent c1f2411c6c
commit 79435fe474
7 changed files with 111 additions and 7 deletions
+31
View File
@@ -0,0 +1,31 @@
import { ApiError, apiRequest } from '@/api/http'
export interface MerchantCustomsReceipt {
id: number | string
receiptType: 'RECEIVED' | 'DECLARED' | 'REJECTED' | 'INSPECTION' | 'RELEASED' | 'OTHER' | string
receiptVersion: number | null
fileName: string | null
uploadedAt: string | null
}
export interface MerchantCustomsCaseDetail {
customsCase: {
id: number | string
customsNo: string | null
orderId: number | string
status: string | null
updatedAt: string | null
}
receipts: MerchantCustomsReceipt[]
}
export function getMerchantCustomsByOrder(orderId: number | string) {
return apiRequest<MerchantCustomsCaseDetail>({
method: 'GET',
url: `/merchant/v1/customs/orders/${orderId}`,
})
}
export function isMerchantCustomsUnavailable(error: unknown) {
return error instanceof ApiError && (error.status === 404 || error.code === 'A0404')
}