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