// NOTE: We do *not* use the page count indicated by the API, but instead calculate it ourself from the product count. This is because the API-specified page count will cap out at the equivalent of 10k items, even when more pages than that are actually available.
assert(response.body.productList!=null);// Missing from stale queued requests?
assert(response.body.productList.length>0);
assert(response.body.code===200);
assert(response.body.result?.dataList!=null);// Missing from stale queued requests?
assert(response.body.result.dataList.length>0);
for(letitemofresponse.body.productList){
for(letitemofresponse.body.result.dataList){
storeItem({
// NOTE: item.productId seems like the database ID on the website, but item.productCode is the actual LCSC part number used internally for inventory management, so we use that for identification instead