ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Namespace ambeed

    Functions - Typeguards

    isAmbeedProductListResponse

    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.

    assertIsAmbeedProductListResponse

    Type assertion to ensure the given data is a valid AmbeedProductListResponse. Throws an error if the data does not match the expected structure.

    isAmbeedProductListResponseValue

    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.

    isAmbeedProductListResponseResultItem

    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.

    isAmbeedProductListResponsePriceList

    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.

    isAmbeedSearchResponseProduct

    Type guard to validate if data matches the Ambeed search response product structure. Uses the same schema as the product list response for validation.