@vue-storefront/magento-sdk
2.3.2
Patch Changes
- 6672edfb: CHANGED
magentoModulehas been deprecated. UsemiddlewareModulefrom@vue-storefront/sdkpackage 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 yourmagentoModuleto this version should not disrupt your existing code; however, switching tomiddlewareModulewill require certain modifications.
To migrate:- Use custom query as a second argument of
middlewareModulefunction.
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); - Use custom query as a second argument of
2.3.1
Patch Changes
- ae8a741d: ### Change Log
- CHANGED Deprecated the
MagentoModuleTypeinterface inindex.ts. It is no longer necessary to use this type. Please, check documentation ofmagentoModulefor alternatives. Below you can find a snippet of the new way of usingmagentoModule. Pay attention to thebuildModulefunction that is used to create a module instance, it no longer requires theMagentoModuleTypetype 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
ssrApiUrlproperty inModuleOptions.tsoptional.
- CHANGED Deprecated the
2.3.0
Minor Changes
- 8b2a0c35: ADDED
categoriesmethod that allows fetching a list of categories that match the specified filter.
Patch Changes
- Updated dependencies 8b2a0c35
- @vue-storefront/magento-types@1.2.0
2.2.0
Minor Changes
- eda02ee7: ADDED addBundleProductsToCart method to add one or more bundle products to the specified cart. ADDED addConfigurableProductsToCart method to add one or more configurable products to the specified cart.
2.1.1
Patch Changes
- c5d63066: FIXED Correctly passing properties and options to
customQueryandcustomMutationSDK methods. Previously, thecustomHeadersoption was not being passed properly. Now, all options will be properly passed to thecustomQueryandcustomMutationmethods.
2.1.0
Minor Changes
- d634cdbe: ## Changes
This change adds support for custom queries in theroutemethod of both theapi-clientandsdkmodules. Theroutequery has also been extended with aCategoryInterfacefragment. These changes improve the flexibility and functionality of theroutemethod, allowing for more customization and control over the data returned.api-client
- Expanded the route query to include a
CategoryInterfacefragment. - Introduced support for
customQuerieswithin the route API method.
sdk
- Now includes support for
customQueriesin the route SDK method.
- Expanded the route query to include a
Patch Changes
- 992734bf: ## Changes
This change adds support for custom queries in thegenerateCustomerTokenmethod of both theapi-clientandsdkmodules.api-client
- Introduced support for
customQuerieswithin the route API method.
sdk
- Now includes support for
customQueriesin the route SDK method.
- Introduced support for
2.0.0
Major Changes
- 07d2087a: Implemented
@vue-storefront/sdk-axios-request-senderpackage in all SDK methods. Also,availableStores,categoryList,categorySearch,cmsBlocks,cmsPage,countries,currency,productDetails,productReview,productReviewRatingsMetadata,products,relatedProducts,reviews,route,storeConfig,upsellProductsmethods now send GET instead of POST requests to Vue Storefront's Server Middleware.
Minor Changes
- 37432dc8: ### Enhancements:
- Exported method types from the Magento SDK, providing improved accessibility and clarity for developers using the SDK.
Dependency Updates:
- Updated TypeScript to version 5.2.2, ensuring compatibility with the latest TypeScript features and improvements.
1.1.0
Minor Changes
- Add node 18 support