feat(admin): validate and cancel co-load groups
This commit is contained in:
@@ -81,10 +81,10 @@ export async function createPlatformCoLoadGroup(orderIds: string[]) {
|
||||
return normalizeGroup(unwrapApiResponse(response))
|
||||
}
|
||||
|
||||
export async function cancelPlatformCoLoadGroup(groupId: string, expectedVersion: number, reason?: string | null) {
|
||||
export async function cancelPlatformCoLoadGroup(inboundCode: string, reason?: string | null) {
|
||||
const response = await http.post<ApiEnvelope<RawCoLoadGroup>, ApiEnvelope<RawCoLoadGroup>>(
|
||||
`${basePath}/${encodeURIComponent(groupId)}/cancel`,
|
||||
{ expectedVersion, reason: reason?.trim() || null },
|
||||
`${basePath}/by-inbound-code/${encodeURIComponent(inboundCode)}/cancel`,
|
||||
{ reason: reason?.trim() || null },
|
||||
{ headers: { 'Idempotency-Key': operationId('admin-coload-cancel') } },
|
||||
)
|
||||
return normalizeGroup(unwrapApiResponse(response))
|
||||
|
||||
Reference in New Issue
Block a user