@scayle/storefront-core 8.14.1 → 8.14.3

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.
@@ -0,0 +1,1243 @@
1
+ # @scayle/storefront-core (v7)
2
+
3
+ This changelog contains all changes of `@scayle/storefront-core` above v6.0.0 and below v7.0.0.
4
+
5
+ ## 7.69.3
6
+
7
+ ### Patch Changes
8
+
9
+ **Dependencies**
10
+
11
+ - Updated dependency to @scayle/storefront-api@17.13.0
12
+
13
+ ## 7.69.2
14
+
15
+ ### Patch Changes
16
+
17
+ **Dependencies**
18
+
19
+ - Updated dependency to @scayle/storefront-api@17.12.0
20
+
21
+ ## 7.69.1
22
+
23
+ ### Patch Changes
24
+
25
+ - Extend `FetchProductsByCategoryParams` type to support `trackSearchAnalyticsEvent?: boolean`
26
+ - Allow passing of the `trackSearchAnalyticsEvent` parameter into the `getProductsByCategory` RPC method.
27
+ **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`).
28
+ 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.
29
+
30
+ ## 7.69.0
31
+
32
+ ### Minor Changes
33
+
34
+ - 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`.
35
+
36
+ ### Patch Changes
37
+
38
+ **Dependencies**
39
+
40
+ - Updated dependency to @scayle/storefront-api@17.11.0
41
+
42
+ ## 7.68.0
43
+
44
+ ### Minor Changes
45
+
46
+ - Set `sapiClient` in `RpcContext` as required to improve the updatability of RPC methods.
47
+
48
+ ## 7.67.1
49
+
50
+ ### Patch Changes
51
+
52
+ **Dependencies**
53
+
54
+ - Updated dependency to @scayle/storefront-api@17.10.1
55
+
56
+ ## 7.67.0
57
+
58
+ ### Minor Changes
59
+
60
+ - Expose SAPI test factories externally
61
+
62
+ ## 7.66.7
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependency `@scayle/storefront-api@17.9.5` to `@scayle/storefront-api@17.10.0`
67
+
68
+ ## 7.66.6
69
+
70
+ ### Patch Changes
71
+
72
+ **Dependencies**
73
+
74
+ - Updated dependency to @scayle/storefront-api@17.10.0
75
+
76
+ ## 7.66.5
77
+
78
+ ### Patch Changes
79
+
80
+ - Merging wishlists now retains the `variantId`, `itemGroup` and `customData` when present on the source wishlist item.
81
+
82
+ ## 7.66.4
83
+
84
+ ### Patch Changes
85
+
86
+ **Dependencies**
87
+
88
+ - Updated dependency to @scayle/storefront-api@17.9.5
89
+
90
+ ## 7.66.3
91
+
92
+ ### Patch Changes
93
+
94
+ - Response objects with an error status code should not be cached
95
+
96
+ ## 7.66.2
97
+
98
+ ### Patch Changes
99
+
100
+ **Dependencies**
101
+
102
+ - Updated dependency to @scayle/storefront-api@17.9.4
103
+
104
+ ## 7.66.1
105
+
106
+ ### Patch Changes
107
+
108
+ **Dependencies**
109
+
110
+ - Updated dependency to @scayle/storefront-api@17.9.3
111
+
112
+ ## 7.66.0
113
+
114
+ ### Minor Changes
115
+
116
+ - Add `fetchNavigationTreeByName` rpc.
117
+
118
+ ### Patch Changes
119
+
120
+ **Dependencies**
121
+
122
+ - Updated dependency to @scayle/storefront-api@17.9.2
123
+
124
+ ## 7.65.11
125
+
126
+ ### Patch Changes
127
+
128
+ - Export `NavigationItemSuggestion` type
129
+ **Dependencies**
130
+
131
+ - Updated dependency to @scayle/storefront-api@17.9.1
132
+
133
+ ## 7.65.10
134
+
135
+ ### Patch Changes
136
+
137
+ **Dependencies**
138
+
139
+ - Updated dependency to @scayle/storefront-api@17.9.0
140
+
141
+ ## 7.65.9
142
+
143
+ ### Patch Changes
144
+
145
+ **Dependencies**
146
+
147
+ - Updated dependency to @scayle/storefront-api@17.8.1
148
+
149
+ ## 7.65.8
150
+
151
+ ### Patch Changes
152
+
153
+ - 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
154
+
155
+ ## 7.65.7
156
+
157
+ ### Patch Changes
158
+
159
+ - Delete `refreshToken` if it fails to refresh the access token
160
+
161
+ ## 7.65.6
162
+
163
+ ### Patch Changes
164
+
165
+ - Resolved an issue where the `cache` value from parameters was being unintentionally overwritten by the default value for `getProductsByCategory` rpc.
166
+
167
+ ## 7.65.5
168
+
169
+ ### Patch Changes
170
+
171
+ - Support passing an internal access header
172
+ - Make `getProductsCount`, `getFilters` and `getProductsByCategory` RPC methods handle their parameters consistently
173
+ **Dependencies**
174
+
175
+ - Updated dependency to @scayle/storefront-api@17.8.0
176
+
177
+ ## 7.65.4
178
+
179
+ ### Patch Changes
180
+
181
+ - Restore filtered list of error status codes in `oauthLogin` (400, 404) `oauthRegister` (400, 409, 422) and `oauthGuestLogin` (400, 409)
182
+
183
+ ## 7.65.3
184
+
185
+ ### Patch Changes
186
+
187
+ - Fix the `getFilters` RPC method not considering `includeSellableForFree` when calculating the product count
188
+
189
+ ## 7.65.2
190
+
191
+ ### Patch Changes
192
+
193
+ **Dependencies**
194
+
195
+ - Updated dependency to @scayle/storefront-api@17.7.0
196
+
197
+ ## 7.65.1
198
+
199
+ ### Patch Changes
200
+
201
+ - Fix regression in product RPC methods where the categoryId may not be resolved from the category path
202
+
203
+ ## 7.65.0
204
+
205
+ ### Minor Changes
206
+
207
+ - Improves the handling of `getOrderDataByCbd` RPC to return descriptive errors in case the validation of the token fails.
208
+
209
+ In case the token can't be validated using the Checkout Secret, this is now returned and a warning on the server is logged.
210
+
211
+ If the token has expired, this is now also returned and logged on the server.
212
+
213
+ - Support passing `categoryId` as an alternative to the category path in `getProductsByCategory` and `getFilters`
214
+
215
+ ### Patch Changes
216
+
217
+ - Fixed cached fallback ttl to be used only if passed `option.ttl` is undefined
218
+
219
+ ## 7.64.4
220
+
221
+ ### Patch Changes
222
+
223
+ - Replaced `radash` utils with custom native implementations
224
+
225
+ ## 7.64.3
226
+
227
+ ### Patch Changes
228
+
229
+ - Add support for `orderCustomData` on the basket endpoints
230
+ - Updated dependencies
231
+ - @scayle/storefront-api@17.6.0
232
+
233
+ ## 7.64.2
234
+
235
+ ### Patch Changes
236
+
237
+ - Add more specific return type for `getFlattenedMaterialComposition`
238
+
239
+ ## 7.64.1
240
+
241
+ ### Patch Changes
242
+
243
+ - Updated dependencies
244
+ - @scayle/storefront-api@17.5.0
245
+
246
+ ## 7.64.0
247
+
248
+ ### Minor Changes
249
+
250
+ - Resolve a issue that prevents filters from working as expected on the search page
251
+
252
+ ### Patch Changes
253
+
254
+ - Updated dependencies
255
+ - @scayle/storefront-api@17.4.4
256
+
257
+ ## 7.63.1
258
+
259
+ ### Patch Changes
260
+
261
+ - Updated dependencies
262
+ - @scayle/storefront-api@17.4.3
263
+
264
+ ## 7.63.0
265
+
266
+ ### Minor Changes
267
+
268
+ - Deprecate `RpcContext.storeCampaignKeyword`
269
+
270
+ ## 7.62.0
271
+
272
+ ### Minor Changes
273
+
274
+ - Return `ErrorResponse` from RPC when Session is missing
275
+
276
+ ## 7.61.0
277
+
278
+ ### Minor Changes
279
+
280
+ - Add `sapiClient: StorefrontAPIClient` to `RpcContext`
281
+
282
+ Deprecate `bapiClient` in favour of `sapiClient`
283
+
284
+ ## 7.60.1
285
+
286
+ ### Patch Changes
287
+
288
+ - Updated dependencies
289
+ - @scayle/storefront-api@17.4.2
290
+
291
+ ## 7.60.0
292
+
293
+ ### Minor Changes
294
+
295
+ - Instead of throwing errors, RPCs will now return an `ErrorResponse` object conforming to [RFC9457](https://datatracker.ietf.org/doc/html/rfc9457).
296
+
297
+ In addition to this change, existing RPCs have been reviewed and updated to return more accurate and descriptive HTTP status codes.
298
+
299
+ 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.
300
+
301
+ **Action Required:**
302
+
303
+ 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.
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies
308
+ - @scayle/storefront-api@17.4.1
309
+
310
+ ## 7.59.2
311
+
312
+ ### Patch Changes
313
+
314
+ - 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
315
+
316
+ ## 7.59.1
317
+
318
+ ### Patch Changes
319
+
320
+ - Updated dependencies
321
+ - @scayle/storefront-api@17.4.0
322
+
323
+ ## 7.59.0
324
+
325
+ ### Minor Changes
326
+
327
+ - Add `storefront:afterLogin` and `storefront:afterLogout` hooks to the respective RPC.
328
+
329
+ Add `callHook`, `callHookParallel` and `callHookWith` types to `RpcContext`
330
+
331
+ ## 7.58.3
332
+
333
+ ### Patch Changes
334
+
335
+ - Upgrades to the new Wishlist from @scayle/storefront-api
336
+ - `getDefaultFractionDigits` will return 2 if `maximumFractionDigits` is not defined
337
+ - Updated dependencies
338
+ - @scayle/storefront-api@17.3.0
339
+
340
+ ## 7.58.2
341
+
342
+ ### Patch Changes
343
+
344
+ - Adds the `X-Shop-Id` header to the request when revoking an access token.
345
+
346
+ ## 7.58.1
347
+
348
+ ### Patch Changes
349
+
350
+ - Fixed an issue by respecting `forceTokenRefresh` flag when calling the `getAccessToken` RPC
351
+
352
+ ## 7.58.0
353
+
354
+ ### Minor Changes
355
+
356
+ - Deprecate `storefrontAccessToken` of `UserAuthentication`. Use `getAccessToken` RPC to get a valid access token instead.
357
+ Deprecated `loginShopId`. `loginShopId` is no longer needed, because each shop now has its own session cookie.
358
+ - Add `getAccessToken` RPC to retrieve refreshed access tokens
359
+
360
+ ## 7.57.0
361
+
362
+ ### Minor Changes
363
+
364
+ - Expose `properties` with option for each category RPC method payload
365
+
366
+ ## 7.56.0
367
+
368
+ ### Minor Changes
369
+
370
+ - Add refresh token logic to customer API client
371
+
372
+ ### Patch Changes
373
+
374
+ - Ensure `user.storefrontAccessToken` is up to date when calling the `getUser` RPC
375
+
376
+ ## 7.55.0
377
+
378
+ ### Minor Changes
379
+
380
+ - Allow disabling the `HashAlgorithm` by setting its value to `none` within a shop config.
381
+ - Added exports for `ProductSortConfig` type and enums `APISortOption` and `APISortOrder`.
382
+
383
+ ## 7.54.0
384
+
385
+ ### Minor Changes
386
+
387
+ - Add new function `purifySensitiveValue` to `sanitizationHelpers` to purify specific value.
388
+ - Introduced a new parameter `showFirstAndLastChar` to both `purifySensitiveValue` and `purifySensitiveData`.
389
+
390
+ ## 7.53.0
391
+
392
+ ### Minor Changes
393
+
394
+ - 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.
395
+
396
+ ### Patch Changes
397
+
398
+ - Removes option `considerItemGroupForUniqueness` from `addItemsToBasket` since this is now enabled by default.
399
+ - Updated dependencies
400
+ - @scayle/storefront-api@17.2.0
401
+
402
+ ## 7.52.1
403
+
404
+ ### Patch Changes
405
+
406
+ - Fix `getWishlist` falling back to basket `withParams` instead of wishlist `withParams`
407
+
408
+ ## 7.52.0
409
+
410
+ ### Minor Changes
411
+
412
+ - Add `getCheckoutToken` RPC, which provides access token and checkout JWT needed by the checkout web component.
413
+
414
+ ## 7.51.1
415
+
416
+ ### Patch Changes
417
+
418
+ - Update `ShopConfiguration` types
419
+ - Updated dependencies
420
+ - @scayle/storefront-api@17.1.0
421
+
422
+ ## 7.51.0
423
+
424
+ ### Minor Changes
425
+
426
+ - Allow extending the `RpcContext` type by augmenting the `AdditionalRpcContext` interface.
427
+
428
+ ## 7.50.1
429
+
430
+ ### Patch Changes
431
+
432
+ - Add missing `BuyXGetYEffect` and `AutomaticDiscountEffect` exports
433
+ - Updated dependencies
434
+ - @scayle/storefront-api@17.0.1
435
+
436
+ ## 7.50.0
437
+
438
+ ### Minor Changes
439
+
440
+ - Upgraded to `@scayle/storefront-api@v17.0.0` and replaced `@aboutyou/backbone`
441
+
442
+ Noticeable changes are:
443
+
444
+ - Rename `BapiClient` to `StorefrontAPIClient`
445
+ - Removed basic auth support from `initBapi`
446
+
447
+ ## 7.49.4
448
+
449
+ ### Patch Changes
450
+
451
+ - Deprecate the `getBadgeLabel` function since this is application specific code and translations should be handled per project
452
+
453
+ ## 7.49.3
454
+
455
+ ### Patch Changes
456
+
457
+ - Updated dependencies
458
+ - @aboutyou/backbone@16.3.0
459
+
460
+ ## 7.49.2
461
+
462
+ ### Patch Changes
463
+
464
+ - Fixed a bug where the `addItemToWishlist` RPC method returned an empty response upon failure.
465
+ - Updated dependencies
466
+ - @aboutyou/backbone@16.2.2
467
+
468
+ ## 7.49.1
469
+
470
+ ### Patch Changes
471
+
472
+ - Fix accidental rename of `getFlattenedVariantCrosssellings` in the previous release
473
+
474
+ ## 7.49.0
475
+
476
+ ### Minor Changes
477
+
478
+ - Add optional `state` attribute to order address for US addresses
479
+
480
+ ### Patch Changes
481
+
482
+ - Add better type support for `getFlattenedVariantCrosssellings` with generic type
483
+
484
+ ## 7.48.2
485
+
486
+ ### Patch Changes
487
+
488
+ - Fixes an issue where the `refreshToken` was not exposed on the `RPCContext` even if the user is logged in.
489
+
490
+ ## 7.48.1
491
+
492
+ ### Patch Changes
493
+
494
+ - Updated `purifySensitiveData` to ensure that empty secrets are logged as empty strings, enhancing clarity in logged configurations.
495
+
496
+ ## 7.48.0
497
+
498
+ ### Minor Changes
499
+
500
+ - Add support for dynamically adding query parameters to the IDP redirect callback URLs to be read back when the user returns from the IDP.
501
+
502
+ ```ts
503
+ const { data: externalIDPRedirects } = await useIDP({
504
+ queryParams: { redirectTo: '/account' },
505
+ })
506
+ ```
507
+
508
+ Please note that `code` and `state` are not supported as these are used by the SCAYLE Authentication API.
509
+
510
+ ### Patch Changes
511
+
512
+ - Added merge basket and merge wishlist functionality after login with IDP
513
+ - Updated dependencies
514
+ - @aboutyou/backbone@16.2.1
515
+
516
+ ## 7.47.0
517
+
518
+ ### Minor Changes
519
+
520
+ - Add `resolveSearch` and `getSearchSuggestions` RPC methods
521
+
522
+ ## 7.46.1
523
+
524
+ ### Patch Changes
525
+
526
+ - Revert breaking change in `handleIDPLoginCallback` signature
527
+
528
+ ## 7.46.0
529
+
530
+ ### Minor Changes
531
+
532
+ - Add new RPC method `getProductsByReferenceKeys`
533
+
534
+ ## 7.45.0
535
+
536
+ ### Minor Changes
537
+
538
+ - 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.
539
+
540
+ You can use this pattern in your own custom RPC methods as well.
541
+
542
+ For example:
543
+
544
+ ```ts
545
+ export const custom: RpcHandler<{ shop: number }> = (
546
+ context: RpcContext,
547
+ ) => {
548
+ return {
549
+ shop: context.shopId,
550
+ }
551
+ }
552
+ ```
553
+
554
+ ```ts
555
+ export const custom = (
556
+ context: RpcContext,
557
+ ) => {
558
+ return {
559
+ shop: context.shopId,
560
+ }
561
+ } satisfies RpcHandler<{ shop: number }>
562
+ ```
563
+
564
+ 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.
565
+
566
+ ## 7.44.1
567
+
568
+ ### Patch Changes
569
+
570
+ - Updated dependencies
571
+ - @aboutyou/backbone@16.2.0
572
+
573
+ ## 7.44.0
574
+
575
+ ### Minor Changes
576
+
577
+ - Expose the `loginWithIDP` function from the `useSession` composable.
578
+ - Changes the signature of `handleIDPLoginCallback` to receive an object with the code inside instead of just the code for improved logging behavior.
579
+
580
+ ## 7.43.0
581
+
582
+ ### Minor Changes
583
+
584
+ - Add `createAndPurifyHeaders` sanitization helper
585
+
586
+ ## 7.42.1
587
+
588
+ ### Patch Changes
589
+
590
+ - Fix usage of the same cache key prefix for `getCategoryByPath`
591
+
592
+ ## 7.42.0
593
+
594
+ ### Minor Changes
595
+
596
+ - Add `getCategoryByPath` RPC method
597
+
598
+ ## 7.41.3
599
+
600
+ ### Patch Changes
601
+
602
+ - Fix lost session if user refresh is called while not logged in
603
+
604
+ ## 7.41.2
605
+
606
+ ### Patch Changes
607
+
608
+ - Updated dependencies
609
+ - @aboutyou/backbone@16.1.2
610
+
611
+ ## 7.41.1
612
+
613
+ ### Patch Changes
614
+
615
+ - Fixes an issue where we were trying to read siblings information from a product where the data was not available
616
+
617
+ ## 7.41.0
618
+
619
+ ### Minor Changes
620
+
621
+ - Add `purifySensitiveData` sanitization helper
622
+
623
+ ## 7.40.1
624
+
625
+ ### Patch Changes
626
+
627
+ - patch accessToken on refreshUser RPC Method
628
+
629
+ ## 7.40.0
630
+
631
+ ### Minor Changes
632
+
633
+ - Export Campaign types from @aboutyou/backbone
634
+
635
+ ## 7.39.1
636
+
637
+ ### Patch Changes
638
+
639
+ - Persist accessToken to user.authentication
640
+
641
+ ## 7.39.0
642
+
643
+ ### Minor Changes
644
+
645
+ - Add `sortable` option to `groupFilterableValuesByKey` filter helper
646
+ - Add `sortable` option to `getGroupedFilterableValues` to provide the ability for custom sorting implementation for specific filtersGroups
647
+ - Authentication RPC methods include status codes in error cases
648
+
649
+ ## 7.38.1
650
+
651
+ ### Patch Changes
652
+
653
+ - Fix potential empty user after login
654
+
655
+ ## 7.38.0
656
+
657
+ ### Minor Changes
658
+
659
+ - Allow the session of an `RpcContext` to be undefined
660
+
661
+ BREAKING: This changes the structure of the `RpcContext`, so it may be a breaking change if you have written custom RPC methods.
662
+
663
+ 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.
664
+
665
+ 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.
666
+
667
+ ## 7.37.0
668
+
669
+ ### Minor Changes
670
+
671
+ - Update dependency `jose` to the latest `5.2.0` version
672
+
673
+ ## 7.36.0
674
+
675
+ ### Minor Changes
676
+
677
+ - Support `Response` returns in RPC methods
678
+ - Handle 401 from CO and delete session
679
+
680
+ ## 7.35.0
681
+
682
+ ### Minor Changes
683
+
684
+ - Change `oauthForgetPassword` payload signature to accept `email` only
685
+
686
+ ## 7.34.1
687
+
688
+ ### Patch Changes
689
+
690
+ - Fix type errors
691
+
692
+ ## 7.34.0
693
+
694
+ ### Minor Changes
695
+
696
+ - We added support for Identity Provider (IDP), enhancing our authentication and identity management capabilities.
697
+
698
+ ## 7.33.0
699
+
700
+ ### Minor Changes
701
+
702
+ - Previously the caching time for product RPCs was one hour which could easily lead to outdated product information for a long time.
703
+
704
+ The `getProductById` and `getProductsByIds` RPCs are now cached for 5 Minutes and `getProductsByCategory` is now cached for 15 Minutes.
705
+
706
+ ## 7.32.0
707
+
708
+ ### Minor Changes
709
+
710
+ - Use new password change API when oauth is enabled
711
+
712
+ ## 7.31.0
713
+
714
+ ### Minor Changes
715
+
716
+ - Update SAPI SDK to v16
717
+
718
+ ### Patch Changes
719
+
720
+ - Fix filter helper to not return null values
721
+
722
+ ## 7.30.0
723
+
724
+ ### Minor Changes
725
+
726
+ - Allow `null` values for `promotionId` within the basket payload
727
+
728
+ ## 7.29.0
729
+
730
+ ### Minor Changes
731
+
732
+ - Remove basic `gzip` compression in custom `unstorage` caching interface in favor of custom `@scayle/unstorage-compression-driver`
733
+
734
+ ## 7.28.2
735
+
736
+ ### Patch Changes
737
+
738
+ - `fetchUser` and `refreshUser` are now proper RPC methods
739
+ - Fix parsing error from authentication service
740
+ - Use a common API client for interacting with Checkout Customer API
741
+
742
+ ## 7.28.1
743
+
744
+ ### Patch Changes
745
+
746
+ - Types: shop_id should be optional in updatePasswordByHash
747
+
748
+ ## 7.28.0
749
+
750
+ ### Minor Changes
751
+
752
+ - Use native fetch instead of axios
753
+
754
+ ## 7.27.0
755
+
756
+ ### Minor Changes
757
+
758
+ - Introduce gzip-based compression for unstorage cache interface
759
+ - Upgrade package `@aboutyou/backbone`to `v15.14.3`
760
+
761
+ ## 7.26.0
762
+
763
+ ### Minor Changes
764
+
765
+ - Don't return oauth tokens from RPC methods
766
+
767
+ ## 7.25.1
768
+
769
+ ### Patch Changes
770
+
771
+ - Cache purging should not remove unrelated keys
772
+
773
+ ## 7.25.0
774
+
775
+ ### Minor Changes
776
+
777
+ - Add `PromotionEffectType` constant and type
778
+
779
+ ## 7.24.1
780
+
781
+ ### Patch Changes
782
+
783
+ - Forbid saving `null` and `undefined` results to the cache
784
+
785
+ ## 7.24.0
786
+
787
+ ### Minor Changes
788
+
789
+ - Remove `sanitize` helper function and jsdom dependency
790
+
791
+ ## 7.23.0
792
+
793
+ ### Minor Changes
794
+
795
+ - Add `runtimeConfiguration` property to the `RPCContext`
796
+
797
+ ## 7.22.1
798
+
799
+ ### Patch Changes
800
+
801
+ - Add license file
802
+
803
+ ## 7.22.0
804
+
805
+ ### Minor Changes
806
+
807
+ - Upgrade package `@aboutyou/backbone`to `v15.14.1`
808
+
809
+ ## 7.21.0
810
+
811
+ ### Minor Changes
812
+
813
+ - Add `promotion` RPC methods and types
814
+ - Add promotion data within the basket payloads
815
+
816
+ ### Patch Changes
817
+
818
+ - Fix product URL generation, remove additional special characters that can break routing
819
+
820
+ ## 7.20.0
821
+
822
+ ### Minor Changes
823
+
824
+ - Upgrade backbone to the `v15.12.1`
825
+
826
+ ## 7.19.1
827
+
828
+ ### Patch Changes
829
+
830
+ - The `auth` config is optional
831
+
832
+ ## 7.19.0
833
+
834
+ ### Minor Changes
835
+
836
+ - Support setting default `with` params in the module options
837
+
838
+ ## 7.18.0
839
+
840
+ ### Minor Changes
841
+
842
+ - Expose error codes from BAPI for the basket rpc methods
843
+
844
+ ## 7.17.0
845
+
846
+ ### Minor Changes
847
+
848
+ - Limit perPage for getBrands and getProductsByCategory to 100
849
+
850
+ ## 7.16.0
851
+
852
+ ### Minor Changes
853
+
854
+ - Support expiring CBD tokens
855
+
856
+ ## 7.15.1
857
+
858
+ ### Patch Changes
859
+
860
+ - Remove unnecessary dependencies
861
+
862
+ ## 7.15.0
863
+
864
+ ### Minor Changes
865
+
866
+ - Support importing all dist/ files directly
867
+
868
+ ## 7.14.3
869
+
870
+ ### Patch Changes
871
+
872
+ - Import fix
873
+
874
+ ## 7.14.2
875
+
876
+ ### Patch Changes
877
+
878
+ - Make redis an optional dependency
879
+
880
+ ## 7.14.1
881
+
882
+ ### Patch Changes
883
+
884
+ - Remove unused body-parser dependency
885
+
886
+ ## 7.14.0
887
+
888
+ ### Minor Changes
889
+
890
+ - Read OAuth settings from the RpcContext
891
+
892
+ ## 7.13.0
893
+
894
+ ### Minor Changes
895
+
896
+ - Save user to session during login/register process. This will fix wrong wishlist/basket keys, in the RpcContext, after the login/registering.
897
+ - Safe user to session during login process. This will fix wrong wishlist/basket keys , in the RpcContext, after the login.
898
+
899
+ ## 7.12.2
900
+
901
+ ### Patch Changes
902
+
903
+ - Replace crypto with uncrypto
904
+
905
+ ## 7.12.1
906
+
907
+ ### Patch Changes
908
+
909
+ - Export BapiClient and Redirect from BAPI
910
+
911
+ ## 7.12.0
912
+
913
+ ### Minor Changes
914
+
915
+ - `to` prop of `BreadcrumbItem` returned from `getBreadcrumbsFromPath` now start with `/`
916
+
917
+ ## 7.11.0
918
+
919
+ ### Minor Changes
920
+
921
+ - Move `deserializeFilters` and `serializeFilters` to `@scayle/storefront-core`
922
+
923
+ ## 7.10.2
924
+
925
+ ### Patch Changes
926
+
927
+ - encodeBase64 and decodeBase64 should be able to be run in browser environments
928
+
929
+ ## 7.10.1
930
+
931
+ ### Patch Changes
932
+
933
+ - Get accessToken from getUserRequest on client side.
934
+ Merge basket and wishlist after login/register to logged in user.
935
+
936
+ ## 7.10.0
937
+
938
+ ### Minor Changes
939
+
940
+ - Add the possibility to use Token based authentication.
941
+
942
+ ## 7.9.0
943
+
944
+ ### Minor Changes
945
+
946
+ - Add unstorage cache provider
947
+
948
+ ### Patch Changes
949
+
950
+ - Fix crypto-js imports needed for basked/wishlist key generation.
951
+
952
+ ## 7.8.0
953
+
954
+ ### Minor Changes
955
+
956
+ - provide exports of package as ESM and CJS format
957
+ - Migrate helpers to core package
958
+
959
+ ### Patch Changes
960
+
961
+ - Add `initBapi` function to initialize a BapiClient
962
+
963
+ ## 7.7.1
964
+
965
+ ### Patch Changes
966
+
967
+ - orFiltersOperator should be optional in FetchProductsByCategoryParams and FetchProductsCountParams
968
+
969
+ ## 7.7.0
970
+
971
+ ### Minor Changes
972
+
973
+ - Update @aboutyou/backbone package and add support for `onFiltersOperator` BAPI parameter
974
+
975
+ ## 7.6.1
976
+
977
+ ### Patch Changes
978
+
979
+ - Move keys utils to core package
980
+
981
+ ## 7.6.0
982
+
983
+ ### Minor Changes
984
+
985
+ - Set the domain property in the rpc context
986
+
987
+ ## 7.5.0
988
+
989
+ ### Minor Changes
990
+
991
+ - `refresh()` of `useUser()` and `useUserFacet()` will now clear the session and user state if the checkout returns `HTTP 403 Forbidden`.
992
+ - **Breaking** `destroySession` is now async.
993
+
994
+ ## 7.4.0
995
+
996
+ ### Minor Changes
997
+
998
+ - Add option `includeSellableForFree` to `useFacet` and `useProducts` to include free products.
999
+
1000
+ ## 7.3.1
1001
+
1002
+ ### Patch Changes
1003
+
1004
+ - Move RpcMethodsStorefront type to the nuxt2 package so it's accessible to shops
1005
+
1006
+ ## 7.3.0
1007
+
1008
+ ### Minor Changes
1009
+
1010
+ - Add rpcMethods `getBrand` and `getBrands` & corresponding composables, to make bapi-sdk brand endpoints available.
1011
+
1012
+ ## 7.2.1
1013
+
1014
+ ### Patch Changes
1015
+
1016
+ - Added ability to add basket groups by accepting `itemGroup` in the payload for the rpc method `addItemsToBasket`
1017
+
1018
+ ## 7.2.0
1019
+
1020
+ ### Minor Changes
1021
+
1022
+ - Replaced `enums` with the companion object pattern approach.
1023
+ - Replaced `HttpStatusMessage` number values with the actual message
1024
+ - Exposed `HashAlgorithm` constant with its type and move it to the core
1025
+ - **Breaking:** If you are importing `HashAlgorithm` from `@scayle/storefront-nuxt2` change to importing it from `@scayle/storefront-core`
1026
+
1027
+ ## 7.1.0
1028
+
1029
+ ### Minor Changes
1030
+
1031
+ - Fix `fetchAllFiltersForCategory` caching issue by returning the cached value.
1032
+ - Fix `fetchAllFiltersForCategory` caching issue by returning the cached value.
1033
+
1034
+ ## 7.0.0
1035
+
1036
+ ### Major Changes
1037
+
1038
+ - **Changes to basket and wishlist functions**
1039
+ - Going forward, the only way to specify `with` and `pricePromotionKey` for the basket is by passing them to `useBasketWithParams()`.
1040
+ They can no longer be overridden when calling `basket.addItem()`, `basket.removeItem()` or `basket.fetch()`.
1041
+ - The only way to specify `pricePromotionKey` for the wishlist is by to passing them to `useWishlistWithParams()`.
1042
+ They can no longer be overridden when calling `wishlist.addItem()`, `wishlist.removeItem()`, `wishlist.toggleItem()` or `wishlist.fetch()`.
1043
+ - **Removed deprecated functions and values**
1044
+ - **Removal**: `user.fetch()`
1045
+ - user is fetched automatically. If you want to refresh the user, use `user.refresh()`
1046
+ - **Removal**: `user.forceRefreshUser()`
1047
+ - instead use `user.refresh()`
1048
+ - **Removal**: `useUser()`
1049
+ - instead use `useUserWithParams()`
1050
+ - **Removal**: `useBasket()`
1051
+ - instead use `useBasketWithParams()`
1052
+ - **Removal**: `useWishlist()`
1053
+ - instead use `useWishlistWithParams()`
1054
+ - **Removal**: `ShopUser.emailHash`
1055
+ - instead hash the email address on shop side
1056
+ - **Removal**: `wishlist.contains()`
1057
+ - instead use `wishlist.findItem()`
1058
+ - **Removal**: `applyFilter()`
1059
+ - instead use `applyFilters()`
1060
+ - **Removal**: `Log.attachToNuxtContext()`
1061
+ - instead use `inject('log', log)` in your plugin
1062
+ - **Removal**: `Log.attachToWindow()`
1063
+ - instead use `Log.default = log`
1064
+ - **Removal**: `sortingValues`
1065
+ - instead use `getSortingValues()`
1066
+ - **Changed NPM package names**
1067
+
1068
+ - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-nuxt` to `@scayle/storefront-nuxt2`
1069
+ - **Breaking**: Change package scope and name of `@aboutyou/sfc-nuxt3` to `@scayle/storefront-nuxt`
1070
+ - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-lib` to `@scayle/storefront-core`
1071
+ - **Breaking**: Change package scope and name of `@aboutyou/eslint-config-sfc` to `@scayle/eslint-config-storefront`
1072
+ - **Breaking**: Change package scope and name of `@aboutyou/prettier-config-sfc` to `@scayle/prettier-config-storefront`
1073
+
1074
+ _NOTE: Due to the changes of the NPM package scope from `@aboutyou` to `@scayle`,
1075
+ it is required to change the consuming projects local `.npmrc` file as follows:_
1076
+
1077
+ - Before:
1078
+
1079
+ ```text
1080
+ @aboutyou:registry=https://gitlab.com/api/v4/packages/npm/
1081
+ ```
1082
+
1083
+ - After:
1084
+
1085
+ ```text
1086
+ @aboutyou:registry=https://gitlab.com/api/v4/projects/29746107/packages/npm/
1087
+ @scayle:registry=https://gitlab.com/api/v4/projects/29746107/packages/npm/
1088
+ ```
1089
+
1090
+ - **Removal**: `isEmpty`, `isEqual`, `pluck` and `copyTo` object helpers are removed.
1091
+ _NOTE: We recommend to use native utilities or `radash` within your project!_
1092
+ - **Removal**: Remove the deprecated pino-based logger.
1093
+ _NOTE: For more information, please check out the "Logging"-section in `README.md`._
1094
+ - Changes to hash utils:
1095
+ - `hmac`, `verifyToken`, `buildSignature` functions are now async
1096
+ - hash functions are no longer exported from `utils/index`. They must be imported from `utils/hash`
1097
+ - `sha256` function added
1098
+ - **Breaking**: Minimum `node` version raised to `18.15.0`
1099
+ - `sha256` is used for default cache keys instead of `md5`
1100
+ - **Breaking**: Remove the BasicAuth module
1101
+ - Support sha256 for basket and wishlist keys
1102
+
1103
+ The `appKeys.isHashed` config option has been renamed to `appKeys.hashAlgorithm`. Instead of a boolean, there are now three options.
1104
+
1105
+ - `'sha256'` Use the `sha256` function for hashing basket and wishlist keys
1106
+ - `'md5'` Use the `md5` function for hashing basket and wishlist keys (Equivalent to `isHashed: true` in v6)
1107
+ - `null` Do not hash basket and wishlist keys (Equivalent to `isHashed: false` in v6)
1108
+
1109
+ - **Redis optimizations**
1110
+ Reduce memory usage by replacing `with parameters` from fetching all attributes and fetching minimum attributes required to run the demo shop.
1111
+ _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!_
1112
+
1113
+ ### Minor Changes
1114
+
1115
+ - Support optionally dropping MD5 and the crypto-js dependency
1116
+ 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.
1117
+
1118
+ In `nuxt.config.js` add
1119
+
1120
+ ```js
1121
+ env: {
1122
+ SFC_OMIT_MD5: true
1123
+ }
1124
+ ```
1125
+
1126
+ or if you want to control it from a `.env`
1127
+
1128
+ ```js
1129
+ env: {
1130
+ SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
1131
+ }
1132
+ ```
1133
+
1134
+ - **Improvement**: Overall code enhancement within `storefront-core` package in favor of reducing the cognitive complexity and increasing maintainability
1135
+ - Introduce `autobind` helper
1136
+ - Refactor `cached` file
1137
+
1138
+ ### Patch Changes
1139
+
1140
+ - **Bugfix**: Resolve incompatibility with Webpack 4-based build processes
1141
+
1142
+ ## 7.0.0-alpha.3
1143
+
1144
+ ### Major Changes
1145
+
1146
+ - Changes to hash utils:
1147
+ - `hmac`, `verifyToken`, `buildSignature` functions are now async
1148
+ - hash functions are no longer exported from `utils/index`. They must be imported from `utils/hash`
1149
+ - `sha256` function added
1150
+ - `sha256` is used for default cache keys instead of `md5`
1151
+ - Support sha256 for basket and wishlist keys
1152
+
1153
+ The `appKeys.isHashed` config option has been renamed to `appKeys.hashAlgorithm`. Instead of a boolean, there are now three options.
1154
+
1155
+ - `'sha256'` Use the `sha256` function for hashing basket and wishlist keys
1156
+ - `'md5'` Use the `md5` function for hashing basket and wishlist keys (Equivalent to `isHashed: true` in v6)
1157
+ - `null` Do not hash basket and wishlist keys (Equivalent to `isHashed: false` in v6)
1158
+
1159
+ ### Minor Changes
1160
+
1161
+ - Support optionally dropping MD5 and the crypto-js dependency
1162
+ 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.
1163
+
1164
+ In `nuxt.config.js` add
1165
+
1166
+ ```js
1167
+ env: {
1168
+ SFC_OMIT_MD5: true
1169
+ }
1170
+ ```
1171
+
1172
+ or if you want to control it from a `.env`
1173
+
1174
+ ```js
1175
+ env: {
1176
+ SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
1177
+ }
1178
+ ```
1179
+
1180
+ ## 7.0.0-alpha.2
1181
+
1182
+ ### Patch Changes
1183
+
1184
+ - **Bugfix**: Resolve incompatibility with Webpack 4-based build processes
1185
+
1186
+ ## 7.0.0-alpha.1
1187
+
1188
+ ### Major Changes
1189
+
1190
+ - **Redis optimizations**
1191
+ Reduce memory usage by replacing `with parameters` from fetching all attributes and fetching minimum attributes required to run the demo shop.
1192
+ _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!_
1193
+
1194
+ ### Minor Changes
1195
+
1196
+ - **Improvement**: Overall code enhancement within `storefront-core` package in favor of reducing the cognitive complexity and increasing maintainability
1197
+ - Introduce `autobind` helper
1198
+ - Refactor `cached` file
1199
+
1200
+ ## 7.0.0-alpha.0
1201
+
1202
+ ### Major Changes
1203
+
1204
+ - **Changes to basket and wishlist functions**
1205
+
1206
+ Going forward, the only way to specify `with` and `pricePromotionKey` for the basket is pass them to `useBasketWithParams()`.
1207
+ They can no longer be overridden when calling `basket.addItem()`, `basket.removeItem()` and `basket.fetch()`.
1208
+
1209
+ The only way to specify `pricePromotionKey` for the wishlist is to pass them to `useWishlistWithParams()`.
1210
+ They can no longer be overridden when calling `wishlist.addItem()`, `wishlist.removeItem()`, `wishlist.toggleItem()` and `wishlist.fetch()`.
1211
+
1212
+ - **Removed deprecated functions and values**
1213
+
1214
+ - `user.fetch()` User is fetched automatically. If you want to refresh the user, use `user.refresh()`
1215
+ - `user.forceRefreshUser()` Use `user.refresh()` instead.
1216
+ - `useUser()` Use `useUserWithParams()` instead.
1217
+ - `useBasket()` Use `useBasketWithParams()` instead.
1218
+ - `useWishlist()` Use `useWishlistWithParams()` instead.
1219
+ - `ShopUser.emailHash` Hash the email on shop side instead.
1220
+ - `wishlist.contains()` Use `wishlist.findItem()` instead.
1221
+ - `applyFilter()` Use `applyFilters()` instead.
1222
+ - `Log.attachToNuxtContext()` Use `inject('log', log)` in your plugin instead.
1223
+ - `Log.attachToWindow()` Use `Log.default = log` instead.
1224
+ - `sortingValues` Use `getSortingValues()` instead.
1225
+
1226
+ - **Changed NPM package names**
1227
+
1228
+ - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-nuxt` to `@scayle/storefront-nuxt2`
1229
+ - **Breaking**: Change package scope and name of `@aboutyou/sfc-nuxt3` to `@scayle/storefront-nuxt`
1230
+ - **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-lib` to `@scayle/storefront-core``
1231
+ - **Breaking**: Change package scope and name of `@aboutyou/eslint-config-sfc` to `@scayle/eslint-config-storefront`
1232
+ - **Breaking**: Change package scope and name of `@aboutyou/prettier-config-sfc` to `@scayle/prettier-config-storefront`
1233
+
1234
+ Due to the changes of the NPM package scope from `@aboutyou` to `@scayle`,
1235
+ it is required to change the consuming projects local `.npmrc` file as follows:
1236
+
1237
+ - Before: `@aboutyou:registry=https://gitlab.com/api/v4/packages/npm/`
1238
+ - After: `@scayle:registry=https://gitlab.com/api/v4/packages/npm/`
1239
+
1240
+ - `isEmpty`, `isEqual`, `pluck` and `copyTo` object helpers are removed. (Recommendation: It would be good to use native utils or `radash` within the project locally)
1241
+ - Remove the deprecated pino-based logger. For more information, please check out the "Logging"-section in README.md.
1242
+ - Minimum node version is 18.15.0
1243
+ - Remove the basic auth module