This commit is contained in:
2026-09-01 20:07:40 +08:00
parent 4ad8537113
commit 29b937989a
16 changed files with 22 additions and 132 deletions
@@ -356,13 +356,6 @@ export async function getSmartLoadingPlanByBooking(bookingId: string | number) {
return normalizeSmartLoadingPlan(unwrapApiResponse(response))
}
export async function createSmartLoadingPlan(bookingId: string | number, remark?: string) {
const response = await http.post<ApiEnvelope<Record<string, unknown>>, ApiEnvelope<Record<string, unknown>>>(
`${smartLoadingBasePath}/plans`, { bookingId: String(bookingId), remark: remark || undefined },
)
return normalizeSmartLoadingPlan(unwrapApiResponse(response))
}
export async function assignSmartLoadingItem(planId: string | number, request: Omit<AssignSmartLoadingItemRequest, 'operationId'>) {
const response = await http.post<ApiEnvelope<Record<string, unknown>>, ApiEnvelope<Record<string, unknown>>>(
`${smartLoadingBasePath}/plans/${planId}/assignments`,
@@ -403,14 +396,6 @@ export async function deleteSmartLoadingItem(
return normalizeSmartLoadingPlan(unwrapApiResponse(response))
}
export async function pushSmartLoadingPreload(planId: string | number, expectedVersion: number) {
const response = await http.post<ApiEnvelope<Record<string, unknown>>, ApiEnvelope<Record<string, unknown>>>(
`${smartLoadingBasePath}/plans/${planId}/push-preload`, { expectedVersion },
{ headers: { 'Idempotency-Key': idempotencyKey('smart-loading-push', planId) } },
)
return normalizeSmartLoadingPlan(unwrapApiResponse(response))
}
function writeOptions(operation: string, inboundId: string | number, tenantId: string | number) {
return { params: query(tenantId), headers: { 'Idempotency-Key': idempotencyKey(operation, inboundId) } }
}