@scayle/storefront-core 8.47.0 → 8.48.1
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 +28 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -1
- package/dist/rpc/methods/checkout/checkout.mjs +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 8.48.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Export `SmartSortingKey` constant containing all predefined smart sorting keys for intelligent product sorting. Smart sorting keys provide advanced sorting algorithms that consider multiple factors like discounts, inventory levels, sales performance, and recency to optimize product listings.
|
|
8
|
+
|
|
9
|
+
Available keys:
|
|
10
|
+
|
|
11
|
+
- `SmartSortingKey.SALES_PUSH` - Promotes items with highest discounts and oldest inventory
|
|
12
|
+
- `SmartSortingKey.NEW_ARRIVALS` - Prioritizes recently added products with good availability
|
|
13
|
+
- `SmartSortingKey.BALANCED_OFFERINGS` - Balances recency, availability, discounts, and sales data
|
|
14
|
+
- `SmartSortingKey.INVENTORY_OPTIMIZATION` - Optimizes inventory turnover for high stock products
|
|
15
|
+
- `SmartSortingKey.LUXURY_PROMOTION` - Highlights high-value luxury items with discounts
|
|
16
|
+
- `SmartSortingKey.STOCK_COVERAGE` - Ensures broad variant availability across products
|
|
17
|
+
- `SmartSortingKey.TOPSELLER` - Prioritizes products with strong sales performance
|
|
18
|
+
- `SmartSortingKey.REVENUE_MAX` - Maximizes revenue by prioritizing high revenue products
|
|
19
|
+
- `SmartSortingKey.RECENTLY_POPULAR` - Favors products with high recent sales performance
|
|
20
|
+
|
|
21
|
+
These keys can be used with the `sortingKey` parameter in product queries and are intended to be used with descending sort order to return most relevant results first.
|
|
22
|
+
|
|
23
|
+
For further information on smart product sorting and how to use smart sorting keys, visit: https://scayle.dev/en/core-documentation/the-basics/products/product-sorting
|
|
24
|
+
|
|
25
|
+
**Dependencies**
|
|
26
|
+
|
|
27
|
+
- Updated dependency to @scayle/storefront-api@18.18.1
|
|
28
|
+
|
|
29
|
+
## 8.48.0
|
|
30
|
+
|
|
3
31
|
## 8.47.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -68,4 +68,4 @@ export type RpcMethodParameters<N extends RpcMethodName> = Parameters<RpcMethod<
|
|
|
68
68
|
*/
|
|
69
69
|
export type RpcMethodReturnType<N extends RpcMethodName> = ReturnType<RpcMethod<N>>;
|
|
70
70
|
export type RpcMethodCall = <N extends RpcMethodName, P extends RpcMethodParameters<N>, TResult extends Exclude<Awaited<RpcMethodReturnType<N>>, Response>>(...args: P extends RpcContext ? [N] : [N, P]) => Promise<TResult>;
|
|
71
|
-
export { ExistingItemHandling, AddToBasketFailureKind, UpdateBasketItemFailureKind, AddToWishlistFailureKind, PromotionEffectType, FilterTypes, APISortOption, APISortOrder, type Pagination, type ProductSortConfig, type ShopCountryCustomData, } from '@scayle/storefront-api';
|
|
71
|
+
export { ExistingItemHandling, AddToBasketFailureKind, UpdateBasketItemFailureKind, AddToWishlistFailureKind, PromotionEffectType, FilterTypes, APISortOption, APISortOrder, SmartSortingKey, type Pagination, type ProductSortConfig, type ShopCountryCustomData, } from '@scayle/storefront-api';
|
package/dist/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ export const getCheckoutToken = defineRpcHandler(async (jwtPayload = {}, context
|
|
|
37
37
|
...customData,
|
|
38
38
|
...orderCustomData
|
|
39
39
|
}
|
|
40
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.
|
|
40
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.48.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
41
41
|
return {
|
|
42
42
|
accessToken: refreshedAccessToken,
|
|
43
43
|
checkoutJwt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.48.1",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"ufo": "^1.5.3",
|
|
49
49
|
"uncrypto": "^0.1.3",
|
|
50
50
|
"utility-types": "^3.11.0",
|
|
51
|
-
"@scayle/storefront-api": "18.18.
|
|
51
|
+
"@scayle/storefront-api": "18.18.1",
|
|
52
52
|
"@scayle/unstorage-scayle-kv-driver": "2.0.7"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"eslint": "9.38.0",
|
|
62
62
|
"fishery": "2.3.1",
|
|
63
63
|
"publint": "0.3.15",
|
|
64
|
-
"rimraf": "6.0
|
|
64
|
+
"rimraf": "6.1.0",
|
|
65
65
|
"typescript": "5.9.3",
|
|
66
66
|
"unbuild": "3.6.1",
|
|
67
67
|
"unstorage": "1.17.1",
|