ChemPal Documentation - v1.6.0
    Preparing search index...

    Module utils/typeGuards/mysimplestore

    Functions - Typeguards

    isValidSearchResponse

    Type guard validating that a value matches the MySimpleStore search/list response envelope: an object with a products array whose items each carry the minimal id/slug/name/relative_url fields the supplier reads.

    isProductDetail

    Type guard validating that a value matches the MySimpleStore product-detail response: an object with id/slug/name and an optional variants array. The per-variant shape is guarded at the point of use so a stray entry can't reject the whole response.