@scayle/storefront-core 8.51.0 → 8.52.0
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,18 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 8.52.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Extended the `OrderItem` type to support `'promotion'` as a valid category in `appliedReductions`, enabling proper type checking for promotion-based discounts in order items.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
**Dependencies**
|
|
12
|
+
|
|
13
|
+
- Updated dependency to @scayle/storefront-api@18.18.1
|
|
14
|
+
- Updated dependency to @scayle/unstorage-scayle-kv-driver@2.0.8
|
|
15
|
+
|
|
3
16
|
## 8.51.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -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.52.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
41
41
|
return {
|
|
42
42
|
accessToken: refreshedAccessToken,
|
|
43
43
|
checkoutJwt
|
|
@@ -172,7 +172,7 @@ export interface OrderItem<Product = Record<string, unknown>, Variant = Record<s
|
|
|
172
172
|
*/
|
|
173
173
|
relative: number;
|
|
174
174
|
};
|
|
175
|
-
category: 'sale' | 'campaign' | 'voucher';
|
|
175
|
+
category: 'sale' | 'campaign' | 'voucher' | 'promotion';
|
|
176
176
|
code?: string;
|
|
177
177
|
type: 'relative' | 'absolute';
|
|
178
178
|
}[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.52.0",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"unbuild": "3.6.1",
|
|
67
67
|
"unstorage": "1.17.2",
|
|
68
68
|
"vitest": "3.2.4",
|
|
69
|
-
"@scayle/eslint-config-storefront": "4.7.
|
|
69
|
+
"@scayle/eslint-config-storefront": "4.7.13",
|
|
70
70
|
"@scayle/vitest-config-storefront": "1.0.0"
|
|
71
71
|
},
|
|
72
72
|
"volta": {
|