@vue-storefront/magento-sdk
2.3.2
Patch Changes
- 6672edfb: CHANGED
magentoModule
has been deprecated. UsemiddlewareModule
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 yourmagentoModule
to this version should not disrupt your existing code; however, switching tomiddlewareModule
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);
- Use custom query as a second argument of
2.3.1
Patch Changes
- ae8a741d: ### Change Log
- CHANGED Deprecated the
MagentoModuleType
interface inindex.ts
. It is no longer necessary to use this type. Please, check documentation ofmagentoModule
for alternatives. Below you can find a snippet of the new way of usingmagentoModule
. Pay attention to thebuildModule
function that is used to create a module instance, it no longer requires theMagentoModuleType
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 inModuleOptions.ts
optional.
- CHANGED Deprecated the
2.3.0
Minor Changes
- 8b2a0c35: ADDED
categories
method 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
customQuery
andcustomMutation
SDK methods. Previously, thecustomHeaders
option was not being passed properly. Now, all options will be properly passed to thecustomQuery
andcustomMutation
methods.
2.1.0
Minor Changes
- d634cdbe: ## Changes
This change adds support for custom queries in theroute
method of both theapi-client
andsdk
modules. Theroute
query has also been extended with aCategoryInterface
fragment. These changes improve the flexibility and functionality of theroute
method, allowing for more customization and control over the data returned.api-client
- Expanded the route query to include a
CategoryInterface
fragment. - Introduced support for
customQueries
within the route API method.
sdk
- Now includes support for
customQueries
in the route SDK method.
- Expanded the route query to include a
Patch Changes
- 992734bf: ## Changes
This change adds support for custom queries in thegenerateCustomerToken
method of both theapi-client
andsdk
modules.api-client
- Introduced support for
customQueries
within the route API method.
sdk
- Now includes support for
customQueries
in the route SDK method.
- Introduced support for
2.0.0
Major Changes
- 07d2087a: Implemented
@vue-storefront/sdk-axios-request-sender
package in all SDK methods. Also,availableStores
,categoryList
,categorySearch
,cmsBlocks
,cmsPage
,countries
,currency
,productDetails
,productReview
,productReviewRatingsMetadata
,products
,relatedProducts
,reviews
,route
,storeConfig
,upsellProducts
methods 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