frontend / api/inventory/listFetcher / getInventoryPage
Function: getInventoryPage()
getInventoryPage(
params):Promise<InventoryListResponse>
Defined in: src/api/inventory/listFetcher.ts:70
Fetch a page of inventory items from the backend. Handles pagination, search, filtering, and sorting. Works with various response envelope formats transparently.
Parameters
params
Query params: page, pageSize, q (search), supplierId, sort
Returns
Promise<InventoryListResponse>
Paginated response with items and total count
Example
const response = await getInventoryPage({
page: 0,
pageSize: 20,
q: 'bolt',
supplierId: undefined,
sort: 'name,asc'
});