@vue-storefront/magento-types
4.0.1
Patch Changes
- FIX Improve Magento route types with proper union types
- Replaced generic
RoutableInterfacewith a newRouteunion type that properly represents different route variants - Added specific types for
CategoryInterfaceRoute,CategoryTreeRoute,CmsPageRoute, andProductRoutewith their respective properties - Updated the route API function to use the new
Routetype for better type safety and IntelliSense support - Each route type now includes proper
__typenamediscrimination for better runtime type checking
4.0.0
Major Changes
FEATURE
- placeOrder unified API method: Added
placeOrdermethod to the unified API for Magento.
CHANGED
- placeOrder response structure: The
placeOrdermethod now returns detailed order information using theorderV2field instead of the basicorderfield. Update your code to access order data fromresponse.data.placeOrder.orderV2instead ofresponse.data.placeOrder.order - magento schema updated: Updated Magento GraphQL schema from 2.4.6 to 2.4.8, which may introduce new types and fields or modify existing ones.
- magento-sdk: Is now using the
middlewareModulefrom@alokai/connect/sdkand become a Proxy SDK module to align with recent architecture changes.
3.0.0
Major Changes
- CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrcor.node-versionfiles to specify Node.js version22.14. - Upgraded
@types/nodeto version^22.13.17for compatibility with the latest Node.js features.
Recommendations:
- Use Node.js version
22.14.0or higher for optimal performance, security, and compatibility. - While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.
3.0.0-rc.0
Major Changes
- CHANGED Updated the package for compatibility with Node.js 22.
Key Updates:
- Upgraded to the latest version of Node.js 22
- Updated CI pipelines to use Node.js 22 for consistency.
- Updated
.nvmrcor.node-versionfiles to specify Node.js version22.14. - Upgraded
@types/nodeto version^22.13.17for compatibility with the latest Node.js features.
Recommendations:
- Use Node.js version
22.14.0or higher for optimal performance, security, and compatibility. - While Node.js 20 is technically supported, it is not recommended as it may cause compatibility issues with certain packages and has not been thoroughly tested.
2.0.0
Major Changes
- e4709f9a: Changed minimum Node version from 16 to 18. The condition that was forcing the Node version to be lower than 19 is also removed.
1.2.0
Minor Changes
- 8b2a0c35: ADDED
categoriesendpoint definition.
1.1.0
Minor Changes
- 7ce4f9ed: CHANGED Enhanced default GQL queries
CategorySearchQuerynew fields:url_key- The url key assigned to the category.children- Child categories tree.include_in_menuis_anchorlevelnamepositionproduct_countuidurl_keyurl_pathurl_suffix
// get category `children` categories const category = sdk.commerce.categorySearch(); const children = category.children;CategoryListQuerynew 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; }ProductListsQuerynew fields:variants- An array of variants ofConfigurableProduct
// get ConfigurableProduct `variants` products const products = sdk.commerce.products(); for (let product of products) { if (product.__typename === "ConfigurableProduct") { const variants = products.variants; } }
Patch Changes
- 7ce4f9ed: FIXED
CategoryListQueryreturnsurl_keyproperty on each children level
CHANGED Enhanced default GQL queriesCategoryListQuery- fetch up to 5th level nested categories
children
- fetch up to 5th level nested categories
- 7ce4f9ed: CHANGED Enhanced default GQL queries
ProductDetailsQuery- enhanced
ConfigurableProductresponse withConfigurableVariants
- enhanced
- 7ce4f9ed: CHANGED Enhanced default GQL queries with new fields
CartQueryCustomerCartQueryApplyCouponToCartMutationRemoveCouponFromCartMutationAddProductsToCartMutationRemoveItemFromCartMutationSetShippingMethodsOnCartMutationMergeCartsMutation
with new fields:pricessubtotal_with_discount_excluding_tax
configured_variantskunameonly_x_left_in_stockprice_range
- 7ce4f9ed: FIXED
getAvailableShippingMethodsmethod declaration argument type. Usingcart_idinstead ofcartId. - 7ce4f9ed: FIXED
updateCustomerAddressmethod declaration argument type. Useidinstead ofaddressId.
CHANGED Enhanced default GQL queriesCreateCustomerAddressresponse with fieldsfirstnamelastnameprefixsuffix
- 7ce4f9ed: CHANGED Enhanced default GQL queries with new fields
SetGuestEmailOnCartMutationSetBillingAddressOnCartMutationSetPaymentMethodOnCartMutationSetShippingAddressesOnCartMutation
with new fields:pricessubtotal_with_discount_excluding_tax
configured_variantskunameonly_x_left_in_stockprice_range
1.0.2
Patch Changes
- 045784a6: Fixes
- Fixed
getAvailablePaymentMethodstype definition. ParametercartIdis now properly typed asstring.
- Fixed
1.0.1
Patch Changes
- #1456
e3f329ecThanks @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.