@scayle/storefront-core
8.16.0
8.15.1
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.15.0
Minor Changes
- Filter out orders from
user.orderSummarythat are not associated with the current shop ID.
8.14.4
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.14.3
Patch Changes
- Export the
BasketItemUpdateDatatype.
8.14.2
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.14.1
Patch Changes
- Update
getUniqueItemsFromOrderandgetItemQuantityFromOrderto accept orderProductandVariantgenerics to ensure correct types. Moreover, both methods
are deprecated as they should be handled within Storefront project itself.
8.14.0
Minor Changes
- Expose
PackageDeliveryStatustype. This new type clearly defines the allowed values for a package's delivery status. This improves code clarity and helps prevent typos. It's used to replace the inline string literal types in theListOfPackagestype. - Refactor the
OrderandOrderIteminterfaces to be generic, allowing them to accept customProductandVarianttypes. This allows to strongly type theproductandvariantdata within orders and order items, leading to better type checking and potentially fewer runtime errors. This allows for compile-time checks and autocompletion when working with product and variant properties ofOrderItemand items property ofOrder.
8.13.0
Minor Changes
- Expose
OrderStatusandOrderIteminterfaces fromordertypes. - Enhance the
OrderSummarycomponent by integrating theOrderStatustype
from the orderOrderinterface. This update provides a more accurate and
detailed representation of the order status for users. - Enhance order
detailedStatuscode type forbilling,orderandshippingproperties and
exposeOrderStatusCode,BillingStatusCodeandShippingStatusCode.
Patch Changes
- Added
fishery@>=2.2.3aspeerDependencies.
8.12.3
Patch Changes
- Fix typo introduced in 8.12.2.
8.12.2
Patch Changes
- Use
CentAmountin the Order type to avoid nominal type errors.
8.12.1
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.12.0
Minor Changes
- Expose
CategoryFilterfromstorefront-core.
8.11.3
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.11.2
Patch Changes
- Updated dependency
jose@^5.6.3tojose@^6.0.8
8.11.1
Patch Changes
- Added dependency
@scayle/[email protected]
Dependencies
- Updated dependency to @scayle/[email protected]
8.11.0
Minor Changes
- Remove check in
getOrderByIdRPC whether an order exists incontext.user.orderSummary. The order summary defaults to including only the 50 most recent entries. This fix ensures orders beyond this limit can be accessed.
8.10.0
Minor Changes
- Simplified exported
Orderinterface by relying directly on primitive types instead of having multiple intermediate types that resolve to primitives.
The following formerly exported intermediate types have been replaces by primitive types:- resolving to
stringnowTimestampOfOrderConfirmationCharacterCurrencyCodeUniqueIdentifierOfTheStateNameOfTheStateUniqueIdentifierOfTheState1NameOfTheState1UniqueIdentifierOfTheState2NameOfTheState2TimestampOfOrderInvoiceCharacterCurrencyCode1UniqueIdentifierOfTheItemTimestampOfItemCreationTimestampOfLastItemUpdateCarrierShippingTheItemLatestExpectedDeliveryDateEarliestExpectedDeliveryDateShipmentKeyOfTheItemTimestampOfOrderCreationTimestampOfLastOrderUpdate
- resolving to
numbernowThisFieldRepresentsTheAdditionalFeesExcludingTheTaxesThisFieldRepresentsTheAdditionalFeesIncludingTheTaxesTheIncludedVATAmountTheIncludedVATRateInPercentAsIntegerRepresentationThisFieldRepresentsTheDiscountAmountIncludingTheTaxesAbsoluteValueOfTheAppliedTaxUniqueNumericIdentifierOfTheItemAvailableQuantityInTheWarehouseThisFieldRepresentsTheDiscountAmountIncludingTheTaxes1AbsoluteValueOfTheAppliedTax1RelativeValueOfTheAppliedTaxUndiscountedItemPriceExcludingTaxesUndiscountedItemPriceIncludingTaxesItemPriceExcludingTaxes1ItemPriceIncludingTaxes1ReferenceByWhichThePackageIsIdentifiedItemPriceExcludingTaxesItemPriceIncludingTaxesNumberOfInstallmentsChosenByTheCustomerForTheOrder
- resolving to
booleannowTheReturnShipmentHasBeenTriggeredByCCIWhetherThePaymentMethodIsAGiftCardIfTrueTheCustomerElectedToHaveADelayInPaymentCapture
- resolving to
null | numbernowPickingWarehouseIdWarehousePackageReference
- resolving to
null | stringnowReturnIdentCodeOfTheItem
The interfaceThisFieldHoldsDetailsAboutTheIncludedVATTaxhas been removed andamount: numberandrate: numberhave been directly specified underOrder.cost.appliedFees.tax.vat: {amount: number, rate: number}.
Additionally we have introduce the typesOrderAddressRecipientGenderandOrderAddressRecipientType, as well as the interfacesOrderAddressandOrderForwardingAddress. - resolving to
8.9.0
Minor Changes
- Extend
RpcContextwith anrpcCallproperty. This is a utility function that can be used within RPC methods to invoke another RPC method.
8.8.0
Minor Changes
- Deprecate
RpcContext.campaignKey. ThegetCampaignKeyRPC should be used instead.
To get the default campaign key, you can call the RPC method:
To override the default campaign key, override the getCampaignKey RPC with your own implementation.
See Overriding core RPC Methods for more.
8.7.1
Patch Changes
- Introduced JSDoc comments to provide additional contextual descriptions and hints.
8.7.0
Minor Changes
- [Testing] Create and expose externally
userFactory
Patch Changes
- The
domainproperty onRpcContextis optional
8.6.1
Patch Changes
- Remove duplicated export of
PromotionEffectType. It was previously defined within@scayle/storefront-coreand reexported from@scayle/storefront-api. Now only the the object literal and type from@scayle/storefront-apiare exported.
8.6.0
Minor Changes
- Reexport
ExistingItemHandling,AddToBasketFailureKind,UpdateBasketItemFailureKind,AddToWishlistFailureKind,PromotionEffectTypeandFilterTypesfrom@scayle/storefront-api, instead of redefining them in@scayle/storefront-core - Remove
package.jsonandserverexports. - The CommonJS export format will be removed in this version. All exports are provided through ES Modules (
import/export) exclusively
This change will primarily affect users who are currently using the CommonJS format of this package. To update your code, you should replacerequirestatements withimportstatements and update your build tooling if necessary.
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.5.0
Minor Changes
- The CommonJS export format will be removed in this version. All exports are provided through ES Modules (
import/export) exclusively
This change will primarily affect users who are currently using the CommonJS format of this package. To update your code, you should replacerequirestatements withimportstatements and update your build tooling if necessary.
8.4.0
Minor Changes
- [Types] - Extend
Gendertype withnoption
8.3.2
Patch Changes
- Types: Explicitly type the return of
resolveSearch
8.3.1
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.3.0
Minor Changes
- [Basket] Add support to update existing basket items using the
updateBasketItemRPC.
8.2.2
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.2.1
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.2.0
Minor Changes
- [Performance] Remove the 'autobinding' of the methods on the
Cachedinstance. Instead theexecutemethod only is bound when constructing theRpcContext. This simplifies the code and improves the performance of thebootstrapfunction. This change is internal tostorefront-coreand the API ofRpcContextis unchanged.
8.1.5
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.1.4
Patch Changes
- Fixed misspelling of interface
BasketItemDisplayDataItemtoBasketItemDisplayDataItem
Dependencies
- Updated dependency to @scayle/[email protected]
8.1.3
Patch Changes
Dependencies
- Updated dependency to @scayle/[email protected]
8.1.2
Patch Changes
- RPC Methods: When propagating the status code from a Storefront API error, only include the statusCode and statusText. Previously the headers and body were included as well which could cause content decoding issues.
8.1.1
Patch Changes
- Make the
sortparameter optional for theFetchProductsByCategoryParams
8.1.0
Minor Changes
- RPC Methods: Propagate Storefront API response codes through RPC methods. This addresses an issue introduced in Storefront Core v8 where specific status codes were incorrectly reported as generic 500 errors. The following RPC methods are impacted:
getBrandsgetBrandByIdgetCategoryByPathgetCategoryByIdgetProductByIdgetProductsByIdsgetProductsByReferenceKeysgetPromotionsgetCurrentPromotionsgetPromotionsByIdsgetSearchSuggestionsgetShopConfigurationgetVariantByIdgetWishlistremoveItemFromWishlist
8.0.0
Major Changes
- [💥 BREAKING] The
getBadgeLabelhelper function has been removed, giving you more control over badge label display.- Note: This change doesn't affect projects using SCAYLE Storefront Application v1.0 or later.
- For applications based on older versions or using
getBadgeLabel, you can refer to the previous implementation below:
- [💥 BREAKING] We've standardized our configuration to use
sapi(Storefront API) throughout the codebase, replacing the deprecatedbapikeyword. This change improves clarity and consistency by removing theinitBapifunction, replacing thebapiClientproperty withsapiClientwithin theRPCContext, and updating all code references accordingly.BapiConfigis not exported anymore and has been superseded bySapiConfig.- NOTE: These changes impact your environment variables used for deployments. Please check your infrastructure and deployment setup and adapt accordingly!
- Previous
bapiConfiguration innuxt.config.ts - Legacy Environment Variables:
- Current
sapiConfiguration innuxt.config.ts - New Environment Variables:
- [💥 BREAKING] We've streamlined cache management by replacing the outdated
AY_CACHE_DISABLEDenvironment variable. Now, you can effortlessly control caching using either theNUXT_STOREFRONT_CACHE_ENABLEDenvironment variable or thestorefront.cache.enabledoption within yournuxt.config.tsfile, providing a more user-friendly experience. - [💥 BREAKING] This release removes the
RedisCacheprovider. We now useUnstorageCachewhich also supports Redis as a backing store. - [💥 BREAKING] To improve security and streamline token management, we've updated how you access user
accessToken. Instead of directly accessing thestorefrontAccessTokenfield on theUserAuthenticationinterface, you'll now use the dedicatedgetAccessTokenRPC. This change ensures a more secure and controlled method for handling sensitive user data within your application.- Previous Usage of
user.authentication.storefrontAccessToken: - Current Usage of dedicated
getAccessTokenRPC method:
- Previous Usage of
- [💥 BREAKING] We've enhanced security for basket and wishlist keys by switching the default hashing algorithm from MD5 to the more robust SHA256.
- Overriding default
hashAlgorithminnuxt.config.ts:
- Overriding default
- [💥 BREAKING] The attribute
loginShopIdis removed from theShopUserinterface as the shop now uses session cookies. - [💥 BREAKING] We're streamlining the search experience as we transition to SCAYLE Search v2, focusing on a category-centric approach. To achieve this, we're consolidating search functionality. This means we're replacing the
searchProductsRPC method withgetSearchSuggestions, which provides both product suggestions (triggered by product IDs) and category suggestions (triggered by category-like terms, leading to filtered category pages).- Previous Usage of
searchProductsRPC method: - Current Usage of
getSearchSuggestionsRPC method:
- Previous Usage of
- [💥 BREAKING] Improved basket updating: Adding an item to your basket with a reduced quantity will now correctly update the basket contents.
- [💥 BREAKING] The methods
getBasket,removeItemFromBasket,addItemsToBasket, andaddItemToBaskethave been updated. Instead of returning the basket object directly, the basket will now be accessible as a property within the response body. Furthermore, errors occurring duringaddItemToBasketandaddItemsToBasketwill from now on return HTTP 400. The error kind can be identified by checking theerrorproperty of the response.
Patch Changes
- Default
forceTokenRefreshtofalsewhen no payload is passed togetAccessToken