Vuestorefront Magento2 Versions Save

Vue Storefront 2 integration for Magento 2

@vue-storefront/[email protected]

3 weeks ago

Patch Changes

  • 3065ee76: [ADDED] CategoriesQuery type for categories endpoint.
  • 101d9905: [FIXED]: Added export of Endpoints type, because it was missing.

@vue-storefront/[email protected]

1 month ago

Patch Changes

  • 6672edfb: [CHANGED] magentoModule has been deprecated. Use middlewareModule from @vue-storefront/sdk package instead.

    - import { initSDK, buildModule } from '@vue-storefront/sdk';
    - import { magentoModule } from '@vsf-enterprise/magento-sdk'
    + import { initSDK, buildModule, middlewareModule } from '@vue-storefront/sdk';
    + import { Endpoints as MagentoEndpoints } from '@vsf-enterprise/sapcc-api'; // In Alokai Storefront you should import it from `storefront-middleware/types.ts`
    
    const sdkConfig = {
      magento:
        buildModule(
    -      magentoModule,
    +      middlewareModule<MagentoEndpoints>,
          { apiUrl: 'http://localhost:8181/magento' }
        )
    };
    

    Updating your magentoModule to this version should not disrupt your existing code; however, switching to middlewareModule will require certain modifications.

    To migrate:

    • Use custom query as a second argument of middlewareModule function.
    const customQuery = {
      cart: 'cart-custom-query',
      metadata: {
        fields: 'id items { uid }'
      }
    };
    - const cart = await sdk.magento.cart({ cartId: '123'}, { customQuery });
    + const cart = await sdk.magento.cart({ cartId: '123'}, customQuery);
    

@vue-storefront/[email protected]

1 month ago

Minor Changes

  • 6dc90582: [CHANGED] Enhanced default GQL productDetailsQuery with new fields: stock_status and only_x_left_in_stock. #1521

Patch Changes

  • 6672edfb: [CHANGED] Update TSDocs of API methods. Now, they contain examples of usage.

@vue-storefront/[email protected]

1 month ago

Patch Changes

  • ae8a741d: ### Change Log

    • [CHANGED] Deprecated the MagentoModuleType interface in index.ts. It is no longer necessary to use this type. Please, check documentation of magentoModule for alternatives. Below you can find a snippet of the new way of using magentoModule. Pay attention to the buildModule function that is used to create a module instance, it no longer requires the MagentoModuleType type as a generic parameter.
    import { initSDK, buildModule } from "@vue-storefront/sdk";
    import {
      magentoModule,
      MagentoModuleType,
    } from "@vue-storefront/magento2-sdk";
    
    const sdkConfig = {
      magento: buildModule(magentoModule, {
        apiUrl: "http://localhost:8181/magento",
      }),
    };
    
    export const sdk = initSDK(sdkConfig);
    
    • [CHANGED] Made the ssrApiUrl property in ModuleOptions.ts optional.

@vue-storefront/[email protected]

1 month ago

Major Changes

  • 8b8fdff0: - [CHANGED] Endpoints interface. Previously, each endpoint contained context param, which is internal and shouldn't be exposed in the final interface. Now, Endpoints interface properties don't contain context param. If you need to use context param, you should use ApiMethods type.

    - import { Endpoints } from '@vue-storefront/magento-api';
    + import { ApiMethods } from '@vue-storefront/magento-api';
    
    • [CHANGED] Removed ContextualizedEndpoints type. Use Endpoints instead.
    - import { ContextualizedEndpoints } from '@vue-storefront/magento-api';
    + import { Endpoints } from '@vue-storefront/magento-api';
    
    • [REMOVED] MagentoApiMethods interface. Use Endpoints instead.
    - import { MagentoApiMethods } from '@vue-storefront/magento-api';
    + import { Endpoints } from '@vue-storefront/magento-api';
    

@vue-storefront/[email protected]

1 month ago

Minor Changes

  • 8b2a0c35: [ADDED] categories method that allows fetching a list of categories that match the specified filter.

Patch Changes

@vue-storefront/[email protected]

1 month ago

Minor Changes

  • 8b2a0c35: [ADDED] categories endpoint definition.

@vue-storefront/[email protected]

1 month ago

Minor Changes

  • 8b2a0c35: [ADDED] categories endpoint that allows fetching a list of categories that match the specified filter. [CHANGED] categoryList endpoint is now deprecated in favor of the new categories endpoint.

    
    

Patch Changes

@vue-storefront/[email protected]

1 month ago

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

@vue-storefront/[email protected]

1 month ago

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