@scayle/storefront-core 8.10.0 → 8.11.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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 8.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added dependency `@scayle/unstorage-scayle-kv-driver@0.0.1`
|
|
8
|
+
|
|
9
|
+
**Dependencies**
|
|
10
|
+
|
|
11
|
+
- Updated dependency to @scayle/unstorage-scayle-kv-driver@0.1.0
|
|
12
|
+
|
|
13
|
+
## 8.11.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- Remove check in `getOrderById` RPC whether an order exists in `context.user.orderSummary`. The order summary defaults to including only the 50 most recent entries. This fix ensures orders beyond this limit can be accessed.
|
|
18
|
+
|
|
3
19
|
## 8.10.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -36,7 +36,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
|
|
|
36
36
|
carrier,
|
|
37
37
|
basketId: context.basketKey,
|
|
38
38
|
campaignKey
|
|
39
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.
|
|
39
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.11.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
40
40
|
return {
|
|
41
41
|
accessToken: refreshedAccessToken,
|
|
42
42
|
checkoutJwt
|
|
@@ -21,16 +21,6 @@ export const getOrderById = async function getOrderById2({ orderId }, context) {
|
|
|
21
21
|
"No access token present"
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
-
const isOrderInUserOrderlist = context.user?.orderSummary?.find(
|
|
25
|
-
(order) => order.id === orderId
|
|
26
|
-
);
|
|
27
|
-
if (!isOrderInUserOrderlist) {
|
|
28
|
-
return new ErrorResponse(
|
|
29
|
-
HttpStatusCode.UNAUTHORIZED,
|
|
30
|
-
HttpStatusMessage.UNAUTHORIZED,
|
|
31
|
-
"Order not belonging to current user"
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
24
|
const client = new CustomerAPIClient(context);
|
|
35
25
|
try {
|
|
36
26
|
return await client.getOrder(context.shopId, orderId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.1",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@scayle/storefront-api": "18.0.0",
|
|
60
|
+
"@scayle/unstorage-scayle-kv-driver": "0.1.0",
|
|
60
61
|
"crypto-js": "^4.2.0",
|
|
61
62
|
"hookable": "^5.5.3",
|
|
62
63
|
"jose": "^5.6.3",
|