This commit is contained in:
2026-08-07 15:53:58 +08:00
parent 9ef66795ab
commit 0faa84bd10
4 changed files with 97 additions and 17 deletions
+11
View File
@@ -11,6 +11,10 @@ function measurementPath(inboundId: string) {
return `/platform/v1/first-leg/inbounds/${encodeURIComponent(inboundId)}/measurement`
}
function segment(value: string) {
return encodeURIComponent(value)
}
export async function getInboundMeasurement(customerId: string, inboundId: string) {
const response = await http.get<ApiEnvelope<InboundMeasurementDetail>, ApiEnvelope<InboundMeasurementDetail>>(
measurementPath(inboundId),
@@ -44,3 +48,10 @@ export async function submitInboundMeasurement(
)
return unwrapApiResponse(response)
}
export function downloadInboundMeasurementImage(customerId: string, inboundId: string, fileId: string) {
return http.get<Blob, Blob>(
`/platform/v1/files/measurements/${segment(customerId)}/${segment(inboundId)}/${segment(fileId)}`,
{ responseType: 'blob' },
)
}