feat(phase4): automate admin integration acceptance
This commit is contained in:
@@ -37,6 +37,15 @@ export interface CreateRelabelPayload {
|
||||
items: CreateRelabelItemPayload[]
|
||||
}
|
||||
|
||||
export interface RelabelWarehouseOptionDto {
|
||||
id: string
|
||||
customerId: string
|
||||
warehouseCode: string
|
||||
warehouseName: string
|
||||
warehouseType: string
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface RelabelSummaryDto {
|
||||
id: string
|
||||
relabelNo: string
|
||||
@@ -96,9 +105,17 @@ export async function getRelabelOrder(relabelNo: string) {
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function createRelabelOrder(payload: CreateRelabelPayload) {
|
||||
export async function listRelabelWarehouseOptions(customerId: string) {
|
||||
const response = await overseasHttp.get<ApiEnvelope<OverseasPageResult<RelabelWarehouseOptionDto>>, ApiEnvelope<OverseasPageResult<RelabelWarehouseOptionDto>>>(
|
||||
'/platform/v1/warehouse-admin',
|
||||
{ params: { customerId, page: 1, size: 200, status: 'ACTIVE' } },
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
export async function createRelabelOrder(customerId: string, payload: CreateRelabelPayload) {
|
||||
const response = await overseasHttp.post<ApiEnvelope<RelabelDetailDto>, ApiEnvelope<RelabelDetailDto>>(
|
||||
'/platform/v1/last-leg/relabel-applications', payload,
|
||||
'/platform/v1/last-leg/relabel-applications', payload, { params: { customerId } },
|
||||
)
|
||||
return unwrapApiResponse(response)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user