@scayle/storefront-core 8.62.1 → 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,15 @@
|
|
|
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
|
+
|
|
9
|
+
## 8.62.2
|
|
10
|
+
|
|
11
|
+
No changes in this release.
|
|
12
|
+
|
|
3
13
|
## 8.62.1
|
|
4
14
|
|
|
5
15
|
No changes in this release.
|
|
@@ -1570,11 +1580,7 @@ See [Overriding core RPC Methods](https://scayle.dev/en/core-documentation/store
|
|
|
1570
1580
|
} as const
|
|
1571
1581
|
|
|
1572
1582
|
type BadgeLabelParamsKeys =
|
|
1573
|
-
| '
|
|
1574
|
-
| 'isSoldOut'
|
|
1575
|
-
| 'isOnlineOnly'
|
|
1576
|
-
| 'isSustainable'
|
|
1577
|
-
| 'isPremium'
|
|
1583
|
+
'isNew' | 'isSoldOut' | 'isOnlineOnly' | 'isSustainable' | 'isPremium'
|
|
1578
1584
|
type BadgeLabelParams = Partial<Record<BadgeLabelParamsKeys, boolean>>
|
|
1579
1585
|
|
|
1580
1586
|
const getBadgeLabel = (params: BadgeLabelParams = {}): string => {
|
|
@@ -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.
|
|
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.
|
|
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
|
|
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",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"@types/node": "24.12.2",
|
|
58
58
|
"@types/webpack-env": "1.18.8",
|
|
59
59
|
"@vitest/coverage-v8": "4.1.9",
|
|
60
|
-
"eslint-formatter-gitlab": "7.
|
|
61
|
-
"eslint": "10.
|
|
60
|
+
"eslint-formatter-gitlab": "7.2.0",
|
|
61
|
+
"eslint": "10.7.0",
|
|
62
62
|
"fishery": "2.4.0",
|
|
63
63
|
"publint": "0.3.21",
|
|
64
64
|
"typescript": "6.0.3",
|
|
65
65
|
"unbuild": "3.6.1",
|
|
66
66
|
"unstorage": "1.17.5",
|
|
67
|
-
"vitest": "4.1.
|
|
67
|
+
"vitest": "4.1.10",
|
|
68
68
|
"@scayle/vitest-config-storefront": "1.0.0"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|