@rapyuta-robotics/api-clients
Advanced tools
Comparing version
@@ -207,2 +207,9 @@ import { Point, Polygon } from 'geojson'; | ||
} | ||
interface WmsItemInventory { | ||
item: string; | ||
qty: number; | ||
qtyReserved: number; | ||
qtyDamaged: number; | ||
qtyExpired: number; | ||
} | ||
@@ -633,4 +640,5 @@ type JSONValue = undefined | null | string | number | boolean | { | ||
WMS_CODE_OWNER: (codeOwnerOverride: Partial<CodeOwner>) => CodeOwner; | ||
WMS_ITEM_INVENTORY: (itemInventoryOverride: Partial<WmsItemInventory>) => WmsItemInventory; | ||
}; | ||
export { APISpot, Agent, AgentTask, AgentTaskFragmentStatus, AgentTaskFragmentType, AgentTaskStatus, AgentTaskType, AssignmentStatus, BatchStationStatus, BatchStatus, CodeOwner, ContainerLocation, ContainerState, Edge, ErrorRecord, ErrorType, Factories, Item, Layer, Location, LocationType, Map, Node, ORDER_BATCH_PRIORITY, Order, OrderStatus, Printer, RECHECK_STATE, RecheckPayload, Region, RegionOrientations, RegionTypes, Robot, RobotDescriptor, RobotReservationRes, Site, SiteStatus, Spot, SpotState, StationAssignmentType, UserDetails, WmsOrderBatch, WmsOrderLineLean, WmsOrderStatus, WmsShippingOrder, Work, WorkflowAllocation }; | ||
export { APISpot, Agent, AgentTask, AgentTaskFragmentStatus, AgentTaskFragmentType, AgentTaskStatus, AgentTaskType, AssignmentStatus, BatchStationStatus, BatchStatus, CodeOwner, ContainerLocation, ContainerState, Edge, ErrorRecord, ErrorType, Factories, Item, Layer, Location, LocationType, Map, Node, ORDER_BATCH_PRIORITY, Order, OrderStatus, Printer, RECHECK_STATE, RecheckPayload, Region, RegionOrientations, RegionTypes, Robot, RobotDescriptor, RobotReservationRes, Site, SiteStatus, Spot, SpotState, StationAssignmentType, UserDetails, WmsItemInventory, WmsOrderBatch, WmsOrderLineLean, WmsOrderStatus, WmsShippingOrder, Work, WorkflowAllocation }; |
@@ -765,2 +765,14 @@ "use strict"; | ||
// src/factories/wms.itemInventory.factory.ts | ||
var import_merge28 = __toESM(require("lodash/merge")); | ||
var itemInventory = { | ||
item: "DEMOB001", | ||
qty: 1e3, | ||
qtyReserved: 0, | ||
qtyDamaged: 0, | ||
qtyExpired: 0 | ||
}; | ||
var wmsItemInventoryFactory = (itemInventoryOverride) => (0, import_merge28.default)({}, itemInventory, itemInventoryOverride); | ||
var wms_itemInventory_factory_default = wmsItemInventoryFactory; | ||
// src/factories/index.ts | ||
@@ -794,3 +806,4 @@ var Factories = { | ||
WMS_BATCH_STATION_STATUS: wms_batchStationStatus_fatory_default, | ||
WMS_CODE_OWNER: wms_codeOwner_factory_default | ||
WMS_CODE_OWNER: wms_codeOwner_factory_default, | ||
WMS_ITEM_INVENTORY: wms_itemInventory_factory_default | ||
}; | ||
@@ -797,0 +810,0 @@ var factories_default = Factories; |
@@ -27,2 +27,3 @@ import { SetupServerApi } from 'msw/node'; | ||
ITEM = "core/item", | ||
INVENTORY = "core/inventory", | ||
AUTH = "auth", | ||
@@ -64,2 +65,3 @@ PERIPHERAL = "core/peripheral", | ||
ITEM: string; | ||
INVENTORY: string; | ||
LOGIN: string; | ||
@@ -66,0 +68,0 @@ PERIPHERAL: string; |
{ | ||
"name": "@rapyuta-robotics/api-clients", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "Mock API server", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -28,2 +28,3 @@ import errorRecordsFactory from './errorRecords.factory'; | ||
import WmsCodeOwnerFactory from './wms.codeOwner.factory'; | ||
import wmsItemInventoryFactory from './wms.itemInventory.factory'; | ||
@@ -62,4 +63,5 @@ /** | ||
WMS_CODE_OWNER: WmsCodeOwnerFactory, | ||
WMS_ITEM_INVENTORY: wmsItemInventoryFactory, | ||
}; | ||
export default Factories; |
@@ -220,1 +220,9 @@ export enum WmsOrderStatus { | ||
} | ||
export interface WmsItemInventory { | ||
item: string; | ||
qty: number; | ||
qtyReserved: number; | ||
qtyDamaged: number; | ||
qtyExpired: number; | ||
} |
@@ -29,2 +29,3 @@ import { rest } from 'msw'; | ||
ITEM = 'core/item', | ||
INVENTORY = 'core/inventory', | ||
AUTH = 'auth', | ||
@@ -68,2 +69,3 @@ PERIPHERAL = 'core/peripheral', | ||
ITEM: `${MockServices.WMS}/${Routes.ITEM}`, | ||
INVENTORY: `${MockServices.WMS}/${Routes.INVENTORY}`, | ||
LOGIN: `${MockServices.WMS}/${Routes.AUTH}`, | ||
@@ -279,2 +281,6 @@ PERIPHERAL: `${MockServices.WMS}/${Routes.PERIPHERAL}`, | ||
rest.get(`${MockRoutes.INVENTORY}/by_item/`, async (req, res, ctx) => { | ||
return await res(ctx.status(200), ctx.json(getPaginatedResponse([Factories.WMS_ITEM_INVENTORY({})]))); | ||
}), | ||
rest.get(`${MockRoutes.ITEM}/code_owner`, async (req, res, ctx) => { | ||
@@ -281,0 +287,0 @@ return await res(ctx.status(200), ctx.json(getPaginatedResponse([Factories.WMS_CODE_OWNER({})]))); |
Sorry, the diff of this file is too big to display
332260
0.77%51
2%10237
0.64%