@scayle/storefront-core 8.42.2 → 8.43.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,37 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 8.43.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
**Dependencies**
|
|
8
|
+
|
|
9
|
+
- Updated dependency to @scayle/unstorage-scayle-kv-driver@2.0.1
|
|
10
|
+
|
|
11
|
+
## 8.43.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- Added an export of the new promotion type `ComboDealEffect`
|
|
16
|
+
|
|
17
|
+
This type is also included in the `PromotionEffectType` type and can be used to check if the promotion is of type `ComboDealEffect`.
|
|
18
|
+
|
|
19
|
+
Example:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const isComboDealType = (
|
|
23
|
+
promotion?: Promotion | null,
|
|
24
|
+
): promotion is Promotion<ComboDealEffect> => {
|
|
25
|
+
return promotion?.effect?.type === PromotionEffectType.COMBO_DEAL
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
**Dependencies**
|
|
32
|
+
|
|
33
|
+
- Updated dependency to @scayle/storefront-api@18.15.0
|
|
34
|
+
|
|
3
35
|
## 8.42.2
|
|
4
36
|
|
|
5
37
|
### Patch 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,
|
|
71
|
+
export { ExistingItemHandling, AddToBasketFailureKind, UpdateBasketItemFailureKind, AddToWishlistFailureKind, PromotionEffectType, FilterTypes, APISortOption, APISortOrder, type Pagination, type ProductSortConfig, type ShopCountryCustomData, } from '@scayle/storefront-api';
|
|
@@ -33,7 +33,7 @@ export const getCheckoutToken = defineRpcHandler(async (jwtPayload = {}, context
|
|
|
33
33
|
carrier,
|
|
34
34
|
basketId: context.basketKey,
|
|
35
35
|
campaignKey
|
|
36
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.
|
|
36
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.43.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
37
37
|
return {
|
|
38
38
|
accessToken: refreshedAccessToken,
|
|
39
39
|
checkoutJwt
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BasketKey, ApplicablePromotion, BasketItemDisplayData, BasketItemDisplayDataItem, BasketItemDisplayDataKey, BasketResponse, BasketResponseData, BasketWith, CreateBasketItemParameters, ItemGroup } from '@scayle/storefront-api';
|
|
1
|
+
import type { BasketKey, ApplicablePromotion, BasketItemDisplayData, BasketItemDisplayDataItem, BasketItemDisplayDataKey, BasketResponse, BasketResponseData, BasketWith, CreateBasketItemParameters, ItemGroup, BasketItemPromotion } from '@scayle/storefront-api';
|
|
2
2
|
/**
|
|
3
3
|
* Represents custom data for a basket item. Corresponds to the `customData` property
|
|
4
4
|
* of `CreateBasketItemParameters`.
|
|
@@ -52,4 +52,4 @@ export interface UseBasketParams {
|
|
|
52
52
|
/** Data to include with the basket. */
|
|
53
53
|
with: BasketWithOptions;
|
|
54
54
|
}
|
|
55
|
-
export type { BasketKey, ApplicablePromotion, BasketItemDisplayData, BasketItemDisplayDataItem, BasketResponseData, BasketWith, BasketResponse, ItemGroup, };
|
|
55
|
+
export type { BasketKey, ApplicablePromotion, BasketItemDisplayData, BasketItemDisplayDataItem, BasketResponseData, BasketWith, BasketResponse, ItemGroup, BasketItemPromotion, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { PromotionsEndpointResponseData as PromotionsResponseData, PromotionsEndpointRequestParameters as PromotionsParams, } from '@scayle/storefront-api';
|
|
2
|
-
export type { Promotion, PromotionCondition, PromotionCustomData, PromotionEffect, AutomaticDiscountEffect, BuyXGetYEffect, } from '@scayle/storefront-api';
|
|
2
|
+
export type { Promotion, PromotionCondition, PromotionCustomData, PromotionEffect, AutomaticDiscountEffect, BuyXGetYEffect, ComboDealEffect, } from '@scayle/storefront-api';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.43.1",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"ufo": "^1.5.3",
|
|
57
57
|
"uncrypto": "^0.1.3",
|
|
58
58
|
"utility-types": "^3.11.0",
|
|
59
|
-
"@scayle/storefront-api": "18.
|
|
60
|
-
"@scayle/unstorage-scayle-kv-driver": "2.0.
|
|
59
|
+
"@scayle/storefront-api": "18.15.0",
|
|
60
|
+
"@scayle/unstorage-scayle-kv-driver": "2.0.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/crypto-js": "4.2.2",
|