feat: confirm container inbound plans

This commit is contained in:
2026-09-09 00:44:07 +08:00
parent 695db084e2
commit cf8727a809
5 changed files with 243 additions and 27 deletions
@@ -210,6 +210,8 @@ export interface ContainerPlanProgressDetailDto {
export interface ConvertContainerInboundPlanPayload {
sourceContainerBookingId: string
snapshotVersion: number
snapshotHash: string
}
export type ContainerInboundPlanPreviewReadiness = 'READY' | 'PLANNED' | 'BLOCKED'
@@ -460,9 +462,10 @@ export async function getContainerInboundPlanPreview(sourceContainerBookingId: s
return unwrapApiResponse(response)
}
export async function convertLastMileContainerToInboundPlans(payload: ConvertContainerInboundPlanPayload) {
export async function convertLastMileContainerToInboundPlans(payload: ConvertContainerInboundPlanPayload, idempotencyKey: string) {
const response = await overseasHttp.post<ApiEnvelope<InboundPlanDetailDto[]>, ApiEnvelope<InboundPlanDetailDto[]>>(
'/platform/v1/last-leg/inbound-plans/convert-container', payload,
{ headers: { 'Idempotency-Key': idempotencyKey } },
)
return unwrapApiResponse(response)
}