Type assertion to ensure the given data is a valid AmbeedProductListResponse. Throws an error if the data does not match the expected structure.
Type guard to validate if data matches the Ambeed product list response value structure. Checks for pagination fields (total, pagenum, pageindex, pagesize) and result/menu data.
Type guard to validate if data matches the Ambeed product result item structure. Checks for required product fields including product ID, price list, name, molecular formula, URL, English name, and CAS number.
Type guard to validate if data matches the Ambeed price list item structure. Checks for required pricing fields including amount, USD price, discount, size, VIP price, and rate.
Type guard to validate if data matches the Ambeed search response product structure. Uses the same schema as the product list response for validation.
Type guard to validate if data matches the Ambeed product price API response structure.
Checks the AmbeedResponseBase fields plus a value.proInfo object, which carries the
shared product info every priced variant in the response is keyed against.
Type assertion to ensure the given data is a valid AmbeedProductPriceResponse. Throws an error if the data does not match the expected structure.
Type guard to validate if data matches the Ambeed "get search product and recommended
products by CAS" API response structure. Checks the AmbeedResponseBase fields plus a
value object containing the CAS-matched search_pro_dict and the r_pro_list array
of recommendations.
Type assertion to ensure the given data is a valid AmbeedGetSearchProductAndRecommendedProductsByCASResponse. Throws an error if the data does not match the expected structure.
Type guard to validate the webapi/v1/product_stock response shape — the
value array of per-size stock rows (each with a size, plus per-warehouse
quantities and an optional aggregate has_stock flag). An empty value
array is valid (no stock data available).
Type assertion that the given data is a valid AmbeedProductStockResponse. Throws if the data does not match the expected structure.
Type guard to validate the webapi/v1/getPmsSdsByAms response shape — the
value.sds_list map of per-product (AM id) SDS documents keyed by SDS type.
Type assertion that the given data is a valid AmbeedGetPmsSdsByAmsResponse. Throws if the data does not match the expected structure.
Type guard to validate if a response matches the Ambeed product list API response structure. Checks for the presence and correct types of source, code, lang, value, and time fields.