@scayle/storefront-core 8.14.0 → 8.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 8.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/storefront-api@18.1.1
10
+
11
+ ## 8.14.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Update `getUniqueItemsFromOrder` and `getItemQuantityFromOrder` to accept order
16
+ `Product` and `Variant` generics to ensure correct types. Moreover, both methods
17
+ are deprecated as they should be handled within Storefront project itself.
18
+
3
19
  ## 8.14.0
4
20
 
5
21
  ### Minor Changes
@@ -291,7 +307,7 @@ See [Overriding core RPC Methods](https://scayle.dev/en/storefront-guide/develop
291
307
 
292
308
  ### Patch Changes
293
309
 
294
- - Fixed misspelling of interface `BaskteItemDisplayDataItem` to `BasketItemDisplayDataItem`
310
+ - Fixed misspelling of interface `BasketItemDisplayDataItem` to `BasketItemDisplayDataItem`
295
311
 
296
312
  **Dependencies**
297
313
 
@@ -309,7 +325,7 @@ See [Overriding core RPC Methods](https://scayle.dev/en/storefront-guide/develop
309
325
 
310
326
  ### Patch Changes
311
327
 
312
- - **RPC Methods:** When propogating the status code from a SAPI error, only include the statusCode and statusText. Previously the headers and body were included as well which could cause content decoding issues.
328
+ - **RPC Methods:** When propagating the status code from a SAPI error, only include the statusCode and statusText. Previously the headers and body were included as well which could cause content decoding issues.
313
329
 
314
330
  ## 8.1.1
315
331
 
@@ -321,7 +337,7 @@ See [Overriding core RPC Methods](https://scayle.dev/en/storefront-guide/develop
321
337
 
322
338
  ### Minor Changes
323
339
 
324
- - **RPC Methods:** Propogate SAPI 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:
340
+ - **RPC Methods:** Propagate SAPI 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:
325
341
 
326
342
  - `getBrands`
327
343
  - `getBrandById`
@@ -525,1274 +541,3 @@ See [Overriding core RPC Methods](https://scayle.dev/en/storefront-guide/develop
525
541
  ### Patch Changes
526
542
 
527
543
  - Default `forceTokenRefresh` to `false` when no payload is passed to `getAccessToken`
528
-
529
- ## 7.69.3
530
-
531
- ### Patch Changes
532
-
533
- **Dependencies**
534
-
535
- - Updated dependency to @scayle/storefront-api@17.13.0
536
-
537
- ## 7.69.2
538
-
539
- ### Patch Changes
540
-
541
- **Dependencies**
542
-
543
- - Updated dependency to @scayle/storefront-api@17.12.0
544
-
545
- ## 7.69.1
546
-
547
- ### Patch Changes
548
-
549
- - Extend `FetchProductsByCategoryParams` type to support `trackSearchAnalyticsEvent?: boolean`
550
- - Allow passing of the `trackSearchAnalyticsEvent` parameter into the `getProductsByCategory` RPC method.
551
- **NOTE**: To prevent logging the search term on every page request when when paginating with the `page` parameter, the `trackSearchAnalyticsEvent` parameter is only passed on the first page (`page === 1`).
552
- For more details on how to utilize this, check the [SCAYLE Search Analytics section](https://scayle.dev/en/developer-guide/products/search#scayle-search-analytics) in the SCAYLE Resource Center.
553
-
554
- ## 7.69.0
555
-
556
- ### Minor Changes
557
-
558
- - Move test factories to separate entry point. They are now available via `@scayle/storefront-core/dist/test/factories` (or `@scayle/storefront-core/test/factories` when `moduleResolution` is set to `Bundler`.
559
-
560
- ### Patch Changes
561
-
562
- **Dependencies**
563
-
564
- - Updated dependency to @scayle/storefront-api@17.11.0
565
-
566
- ## 7.68.0
567
-
568
- ### Minor Changes
569
-
570
- - Set `sapiClient` in `RpcContext` as required to improve the updatability of RPC methods.
571
-
572
- ## 7.67.1
573
-
574
- ### Patch Changes
575
-
576
- **Dependencies**
577
-
578
- - Updated dependency to @scayle/storefront-api@17.10.1
579
-
580
- ## 7.67.0
581
-
582
- ### Minor Changes
583
-
584
- - Expose SAPI test factories externally
585
-
586
- ## 7.66.7
587
-
588
- ### Patch Changes
589
-
590
- - Updated dependency `@scayle/storefront-api@17.9.5` to `@scayle/storefront-api@17.10.0`
591
-
592
- ## 7.66.6
593
-
594
- ### Patch Changes
595
-
596
- **Dependencies**
597
-
598
- - Updated dependency to @scayle/storefront-api@17.10.0
599
-
600
- ## 7.66.5
601
-
602
- ### Patch Changes
603
-
604
- - Merging wishlists now retains the `variantId`, `itemGroup` and `customData` when present on the source wishlist item.
605
-
606
- ## 7.66.4
607
-
608
- ### Patch Changes
609
-
610
- **Dependencies**
611
-
612
- - Updated dependency to @scayle/storefront-api@17.9.5
613
-
614
- ## 7.66.3
615
-
616
- ### Patch Changes
617
-
618
- - Response objects with an error status code should not be cached
619
-
620
- ## 7.66.2
621
-
622
- ### Patch Changes
623
-
624
- **Dependencies**
625
-
626
- - Updated dependency to @scayle/storefront-api@17.9.4
627
-
628
- ## 7.66.1
629
-
630
- ### Patch Changes
631
-
632
- **Dependencies**
633
-
634
- - Updated dependency to @scayle/storefront-api@17.9.3
635
-
636
- ## 7.66.0
637
-
638
- ### Minor Changes
639
-
640
- - Add `fetchNavigationTreeByName` rpc.
641
-
642
- ### Patch Changes
643
-
644
- **Dependencies**
645
-
646
- - Updated dependency to @scayle/storefront-api@17.9.2
647
-
648
- ## 7.65.11
649
-
650
- ### Patch Changes
651
-
652
- - Export `NavigationItemSuggestion` type
653
- **Dependencies**
654
-
655
- - Updated dependency to @scayle/storefront-api@17.9.1
656
-
657
- ## 7.65.10
658
-
659
- ### Patch Changes
660
-
661
- **Dependencies**
662
-
663
- - Updated dependency to @scayle/storefront-api@17.9.0
664
-
665
- ## 7.65.9
666
-
667
- ### Patch Changes
668
-
669
- **Dependencies**
670
-
671
- - Updated dependency to @scayle/storefront-api@17.8.1
672
-
673
- ## 7.65.8
674
-
675
- ### Patch Changes
676
-
677
- - Fixed an issue with handling the deprecated MD5 hash support, e.g. used for generating a user-specific basket hash, resulting in a potential application crash
678
-
679
- ## 7.65.7
680
-
681
- ### Patch Changes
682
-
683
- - Delete `refreshToken` if it fails to refresh the access token
684
-
685
- ## 7.65.6
686
-
687
- ### Patch Changes
688
-
689
- - Resolved an issue where the `cache` value from parameters was being unintentionally overwritten by the default value for `getProductsByCategory` rpc.
690
-
691
- ## 7.65.5
692
-
693
- ### Patch Changes
694
-
695
- - Support passing an internal access header
696
- - Make `getProductsCount`, `getFilters` and `getProductsByCategory` RPC methods handle their parameters consistently
697
- **Dependencies**
698
-
699
- - Updated dependency to @scayle/storefront-api@17.8.0
700
-
701
- ## 7.65.4
702
-
703
- ### Patch Changes
704
-
705
- - Restore filtered list of error status codes in `oauthLogin` (400, 404) `oauthRegister` (400, 409, 422) and `oauthGuestLogin` (400, 409)
706
-
707
- ## 7.65.3
708
-
709
- ### Patch Changes
710
-
711
- - Fix the `getFilters` RPC method not considering `includeSellableForFree` when calculating the product count
712
-
713
- ## 7.65.2
714
-
715
- ### Patch Changes
716
-
717
- **Dependencies**
718
-
719
- - Updated dependency to @scayle/storefront-api@17.7.0
720
-
721
- ## 7.65.1
722
-
723
- ### Patch Changes
724
-
725
- - Fix regresion in product RPC methods where the categoryId may not be resolved from the category path
726
-
727
- ## 7.65.0
728
-
729
- ### Minor Changes
730
-
731
- - Improves the handling of `getOrderDataByCbd` RPC to return descriptive errors in case the validation of the token fails.
732
-
733
- In case the token can't be validated using the Checkout Secret, this is now returned and a warning on the server is logged.
734
-
735
- If the token has expired, this is now also returned and logged on the server.
736
-
737
- - Support passing `categoryId` as an alternative to the category path in `getProductsByCategory` and `getFilters`
738
-
739
- ### Patch Changes
740
-
741
- - Fixed cached fallback ttl to be used only if passed `option.ttl` is undefined
742
-
743
- ## 7.64.4
744
-
745
- ### Patch Changes
746
-
747
- - Replaced `radash` utils with custom native implementations
748
-
749
- ## 7.64.3
750
-
751
- ### Patch Changes
752
-
753
- - Add support for `orderCustomData` on the basket endpoints
754
- - Updated dependencies
755
- - @scayle/storefront-api@17.6.0
756
-
757
- ## 7.64.2
758
-
759
- ### Patch Changes
760
-
761
- - Add more specific return type for `getFlattenedMaterialComposition`
762
-
763
- ## 7.64.1
764
-
765
- ### Patch Changes
766
-
767
- - Updated dependencies
768
- - @scayle/storefront-api@17.5.0
769
-
770
- ## 7.64.0
771
-
772
- ### Minor Changes
773
-
774
- - Resolve a issue that prevents filters from working as expected on the search page
775
-
776
- ### Patch Changes
777
-
778
- - Updated dependencies
779
- - @scayle/storefront-api@17.4.4
780
-
781
- ## 7.63.1
782
-
783
- ### Patch Changes
784
-
785
- - Updated dependencies
786
- - @scayle/storefront-api@17.4.3
787
-
788
- ## 7.63.0
789
-
790
- ### Minor Changes
791
-
792
- - Deprecate `RpcContext.storeCampaignKeyword`
793
-
794
- ## 7.62.0
795
-
796
- ### Minor Changes
797
-
798
- - Return `ErrorResponse` from RPC when Session is missing
799
-
800
- ## 7.61.0
801
-
802
- ### Minor Changes
803
-
804
- - Add `sapiClient: StorefrontAPIClient` to `RpcContext`
805
-
806
- Deprecate `bapiClient` in favour of `sapiClient`
807
-
808
- ## 7.60.1
809
-
810
- ### Patch Changes
811
-
812
- - Updated dependencies
813
- - @scayle/storefront-api@17.4.2
814
-
815
- ## 7.60.0
816
-
817
- ### Minor Changes
818
-
819
- - Instead of throwing errors, RPCs will now return an `ErrorResponse` object conforming to [RFC9457](https://datatracker.ietf.org/doc/html/rfc9457).
820
-
821
- In addition to this change, existing RPCs have been reviewed and updated to return more accurate and descriptive HTTP status codes.
822
-
823
- This change allows us to provide more informative error messages and utilize standardized HTTP status codes for better context. The `ErrorResponse` object can include additional details about the error, making it easier to identify and address root causes.
824
-
825
- **Action Required:**
826
-
827
- Code that previously made direct RPC calls (calling the function directly instead of via `useRpc` or `rpcCall`) and relied on `try {} catch {}` blocks for error handling needs to be updated. Moving forward, please check the status of the RPC response directly.
828
-
829
- ### Patch Changes
830
-
831
- - Updated dependencies
832
- - @scayle/storefront-api@17.4.1
833
-
834
- ## 7.59.2
835
-
836
- ### Patch Changes
837
-
838
- - Resolved a memory leak within the `timeout` util where `setTimeout` might not have been garbage collected if the promise had been resolved/rejected before the timeout itself
839
-
840
- ## 7.59.1
841
-
842
- ### Patch Changes
843
-
844
- - Updated dependencies
845
- - @scayle/storefront-api@17.4.0
846
-
847
- ## 7.59.0
848
-
849
- ### Minor Changes
850
-
851
- - Add `storefront:afterLogin` and `storefront:afterLogout` hooks to the respective RPC.
852
-
853
- Add `callHook`, `callHookParallel` and `callHookWith` types to `RpcContext`
854
-
855
- ## 7.58.3
856
-
857
- ### Patch Changes
858
-
859
- - Upgrades to the new Wishlist from @scayle/storefront-api
860
- - `getDefaultFractionDigits` will return 2 if `maximumFractionDigits` is not defined
861
- - Updated dependencies
862
- - @scayle/storefront-api@17.3.0
863
-
864
- ## 7.58.2
865
-
866
- ### Patch Changes
867
-
868
- - Adds the `X-Shop-Id` header to the request when revoking an access token.
869
-
870
- ## 7.58.1
871
-
872
- ### Patch Changes
873
-
874
- - Fixed an issue by respecting `forceTokenRefresh` flag when calling the `getAccessToken` RPC
875
-
876
- ## 7.58.0
877
-
878
- ### Minor Changes
879
-
880
- - Deprecate `storefrontAccessToken` of `UserAuthentication`. Use `getAccessToken` RPC to get a valid access token instead.
881
- Deprecated `loginShopId`. `loginShopId` is no longer needed, because each shop now has its own session cookie.
882
- - Add `getAccessToken` RPC to retrieve refreshed access tokens
883
-
884
- ## 7.57.0
885
-
886
- ### Minor Changes
887
-
888
- - Expose `properties` with option for each category RPC method payload
889
-
890
- ## 7.56.0
891
-
892
- ### Minor Changes
893
-
894
- - Add refresh token logic to customer API client
895
-
896
- ### Patch Changes
897
-
898
- - Ensure `user.storefrontAccessToken` is up to date when calling the `getUser` RPC
899
-
900
- ## 7.55.0
901
-
902
- ### Minor Changes
903
-
904
- - Allow disabling the `HashAlgorithm` by setting its value to `none` within a shop config.
905
- - Added exports for `ProductSortConfig` type and enums `APISortOption` and `APISortOrder`.
906
-
907
- ## 7.54.0
908
-
909
- ### Minor Changes
910
-
911
- - Add new function `purifySensitiveValue` to `sanitizationHelpers` to purify specific value.
912
- - Introduced a new parameter `showFirstAndLastChar` to both `purifySensitiveValue` and `purifySensitiveData`.
913
-
914
- ## 7.53.0
915
-
916
- ### Minor Changes
917
-
918
- - Deprecate `isCmsPreview` flag in `RpcContext`. This flag indicated that the current session is or has been inside of a CMS editor. With the the introduction of 'Live Preview' for the cms provider 'contentful' and 'storyblok' this flag is no longer necessary.
919
-
920
- ### Patch Changes
921
-
922
- - Removes option `considerItemGroupForUniqueness` from `addItemsToBasket` since this is now enabled by default.
923
- - Updated dependencies
924
- - @scayle/storefront-api@17.2.0
925
-
926
- ## 7.52.1
927
-
928
- ### Patch Changes
929
-
930
- - Fix `getWishlist` falling back to basket `withParams` instead of wishlist `withParams`
931
-
932
- ## 7.52.0
933
-
934
- ### Minor Changes
935
-
936
- - Add `getCheckoutToken` RPC, which provides access token and checkout JWT needed by the checkout web component.
937
-
938
- ## 7.51.1
939
-
940
- ### Patch Changes
941
-
942
- - Update ShopConfiguration types
943
- - Updated dependencies
944
- - @scayle/storefront-api@17.1.0
945
-
946
- ## 7.51.0
947
-
948
- ### Minor Changes
949
-
950
- - Allow extending the `RpcContext` type by augmenting the `AdditionalRpcContext` interface.
951
-
952
- ## 7.50.1
953
-
954
- ### Patch Changes
955
-
956
- - Add missing `BuyXGetYEffect` and `AutomaticDiscountEffect` exports
957
- - Updated dependencies
958
- - @scayle/storefront-api@17.0.1
959
-
960
- ## 7.50.0
961
-
962
- ### Minor Changes
963
-
964
- - Upgraded to `@scayle/storefront-api@v17.0.0` and replaced `@aboutyou/backbone`
965
-
966
- Noticeable changes are:
967
-
968
- - Rename `BapiClient` to `StorefrontAPIClient`
969
- - Removed basic auth support from `initBapi`
970
-
971
- ## 7.49.4
972
-
973
- ### Patch Changes
974
-
975
- - Deprecate the `getBadgeLabel` function since this is application specific code and translations should be handled per project
976
-
977
- ## 7.49.3
978
-
979
- ### Patch Changes
980
-
981
- - Updated dependencies
982
- - @aboutyou/backbone@16.3.0
983
-
984
- ## 7.49.2
985
-
986
- ### Patch Changes
987
-
988
- - Fixed a bug where the `addItemToWishlist` RPC method returned an empty response upon failure.
989
- - Updated dependencies
990
- - @aboutyou/backbone@16.2.2
991
-
992
- ## 7.49.1
993
-
994
- ### Patch Changes
995
-
996
- - Fix accidental rename of `getFlattenedVariantCrosssellings` in the previous release
997
-
998
- ## 7.49.0
999
-
1000
- ### Minor Changes
1001
-
1002
- - Add optional `state` attribute to order address for US addresses
1003
-
1004
- ### Patch Changes
1005
-
1006
- - Add better type support for `getFlattenedVariantCrosssellings` with generic type
1007
-
1008
- ## 7.48.2
1009
-
1010
- ### Patch Changes
1011
-
1012
- - Fixes an issue where the `refreshToken` was not exposed on the `RPCContext` even if the user is logged in.
1013
-
1014
- ## 7.48.1
1015
-
1016
- ### Patch Changes
1017
-
1018
- - Updated `purifySensitiveData` to ensure that empty secrets are logged as empty strings, enhancing clarity in logged configurations.
1019
-
1020
- ## 7.48.0
1021
-
1022
- ### Minor Changes
1023
-
1024
- - Add support for dynamically adding query parameters to the IDP redirect callback URLs to be read back when the user returns from the IDP.
1025
-
1026
- ```ts
1027
- const { data: externalIDPRedirects } = await useIDP({
1028
- queryParams: { redirectTo: '/account' },
1029
- })
1030
- ```
1031
-
1032
- Please note that `code` and `state` are not supported as these are used by the SCAYLE Authentication API.
1033
-
1034
- ### Patch Changes
1035
-
1036
- - Added merge basket and merge wishlist functionality after login with IDP
1037
- - Updated dependencies
1038
- - @aboutyou/backbone@16.2.1
1039
-
1040
- ## 7.47.0
1041
-
1042
- ### Minor Changes
1043
-
1044
- - Add `resolveSearch` and `getSearchSuggestions` RPC methods
1045
-
1046
- ## 7.46.1
1047
-
1048
- ### Patch Changes
1049
-
1050
- - Revert breaking change in `handleIDPLoginCallback` signature
1051
-
1052
- ## 7.46.0
1053
-
1054
- ### Minor Changes
1055
-
1056
- - Add new RPC method `getProductsByReferenceKeys`
1057
-
1058
- ## 7.45.0
1059
-
1060
- ### Minor Changes
1061
-
1062
- - Improve typing of RPC methods by using `satisfies` instead of assertions. The [`satisfies` operator](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html) validates that an expression matches a type without changing the type of that expression. For RPC methods it can be used to enforce that a function conforms to the spec of an RPC method, without affecting the more specific inferred type of the function.
1063
-
1064
- You can use this pattern in your own custom RPC methods as well.
1065
-
1066
- For example:
1067
-
1068
- ```
1069
- export const custom: RpcHandler<{ shop: number }> = (
1070
- context: RpcContext,
1071
- ) => {
1072
- return {
1073
- shop: context.shopId,
1074
- }
1075
- }
1076
- ```
1077
-
1078
- ```
1079
- export const custom = (
1080
- context: RpcContext,
1081
- ) => {
1082
- return {
1083
- shop: context.shopId,
1084
- }
1085
- } satisfies RpcHandler<{ shop: number }>
1086
- ```
1087
-
1088
- In the first case, `custom` will be typed as `RpcHandler<{shop: number}>` or essentially a function takes no parameters and returns `{ shop: number } | Response<{shop: number}>`. In the second case, it will be typed as a function which takes no parameters and returns `{ shop: number }` which is more specific. The more specific typing may be useful if you are calling the custom RPC function as both a registered RPC method and regular function.
1089
-
1090
- ## 7.44.1
1091
-
1092
- ### Patch Changes
1093
-
1094
- - Updated dependencies
1095
- - @aboutyou/backbone@16.2.0
1096
-
1097
- ## 7.44.0
1098
-
1099
- ### Minor Changes
1100
-
1101
- - Expose the `loginWithIDP` function from the `useSession` composable.
1102
- - Changes the signature of `handleIDPLoginCallback` to receive an object with the code inside instead of just the code for improved logging behavior.
1103
-
1104
- ## 7.43.0
1105
-
1106
- ### Minor Changes
1107
-
1108
- - Add `createAndPurifyHeaders` sanitization helper
1109
-
1110
- ## 7.42.1
1111
-
1112
- ### Patch Changes
1113
-
1114
- - Fix usage of the same cache key prefix for `getCategoryByPath`
1115
-
1116
- ## 7.42.0
1117
-
1118
- ### Minor Changes
1119
-
1120
- - Add `getCategoryByPath` RPC method
1121
-
1122
- ## 7.41.3
1123
-
1124
- ### Patch Changes
1125
-
1126
- - Fix lost session if user refresh is called while not logged in
1127
-
1128
- ## 7.41.2
1129
-
1130
- ### Patch Changes
1131
-
1132
- - Updated dependencies
1133
- - @aboutyou/backbone@16.1.2
1134
-
1135
- ## 7.41.1
1136
-
1137
- ### Patch Changes
1138
-
1139
- - Fixes an issue where we were trying to read siblings information from a product where the data was not available
1140
-
1141
- ## 7.41.0
1142
-
1143
- ### Minor Changes
1144
-
1145
- - Add `purifySensitiveData` sanitization helper
1146
-
1147
- ## 7.40.1
1148
-
1149
- ### Patch Changes
1150
-
1151
- - patch accessToken on refreshUser RPC Method
1152
-
1153
- ## 7.40.0
1154
-
1155
- ### Minor Changes
1156
-
1157
- - Export Campaign types from @aboutyou/backbone
1158
-
1159
- ## 7.39.1
1160
-
1161
- ### Patch Changes
1162
-
1163
- - Persist accessToken to user.authentication
1164
-
1165
- ## 7.39.0
1166
-
1167
- ### Minor Changes
1168
-
1169
- - Add `sortable` option to `groupFilterableValuesByKey` filter helper
1170
- - Add `sortable` option to `getGroupedFilterableValues` to provide the ability for custom sorting implementation for specific filtersGroups
1171
- - Authentication RPC methods include status codes in error cases
1172
-
1173
- ## 7.38.1
1174
-
1175
- ### Patch Changes
1176
-
1177
- - Fix potential empty user after login
1178
-
1179
- ## 7.38.0
1180
-
1181
- ### Minor Changes
1182
-
1183
- - Allow the session of an `RpcContext` to be undefined
1184
-
1185
- BREAKING: This changes the structure of the `RpcContext`, so it may be a breaking change if you have written custom RPC methods.
1186
-
1187
- The affected properties on the `RpcContext` are `sessionId`, `wishlistKey` and `basketKey` and the affected methods are `destroySession`, `createUserBoundSession`, `updateUser`, and `updateTokens`. If you use these methods or properties in a custom RPC method, make sure that you handle the case where they might be undefined. TypeScript will also catch these cases if you have `strictNullChecks` enabled.
1188
-
1189
- You can check `context.sessionId` (or another session-dependent property) to determine if the session is present. If one of these properties is present, all will be. Alternatively, you can call `assertSession(context)` before referencing any properties on the context. If the session is not present, an error will be thrown. For any usage of `context` after `assertSession` is called, TypeScript will understand that the session properties are present.
1190
-
1191
- ## 7.37.0
1192
-
1193
- ### Minor Changes
1194
-
1195
- - Update dependency `jose` to the latest `5.2.0` version
1196
-
1197
- ## 7.36.0
1198
-
1199
- ### Minor Changes
1200
-
1201
- - Support `Response` returns in RPC methods
1202
- - Handle 401 from CO and delete session
1203
-
1204
- ## 7.35.0
1205
-
1206
- ### Minor Changes
1207
-
1208
- - Change `oauthForgetPassword` payload signature to accept `email` only
1209
-
1210
- ## 7.34.1
1211
-
1212
- ### Patch Changes
1213
-
1214
- - Fix type errors
1215
-
1216
- ## 7.34.0
1217
-
1218
- ### Minor Changes
1219
-
1220
- - We added support for Identity Provider (IDP), enhancing our authentication and identity management capabilities.
1221
-
1222
- ## 7.33.0
1223
-
1224
- ### Minor Changes
1225
-
1226
- - Previously the caching time for product RPCs was one hour which could easily lead to outdated product information for a long time.
1227
-
1228
- The `getProductById` and `getProductsByIds` RPCs are now cached for 5 Minutes and `getProductsByCategory` is now cached for 15 Minutes.
1229
-
1230
- ## 7.32.0
1231
-
1232
- ### Minor Changes
1233
-
1234
- - Use new password change API when oauth is enabled
1235
-
1236
- ## 7.31.0
1237
-
1238
- ### Minor Changes
1239
-
1240
- - Update SAPI SDK to v16
1241
-
1242
- ### Patch Changes
1243
-
1244
- - Fix filter helper to not return null values
1245
-
1246
- ## 7.30.0
1247
-
1248
- ### Minor Changes
1249
-
1250
- - Allow `null` values for `promotionId` within the basket payload
1251
-
1252
- ## 7.29.0
1253
-
1254
- ### Minor Changes
1255
-
1256
- - Remove basic `gzip` compression in custom `unstorage` caching interface in favor of custom `@scayle/unstorage-compression-driver`
1257
-
1258
- ## 7.28.2
1259
-
1260
- ### Patch Changes
1261
-
1262
- - `fetchUser` and `refreshUser` are now proper RPC methods
1263
- - Fix parsing error from authentication service
1264
- - Use a common API client for interacting with Checkout Customer API
1265
-
1266
- ## 7.28.1
1267
-
1268
- ### Patch Changes
1269
-
1270
- - Types: shop_id should be optional in updatePasswordByHash
1271
-
1272
- ## 7.28.0
1273
-
1274
- ### Minor Changes
1275
-
1276
- - Use native fetch instead of axios
1277
-
1278
- ## 7.27.0
1279
-
1280
- ### Minor Changes
1281
-
1282
- - Introduce gzip-based compression for unstorage cache interface
1283
- - Upgrade package `@aboutyou/backbone`to `v15.14.3`
1284
-
1285
- ## 7.26.0
1286
-
1287
- ### Minor Changes
1288
-
1289
- - Don't return oauth tokens from RPC methods
1290
-
1291
- ## 7.25.1
1292
-
1293
- ### Patch Changes
1294
-
1295
- - Cache purging should not remove unrelated keys
1296
-
1297
- ## 7.25.0
1298
-
1299
- ### Minor Changes
1300
-
1301
- - Add `PromotionEffectType` constant and type
1302
-
1303
- ## 7.24.1
1304
-
1305
- ### Patch Changes
1306
-
1307
- - Forbid saving `null` and `undefined` results to the cache
1308
-
1309
- ## 7.24.0
1310
-
1311
- ### Minor Changes
1312
-
1313
- - Remove `sanitize` helper function and jsdom dependency
1314
-
1315
- ## 7.23.0
1316
-
1317
- ### Minor Changes
1318
-
1319
- - Add `runtimeConfiguration` property to the `RPCContext`
1320
-
1321
- ## 7.22.1
1322
-
1323
- ### Patch Changes
1324
-
1325
- - Add license file
1326
-
1327
- ## 7.22.0
1328
-
1329
- ### Minor Changes
1330
-
1331
- - Upgrade package `@aboutyou/backbone`to `v15.14.1`
1332
-
1333
- ## 7.21.0
1334
-
1335
- ### Minor Changes
1336
-
1337
- - Add `promotion` RPC methods and types
1338
- - Add promotion data within the basket payloads
1339
-
1340
- ### Patch Changes
1341
-
1342
- - Fix product URL generation, remove additional special characters that can break routing
1343
-
1344
- ## 7.20.0
1345
-
1346
- ### Minor Changes
1347
-
1348
- - Upgrade backbone to the `v15.12.1`
1349
-
1350
- ## 7.19.1
1351
-
1352
- ### Patch Changes
1353
-
1354
- - The `auth` config is optional
1355
-
1356
- ## 7.19.0
1357
-
1358
- ### Minor Changes
1359
-
1360
- - Support setting default `with` params in the module options
1361
-
1362
- ## 7.18.0
1363
-
1364
- ### Minor Changes
1365
-
1366
- - Expose error codes from BAPI for the basket rpc methods
1367
-
1368
- ## 7.17.0
1369
-
1370
- ### Minor Changes
1371
-
1372
- - Limit perPage for getBrands and getProductsByCategory to 100
1373
-
1374
- ## 7.16.0
1375
-
1376
- ### Minor Changes
1377
-
1378
- - Support expiring CBD tokens
1379
-
1380
- ## 7.15.1
1381
-
1382
- ### Patch Changes
1383
-
1384
- - Remove unnecessary dependencies
1385
-
1386
- ## 7.15.0
1387
-
1388
- ### Minor Changes
1389
-
1390
- - Support importing all dist/ files directly
1391
-
1392
- ## 7.14.3
1393
-
1394
- ### Patch Changes
1395
-
1396
- - Import fix
1397
-
1398
- ## 7.14.2
1399
-
1400
- ### Patch Changes
1401
-
1402
- - Make redis an optional dependency
1403
-
1404
- ## 7.14.1
1405
-
1406
- ### Patch Changes
1407
-
1408
- - Remove unused body-parser dependency
1409
-
1410
- ## 7.14.0
1411
-
1412
- ### Minor Changes
1413
-
1414
- - Read OAuth settings from the RpcContext
1415
-
1416
- ## 7.13.0
1417
-
1418
- ### Minor Changes
1419
-
1420
- - Save user to session during login/register process. This will fix wrong wishlist/basket keys, in the RpcContext, after the login/registering.
1421
- - Safe user to session during login process. This will fix wrong wishlist/basket keys , in the RpcContext, after the login.
1422
-
1423
- ## 7.12.2
1424
-
1425
- ### Patch Changes
1426
-
1427
- - Replace crypto with uncrypto
1428
-
1429
- ## 7.12.1
1430
-
1431
- ### Patch Changes
1432
-
1433
- - Export BapiClient and Redirect from BAPI
1434
-
1435
- ## 7.12.0
1436
-
1437
- ### Minor Changes
1438
-
1439
- - `to` prop of `BreadcrumbItem` returned from `getBreadcrumbsFromPath` now start with `/`
1440
-
1441
- ## 7.11.0
1442
-
1443
- ### Minor Changes
1444
-
1445
- - Move `deserializeFilters` and `serializeFilters` to `@scayle/storefront-core`
1446
-
1447
- ## 7.10.2
1448
-
1449
- ### Patch Changes
1450
-
1451
- - encodeBase64 and decodeBase64 should be able to be run in browser environments
1452
-
1453
- ## 7.10.1
1454
-
1455
- ### Patch Changes
1456
-
1457
- - Get accessToken from getUserRequest on client side.
1458
- Merge basket and wishlist after login/register to logged in user.
1459
-
1460
- ## 7.10.0
1461
-
1462
- ### Minor Changes
1463
-
1464
- - Add the possibility to use Token based authentication.
1465
-
1466
- ## 7.9.0
1467
-
1468
- ### Minor Changes
1469
-
1470
- - Add unstorage cache provider
1471
-
1472
- ### Patch Changes
1473
-
1474
- - Fix crypto-js imports needed for basked/wishlist key generation.
1475
-
1476
- ## 7.8.0
1477
-
1478
- ### Minor Changes
1479
-
1480
- - provide exports of package as ESM and CJS format
1481
- - Migrate helpers to core package
1482
-
1483
- ### Patch Changes
1484
-
1485
- - Add `initBapi` function to initialize a BapiClient
1486
-
1487
- ## 7.7.1
1488
-
1489
- ### Patch Changes
1490
-
1491
- - orFiltersOperator should be optional in FetchProductsByCategoryParams and FetchProductsCountParams
1492
-
1493
- ## 7.7.0
1494
-
1495
- ### Minor Changes
1496
-
1497
- - Update @aboutyou/backbone package and add support for `onFiltersOperator` BAPI parameter
1498
-
1499
- ## 7.6.1
1500
-
1501
- ### Patch Changes
1502
-
1503
- - Move keys utils to core package
1504
-
1505
- ## 7.6.0
1506
-
1507
- ### Minor Changes
1508
-
1509
- - Set the domain property in the rpc context
1510
-
1511
- ## 7.5.0
1512
-
1513
- ### Minor Changes
1514
-
1515
- - `refresh()` of `useUser()` and `useUserFacet()` will now clear the session and user state if the checkout returns `HTTP 403 Forbidden`.
1516
- - **Breaking** `destroySession` is now async.
1517
-
1518
- ## 7.4.0
1519
-
1520
- ### Minor Changes
1521
-
1522
- - Add option `includeSellableForFree` to `useFacet` and `useProducts` to include free products.
1523
-
1524
- ## 7.3.1
1525
-
1526
- ### Patch Changes
1527
-
1528
- - Move RpcMethodsStorefront type to the nuxt2 package so it's accessible to shops
1529
-
1530
- ## 7.3.0
1531
-
1532
- ### Minor Changes
1533
-
1534
- - Add rpcMethods `getBrand` and `getBrands` & corresponding composables, to make bapi-sdk brand endpoints available.
1535
-
1536
- ## 7.2.1
1537
-
1538
- ### Patch Changes
1539
-
1540
- - Added ability to add basket groups by accepting `itemGroup` in the payload for the rpc method `addItemsToBasket`
1541
-
1542
- ## 7.2.0
1543
-
1544
- ### Minor Changes
1545
-
1546
- - Replaced `enums` with the companion object pattern approach.
1547
- - Replaced `HttpStatusMessage` number values with the actual message
1548
- - Exposed `HashAlgorithm` constant with its type and move it to the core
1549
- - **Breaking:** If you are importing `HashAlgorithm` from `@scayle/storefront-nuxt2` change to importing it from `@scayle/storefront-core`
1550
-
1551
- ## 7.1.0
1552
-
1553
- ### Minor Changes
1554
-
1555
- - Fix `fetchAllFiltersForCategory` caching issue by returning the cached value.
1556
- - Fix `fetchAllFiltersForCategory` caching issue by returning the cached value.
1557
-
1558
- ## 7.0.0
1559
-
1560
- ### Major Changes
1561
-
1562
- - **Changes to basket and wishlist functions**
1563
- - Going forward, the only way to specify `with` and `pricePromotionKey` for the basket is by passing them to `useBasketWithParams()`.
1564
- They can no longer be overridden when calling `basket.addItem()`, `basket.removeItem()` or `basket.fetch()`.
1565
- - The only way to specify `pricePromotionKey` for the wishlist is by to passing them to `useWishlistWithParams()`.
1566
- They can no longer be overridden when calling `wishlist.addItem()`, `wishlist.removeItem()`, `wishlist.toggleItem()` or `wishlist.fetch()`.
1567
- - **Removed deprecated functions and values**
1568
- - **Removal**: `user.fetch()`
1569
- - user is fetched automatically. If you want to refresh the user, use `user.refresh()`
1570
- - **Removal**: `user.forceRefreshUser()`
1571
- - instead use `user.refresh()`
1572
- - **Removal**: `useUser()`
1573
- - instead use `useUserWithParams()`
1574
- - **Removal**: `useBasket()`
1575
- - instead use `useBasketWithParams()`
1576
- - **Removal**: `useWishlist()`
1577
- - instead use `useWishlistWithParams()`
1578
- - **Removal**: `ShopUser.emailHash`
1579
- - instead hash the email address on shop side
1580
- - **Removal**: `wishlist.contains()`
1581
- - instead use `wishlist.findItem()`
1582
- - **Removal**: `applyFilter()`
1583
- - instead use `applyFilters()`
1584
- - **Removal**: `Log.attachToNuxtContext()`
1585
- - instead use `inject('log', log)` in your plugin
1586
- - **Removal**: `Log.attachToWindow()`
1587
- - instead use `Log.default = log`
1588
- - **Removal**: `sortingValues`
1589
- - instead use `getSortingValues()`
1590
- - **Changed NPM package names**
1591
-
1592
- - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-nuxt` to `@scayle/storefront-nuxt2`
1593
- - **Breaking**: Change package scope and name of `@aboutyou/sfc-nuxt3` to `@scayle/storefront-nuxt`
1594
- - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-lib` to `@scayle/storefront-core`
1595
- - **Breaking**: Change package scope and name of `@aboutyou/eslint-config-sfc` to `@scayle/eslint-config-storefront`
1596
- - **Breaking**: Change package scope and name of `@aboutyou/prettier-config-sfc` to `@scayle/prettier-config-storefront`
1597
-
1598
- _NOTE: Due to the changes of the NPM package scope from `@aboutyou` to `@scayle`,
1599
- it is required to change the consuming projects local `.npmrc` file as follows:_
1600
-
1601
- - Before:
1602
-
1603
- ```
1604
- @aboutyou:registry=https://gitlab.com/api/v4/packages/npm/
1605
- ```
1606
-
1607
- - After:
1608
-
1609
- ```
1610
- @aboutyou:registry=https://gitlab.com/api/v4/projects/29746107/packages/npm/
1611
- @scayle:registry=https://gitlab.com/api/v4/projects/29746107/packages/npm/
1612
- ```
1613
-
1614
- - **Removal**: `isEmpty`, `isEqual`, `pluck` and `copyTo` object helpers are removed.
1615
- _NOTE: We recommend to use native utilities or `radash` within your project!_
1616
- - **Removal**: Remove the deprecated pino-based logger.
1617
- _NOTE: For more information, please check out the "Logging"-section in `README.md`._
1618
- - Changes to hash utils:
1619
- - `hmac`, `verifyToken`, `buildSignature` functions are now async
1620
- - hash functions are no longer exported from `utils/index`. They must be imported from `utils/hash`
1621
- - `sha256` function added
1622
- - **Breaking**: Minimum `node` version raised to `18.15.0`
1623
- - `sha256` is used for default cache keys instead of `md5`
1624
- - **Breaking**: Remove the BasicAuth module
1625
- - Support sha256 for basket and wishlist keys
1626
-
1627
- The `appKeys.isHashed` config option has been renamed to `appKeys.hashAlgorithm`. Instead of a boolean, there are now three options.
1628
-
1629
- - `'sha256'` Use the `sha256` function for hashing basket and wishlist keys
1630
- - `'md5'` Use the `md5` function for hashing basket and wishlist keys (Equivalent to `isHashed: true` in v6)
1631
- - `null` Do not hash basket and wishlist keys (Equivalent to `isHashed: false` in v6)
1632
-
1633
- - **Redis optimizations**
1634
- Reduce memory usage by replacing `with parameters` from fetching all attributes and fetching minimum attributes required to run the demo shop.
1635
- _NOTE: As this is a **breaking change**, in order to upgrade you will need to pass the `with parameters` required by the shop to function correctly!_
1636
-
1637
- ### Minor Changes
1638
-
1639
- - Support optionally dropping MD5 and the crypto-js dependency
1640
- When `process.env.SFC_OMIT_MD5` is `true`, the md5 function will be replaced with an empty stub. If you do not use the MD5 hash at all this can be used to reduce bundle sizes.
1641
-
1642
- In `nuxt.config.js` add
1643
-
1644
- ```js
1645
- env: {
1646
- SFC_OMIT_MD5: true
1647
- }
1648
- ```
1649
-
1650
- or if you want to control it from a `.env`
1651
-
1652
- ```js
1653
- env: {
1654
- SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
1655
- }
1656
- ```
1657
-
1658
- - **Improvement**: Overall code enhancement within `storefront-core` package in favor of reducing the cognitive complexity and increasing maintainability
1659
- - Introduce `autobind` helper
1660
- - Refactor `cached` file
1661
-
1662
- ### Patch Changes
1663
-
1664
- - **Bugfix**: Resolve incompatibility with Webpack 4-based build processes
1665
-
1666
- ## 7.0.0-alpha.3
1667
-
1668
- ### Major Changes
1669
-
1670
- - Changes to hash utils:
1671
- - `hmac`, `verifyToken`, `buildSignature` functions are now async
1672
- - hash functions are no longer exported from `utils/index`. They must be imported from `utils/hash`
1673
- - `sha256` function added
1674
- - `sha256` is used for default cache keys instead of `md5`
1675
- - Support sha256 for basket and wishlist keys
1676
-
1677
- The `appKeys.isHashed` config option has been renamed to `appKeys.hashAlgorithm`. Instead of a boolean, there are now three options.
1678
-
1679
- - `'sha256'` Use the `sha256` function for hashing basket and wishlist keys
1680
- - `'md5'` Use the `md5` function for hashing basket and wishlist keys (Equivalent to `isHashed: true` in v6)
1681
- - `null` Do not hash basket and wishlist keys (Equivalent to `isHashed: false` in v6)
1682
-
1683
- ### Minor Changes
1684
-
1685
- - Support optionally dropping MD5 and the crypto-js dependency
1686
- When `process.env.SFC_OMIT_MD5` is `true`, the md5 function will be replaced with an empty stub. If you do not use the MD5 hash at all this can be used to reduce bundle sizes.
1687
-
1688
- In `nuxt.config.js` add
1689
-
1690
- ```js
1691
- env: {
1692
- SFC_OMIT_MD5: true
1693
- }
1694
- ```
1695
-
1696
- or if you want to control it from a `.env`
1697
-
1698
- ```js
1699
- env: {
1700
- SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
1701
- }
1702
- ```
1703
-
1704
- ## 7.0.0-alpha.2
1705
-
1706
- ### Patch Changes
1707
-
1708
- - **Bugfix**: Resolve incompatibility with Webpack 4-based build processes
1709
-
1710
- ## 7.0.0-alpha.1
1711
-
1712
- ### Major Changes
1713
-
1714
- - **Redis optimizations**
1715
- Reduce memory usage by replacing `with parameters` from fetching all attributes and fetching minimum attributes required to run the demo shop.
1716
- _NOTE: As this is a **breaking change**, in order to upgrade you will need to pass the `with parameters` required by the shop to function correctly!_
1717
-
1718
- ### Minor Changes
1719
-
1720
- - **Improvement**: Overall code enhancement within `storefront-core` package in favor of reducing the cognitive complexity and increasing maintainability
1721
- - Introduce `autobind` helper
1722
- - Refactor `cached` file
1723
-
1724
- ## 7.0.0-alpha.0
1725
-
1726
- ### Major Changes
1727
-
1728
- - **Changes to basket and wishlist functions**
1729
-
1730
- Going forward, the only way to specify `with` and `pricePromotionKey` for the basket is pass them to `useBasketWithParams()`.
1731
- They can no longer be overridden when calling `basket.addItem()`, `basket.removeItem()` and `basket.fetch()`.
1732
-
1733
- The only way to specify `pricePromotionKey` for the wishlist is to pass them to `useWishlistWithParams()`.
1734
- They can no longer be overridden when calling `wishlist.addItem()`, `wishlist.removeItem()`, `wishlist.toggleItem()` and `wishlist.fetch()`.
1735
-
1736
- - **Removed deprecated functions and values**
1737
-
1738
- - `user.fetch()` User is fetched automatically. If you want to refresh the user, use `user.refresh()`
1739
- - `user.forceRefreshUser()` Use `user.refresh()` instead.
1740
- - `useUser()` Use `useUserWithParams()` instead.
1741
- - `useBasket()` Use `useBasketWithParams()` instead.
1742
- - `useWishlist()` Use `useWishlistWithParams()` instead.
1743
- - `ShopUser.emailHash` Hash the email on shop side instead.
1744
- - `wishlist.contains()` Use `wishlist.findItem()` instead.
1745
- - `applyFilter()` Use `applyFilters()` instead.
1746
- - `Log.attachToNuxtContext()` Use `inject('log', log)` in your plugin instead.
1747
- - `Log.attachToWindow()` Use `Log.default = log` instead.
1748
- - `sortingValues` Use `getSortingValues()` instead.
1749
-
1750
- - **Changed NPM package names**
1751
-
1752
- - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-nuxt` to `@scayle/storefront-nuxt2`
1753
- - **Breaking**: Change package scope and name of `@aboutyou/sfc-nuxt3` to `@scayle/storefront-nuxt`
1754
- - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-lib` to `@scayle/storefront-core``
1755
- - **Breaking**: Change package scope and name of `@aboutyou/eslint-config-sfc` to `@scayle/eslint-config-storefront`
1756
- - **Breaking**: Change package scope and name of `@aboutyou/prettier-config-sfc` to `@scayle/prettier-config-storefront`
1757
-
1758
- Due to the changes of the NPM package scope from `@aboutyou` to `@scayle`,
1759
- it is required to change the consuming projects local `.npmrc` file as follows:
1760
-
1761
- - Before: `@aboutyou:registry=https://gitlab.com/api/v4/packages/npm/`
1762
- - After: `@scayle:registry=https://gitlab.com/api/v4/packages/npm/`
1763
-
1764
- - `isEmpty`, `isEqual`, `pluck` and `copyTo` object helpers are removed. (Recommendation: It would be good to use native utils or `radash` within the project locally)
1765
- - Remove the deprecated pino-based logger. For more information, please check out the "Logging"-section in README.md.
1766
- - Minimum node version is 18.15.0
1767
- - Remove the basic auth module
1768
-
1769
- ## 6.8.0
1770
-
1771
- ### Minor Changes
1772
-
1773
- - Adds ability to ignore shop locale if passed to the breadcrumb helper. The shop needs to provide its locale using `$currentShop.locale`
1774
-
1775
- ## 6.7.1
1776
-
1777
- ### Patch Changes
1778
-
1779
- - **Bugfix**: move `CACHE_TIMEOUT` to dedicated file for reexport, instead of `cache/providers/redis.ts`, to avoid buildtime errors in nuxt2 package.
1780
-
1781
- ## 6.7.0
1782
-
1783
- ### Minor Changes
1784
-
1785
- - **Deps**: updated `@aboutyou/backbone` to `v15.3.0`
1786
-
1787
- ## 6.6.16
1788
-
1789
- ### Patch Changes
1790
-
1791
- - _Cache_: reduce redis cache timeout from 5000ms to 500ms
1792
-
1793
- ## 6.6.15
1794
-
1795
- ### Patch Changes
1796
-
1797
- - _Cache_: introduce shared redis `CACHE_TIMEOUT` constant across shared packages
1798
- - _Cache_: Increase redis `get` timeout from `300ms` to `5000ms` to account for longer taking redis responses