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({ method: 'GET', url: `/merchant/v1/customs/orders/${orderId}`, }) } export function isMerchantCustomsUnavailable(error: unknown) { return error instanceof ApiError && (error.status === 404 || error.code === 'A0404') }