rebuildInventoryStock
Since pyck v0.27.0
Recomputes the acting tenant’s stock rows from its movement history. Requires ROLE_ADMIN on the acting tenant. Event emission is suppressed for the rebuild: only a system caller may opt back in with X-Pyck-Feature: syncupdates, and a tenant caller sending that header is refused with “system caller required”. A rebuild whose replay of an executed repository movement would place a repository under itself or one of its descendants, because a parent was changed outside repository movements since, is refused with “unable to place a repository under itself or one of its descendants” and leaves the stock rows unchanged.
Served by: inventory
Returns
Section titled “Returns”Example
Section titled “Example”Recomputes the acting tenant’s stock rows from its movement history. Requires the admin role on the tenant.
mutation RebuildInventoryStock { rebuildInventoryStock { success }}