feat(client): show customs clearance results
This commit is contained in:
@@ -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>({
|
||||
|
||||
Reference in New Issue
Block a user