Vue Storefront is now Alokai! Learn More
@vue-storefront/magento-types

@vue-storefront/magento-types

1.2.0

Minor Changes

  • 8b2a0c35: ADDED categories endpoint definition.

1.1.0

Minor Changes

  • 7ce4f9ed: CHANGED Enhanced default GQL queries
    • CategorySearchQuery new fields:
      • url_key - The url key assigned to the category.
      • children - Child categories tree.
        • include_in_menu
        • is_anchor
        • level
        • name
        • position
        • product_count
        • uid
        • url_key
        • url_path
        • url_suffix
    // get category `children` categories
    
    const category = sdk.commerce.categorySearch();
    const children = category.children;
    
    • CategoryListQuery new fields:
      • children.url_key - The url key assigned to the category.
    // get `url_key` of category children
    
    const categoryList = sdk.commerce.categoryList();
    
    for (let categoryChildren of categoryList.children) {
      const url_key = categoryChildren.url_key;
    }
    
    // get ConfigurableProduct `variants` products
    
    const products = sdk.commerce.products();
    
    for (let product of products) {
      if (product.__typename === "ConfigurableProduct") {
        const variants = products.variants;
      }
    }
    

Patch Changes

1.0.2

Patch Changes

  • 045784a6: Fixes
    • Fixed getAvailablePaymentMethods type definition. Parameter cartId is now properly typed as string.

1.0.1

Patch Changes

  • #1456 e3f329ec Thanks @bartoszherba! - Fixed a Naming Issue in productDetails Method
    We've fixed a problem where the method name used to access product details was mistakenly written as "productDetail." It's now correctly named as "productDetails." This change ensures everything is clear and accurate in the code.