@scayle/storefront-core 8.62.2 → 8.62.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 8.62.3
4
+
5
+ ### Patch Changes
6
+
7
+ - **\[Filters\]** Fixed `getFilters` RPC not forwarding `pricePromotionKey`, so sale, price, and savings-percentage filter values could diverge from `getProductsByCategory` for the same query.
8
+
3
9
  ## 8.62.2
4
10
 
5
11
  No changes in this release.
@@ -41,7 +41,7 @@ export const getCheckoutToken = defineRpcHandler(
41
41
  ...customData,
42
42
  ...orderCustomData
43
43
  }
44
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.62.2"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
44
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.62.3"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
45
45
  return {
46
46
  accessToken: refreshedAccessToken,
47
47
  checkoutJwt
@@ -144,6 +144,7 @@ export declare const fetchAllFiltersForCategory: RpcHandler<{
144
144
  * @param params.where.disableFuzziness Whether to disable fuzziness.
145
145
  * @param params.includeSoldOut Whether to include sold out products.
146
146
  * @param params.includeSellableForFree Whether to include products sellable for free.
147
+ * @param params.pricePromotionKey Price promotion key for pricing-aware filter values.
147
148
  * @param params.orFiltersOperator The operator for OR filters.
148
149
  * @param context The RPC context.
149
150
  *
@@ -194,7 +194,8 @@ export const getFilters = defineRpcHandler(
194
194
  where = void 0,
195
195
  includeSoldOut = false,
196
196
  includeSellableForFree = false,
197
- orFiltersOperator
197
+ orFiltersOperator,
198
+ pricePromotionKey
198
199
  } = params;
199
200
  const { cached, sapiClient } = context;
200
201
  const campaignKey = await context.callRpc?.("getCampaignKey");
@@ -231,6 +232,7 @@ export const getFilters = defineRpcHandler(
231
232
  includeSoldOut,
232
233
  includeSellableForFree,
233
234
  campaignKey,
235
+ pricePromotionKey,
234
236
  including: includedFilters,
235
237
  orFiltersOperator
236
238
  }),
@@ -51,6 +51,8 @@ export type FetchFiltersParams = {
51
51
  };
52
52
  includeSoldOut?: boolean;
53
53
  includeSellableForFree?: boolean;
54
+ /** Price promotion key for pricing-aware filter values. */
55
+ pricePromotionKey?: string;
54
56
  /** or operator for filters */
55
57
  orFiltersOperator?: ProductsSearchEndpointParameters['orFiltersOperator'];
56
58
  } & ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.62.2",
3
+ "version": "8.62.3",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "fishery": "^2.2.3"
42
42
  },
43
43
  "dependencies": {
44
- "@scayle/storefront-api": "^19.1.2",
44
+ "@scayle/storefront-api": "^19.2.1",
45
45
  "@scayle/unstorage-scayle-kv-driver": "^2.1.0",
46
46
  "crypto-js": "^4.2.0",
47
47
  "hookable": "^5.5.3",