ChemPare Documentation - v0.0.0
    Preparing search index...
    • Validates that a response matches the ATGResponse interface structure

      Parameters

      • obj: unknown

        Response object to validate

      Returns obj is ATGResponse

      Type predicate indicating if object is a valid ATGResponse

      const response = await this.httpGetJson({
      path: `/api/rest/cb/product/product-quick-view/${productId}`
      });
      if (isATGResponse(response)) {
      // Process valid ATG response
      console.log(response.response.response.products[0]);
      }