@scayle/storefront-core 8.3.1 → 8.3.2

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,11 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 8.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Types: Explicitly type the return of `resolveSearch`
8
+
3
9
  ## 8.3.1
4
10
 
5
11
  ### Patch Changes
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 SCAYLE GmbH
3
+ Copyright (c) 2025 SCAYLE GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- import { type Log } from '../utils';
1
+ import type { Log } from '../utils';
2
2
  import type { Cache as CacheInterface } from './cache';
3
3
  export declare const MINUTE = 60;
4
4
  export type CacheOptions = Partial<{
@@ -37,7 +37,7 @@ const getCheckoutToken = exports.getCheckoutToken = async function getCheckoutTo
37
37
  carrier,
38
38
  basketId: context.basketKey,
39
39
  campaignKey: context.campaignKey
40
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.3.1"}`).setProtectedHeader({
40
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.3.2"}`).setProtectedHeader({
41
41
  alg: "HS256",
42
42
  typ: "JWT"
43
43
  }).sign(secret);
@@ -35,7 +35,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
35
35
  carrier,
36
36
  basketId: context.basketKey,
37
37
  campaignKey: context.campaignKey
38
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.3.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
38
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.3.2"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
39
39
  return {
40
40
  accessToken: refreshedAccessToken,
41
41
  checkoutJwt
@@ -1,3 +1,3 @@
1
- import type { SearchV2ResolveEndpointParameters, SearchV2SuggestionsEndpointParameters, SearchV2SuggestionsEndpointResponseData } from '../../types/sapi/search';
1
+ import type { SearchEntity, SearchV2ResolveEndpointParameters, SearchV2SuggestionsEndpointParameters, SearchV2SuggestionsEndpointResponseData } from '../../types/sapi/search';
2
2
  export declare const getSearchSuggestions: ({ term, with: _with, categoryId }: SearchV2SuggestionsEndpointParameters, { sapiClient, withParams }: import("../../types").RpcContext) => Promise<Response | SearchV2SuggestionsEndpointResponseData>;
3
- export declare const resolveSearch: ({ term, with: _with, categoryId }: SearchV2ResolveEndpointParameters, { cached, sapiClient, withParams }: import("../../types").RpcContext) => Promise<import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").S | null>;
3
+ export declare const resolveSearch: ({ term, with: _with, categoryId }: SearchV2ResolveEndpointParameters, { cached, sapiClient, withParams }: import("../../types").RpcContext) => Promise<SearchEntity | null>;
@@ -4,13 +4,13 @@ export declare const mergeBaskets: (fromBasketKey: string, toBasketKey: string,
4
4
  }, context: RpcContext) => Promise<{
5
5
  type: "failure";
6
6
  statusCode: number;
7
- basket: import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").f<import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").a, import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").V>;
7
+ basket: import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").f<import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").a, import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").d>;
8
8
  } | {
9
9
  readonly type: "success";
10
- readonly basket: import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").f<import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").a, import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").V>;
10
+ readonly basket: import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").f<import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").a, import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").d>;
11
11
  } | {
12
12
  readonly type: "failure";
13
- readonly basket: import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").f<import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").a, import("@scayle/storefront-api/dist/shared/storefront-api.DUu2u41G").V>;
13
+ readonly basket: import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").f<import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").a, import("@scayle/storefront-api/dist/shared/storefront-api.B70Ru0Qh").d>;
14
14
  readonly errors: import("@scayle/storefront-api").AddOrUpdateItemError[];
15
15
  } | undefined>;
16
16
  export declare const mergeWishlists: (fromWishlistKey: string, toWishlistKey: string, withOptions: BasketWithOptions, context: RpcContext) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -83,17 +83,17 @@
83
83
  "devDependencies": {
84
84
  "@scayle/eslint-config-storefront": "4.4.1",
85
85
  "@types/crypto-js": "4.2.2",
86
- "@types/node": "22.10.10",
87
- "@types/webpack-env": "1.18.5",
88
- "@vitest/coverage-v8": "2.1.8",
89
- "dprint": "0.48.0",
90
- "eslint": "9.18.0",
86
+ "@types/node": "22.13.1",
87
+ "@types/webpack-env": "1.18.8",
88
+ "@vitest/coverage-v8": "2.1.9",
89
+ "dprint": "0.49.0",
90
+ "eslint": "9.19.0",
91
91
  "eslint-formatter-gitlab": "5.1.0",
92
92
  "publint": "0.2.12",
93
93
  "rimraf": "6.0.1",
94
94
  "typescript": "5.7.3",
95
95
  "unbuild": "3.3.1",
96
96
  "unstorage": "1.14.4",
97
- "vitest": "2.1.8"
97
+ "vitest": "2.1.9"
98
98
  }
99
99
  }