This commit is contained in:
2026-09-09 17:42:19 +08:00
parent a47a7e9767
commit 2fd9c5fcc7
8 changed files with 39 additions and 7 deletions
@@ -19,6 +19,7 @@ vi.mock('@/shared/api/http', () => ({
const payload: SavePlatformWarehouseRequest = {
warehouseCode: 'CN-YW-01',
internalCode: null,
warehouseName: '义乌收货仓',
warehouseType: 'DOMESTIC',
countryCode: 'CN',
@@ -63,6 +64,7 @@ describe('platform warehouse API', () => {
id: '1',
tenantId: 0,
warehouseCode: 'LAX9',
internalCode: '154',
warehouseName: 'LAX9',
warehouseType: 'FBA',
countryCode: 'US',
@@ -201,6 +203,7 @@ describe('platform warehouse API', () => {
await expect(createFbaWarehouse({
warehouseCode: 'LAX9',
internalCode: '154',
stateProvince: 'CA',
city: 'Long Beach',
postalCode: '90802',
@@ -221,6 +224,7 @@ describe('platform warehouse API', () => {
expect(http.post).toHaveBeenNthCalledWith(1, '/platform/v1/warehouse-admin', {
warehouseCode: 'LAX9',
internalCode: '154',
warehouseName: 'LAX9',
warehouseType: 'FBA',
countryCode: 'US',
@@ -8,6 +8,7 @@ export interface PlatformWarehouseResource {
id: number | string
tenantId: number | string
warehouseCode: string
internalCode: string | null
warehouseName: string
warehouseType: WarehouseType
countryCode: string
@@ -105,6 +106,7 @@ export interface PlatformWarehouseCapabilityRequest {
export interface SavePlatformWarehouseRequest {
warehouseCode: string
internalCode: string | null
warehouseName: string
warehouseType: WarehouseType
countryCode: string
@@ -120,6 +122,7 @@ export interface SavePlatformWarehouseRequest {
export interface CreateFbaWarehouseRequest {
warehouseCode: string
internalCode: string | null
stateProvince: string
city: string
postalCode: string
@@ -252,6 +255,7 @@ export async function createPlatformWarehouse(payload: SavePlatformWarehouseRequ
export async function createFbaWarehouse(payload: CreateFbaWarehouseRequest) {
return createPlatformWarehouse({
warehouseCode: payload.warehouseCode,
internalCode: payload.internalCode,
warehouseName: payload.warehouseCode,
warehouseType: 'FBA',
countryCode: 'US',