feat: expose phase three client progress
This commit is contained in:
@@ -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')
|
||||
}
|
||||
Reference in New Issue
Block a user