@scayle/storefront-nuxt 8.33.2 → 8.34.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,19 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 8.34.0
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/unstorage-compression-driver@1.0.0
10
+
11
+ **@scayle/storefront-core v8.34.0**
12
+
13
+ - Minor
14
+ - Added export of `Pagination` type.
15
+ - **Breaking:** Improved type safety of the `mergeBaskets` RPC method. The method now returns the correct type `Promise<BasketResponse<Product, Variant> | AddManyItemsBasketResponse<Product, Variant> | undefined>` instead of `any`.
16
+
3
17
  ## 8.33.2
4
18
 
5
19
  ### Patch Changes
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "8.33.2",
3
+ "version": "8.34.0",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -54,7 +54,7 @@ export default {
54
54
  }`;
55
55
  }
56
56
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
57
- const PACKAGE_VERSION = "8.33.2";
57
+ const PACKAGE_VERSION = "8.34.0";
58
58
  const logger = createConsola({
59
59
  fancy: true,
60
60
  formatOptions: {
@@ -10,5 +10,41 @@
10
10
  *
11
11
  * @returns The result of the RPC call or a `Response` object with an error status.
12
12
  */
13
- declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
13
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<string | boolean | void | string[] | import("@scayle/storefront-core").ShopUser | Record<string, string> | Response | import("@scayle/storefront-api").Product | import("@scayle/storefront-api").Product[] | import("@scayle/storefront-core").FetchProductsCountResponse | import("@scayle/storefront-core").FetchFiltersResponse | import("@scayle/storefront-core").FetchProductsByCategoryResponse | {
14
+ basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
15
+ } | {
16
+ fromBasketKey: string;
17
+ toBasketKey: string;
18
+ with?: import("@scayle/storefront-core").BasketWithOptions;
19
+ orderCustomData?: Record<string, unknown>;
20
+ } | {
21
+ readonly type: "success";
22
+ readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
23
+ } | {
24
+ readonly type: "failure";
25
+ readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
26
+ readonly errors: import("@scayle/storefront-api").AddOrUpdateItemError[];
27
+ } | import("@scayle/storefront-api").BrandsEndpointResponseData | import("@scayle/storefront-api").Brand | {
28
+ path: string;
29
+ children?: number;
30
+ includeHidden?: true;
31
+ includeProductSorting?: boolean;
32
+ properties?: import("@scayle/storefront-api").ProductCategoryPropertyWith;
33
+ } | import("@scayle/storefront-api").Category | {
34
+ categories: import("@scayle/storefront-api").Category[] | import("@scayle/storefront-api").Category;
35
+ activeNode?: import("@scayle/storefront-api").Category;
36
+ } | import("@scayle/storefront-api").Category[] | import("@scayle/storefront-core").Order<Record<string, unknown>, Record<string, unknown>> | import("@scayle/storefront-api").SearchV2SuggestionsEndpointResponseData | import("@scayle/storefront-api").CategorySearchSuggestion | import("@scayle/storefront-api").ProductSearchSuggestion | import("@scayle/storefront-api").NavigationItemSuggestion | {
37
+ type: undefined;
38
+ } | import("@scayle/storefront-api").ShopConfiguration | {
39
+ user?: import("@scayle/storefront-core").ShopUser;
40
+ } | import("@scayle/storefront-api").Wishlist | import("@scayle/storefront-core").ShopUserAddress[] | {
41
+ accessToken: string;
42
+ checkoutJwt: string;
43
+ } | import("@scayle/storefront-api").VariantDetail[] | import("@scayle/storefront-api").NavigationAllEndpointResponseData | import("@scayle/storefront-api").NavigationTree | {
44
+ success: boolean;
45
+ } | {
46
+ result: boolean;
47
+ } | import("@scayle/storefront-api").PromotionsEndpointResponseData | {
48
+ message: string;
49
+ } | null>>;
14
50
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { generateBasketKey } from '@scayle/storefront-core/dist/utils/keys';
2
- import type { AddOrUpdateItemType, RpcMethodParameters, BasketResponseData, RpcMethodReturnType, BasketItem, Product, BasketTotalPrice } from '@scayle/storefront-core';
2
+ import type { AddOrUpdateItemType, RpcMethodParameters, BasketResponseData, BasketItem, Product, BasketTotalPrice } from '@scayle/storefront-core';
3
3
  import { ExistingItemHandling } from '@scayle/storefront-core';
4
4
  import { type NormalizedRpcResponse, type UseRpcReturn } from '../core/useRpc.js';
5
5
  import { type MaybeRefOrGetter, type ComputedRef, type Ref } from 'vue';
@@ -30,7 +30,7 @@ type UseBasketBaseReturn = Omit<Awaited<UseRpcReturn<'getBasket'>>, 'data'> & {
30
30
  mergeBaskets: (args: {
31
31
  fromBasketKey: string;
32
32
  toBasketKey: string;
33
- }) => RpcMethodReturnType<'mergeBaskets'>;
33
+ }) => Promise<NormalizedRpcResponse<'mergeBaskets'>>;
34
34
  /** @deprecated In a future release `findItem` will be removed. Consider using `findItem` from `@scayle/storefront-basket` */
35
35
  findItem: (item: {
36
36
  variantId: number;
@@ -27,5 +27,7 @@ export declare function useStorefrontSearch(searchQuery: Ref<string>, { params }
27
27
  error: Ref<unknown, unknown>;
28
28
  resetSearch: () => void;
29
29
  getSearchSuggestions: () => Promise<void>;
30
- resolveSearch: () => Promise<import("@scayle/storefront-api").SearchEntity | null | undefined>;
30
+ resolveSearch: () => Promise<import("@scayle/storefront-api").CategorySearchSuggestion | import("@scayle/storefront-api").ProductSearchSuggestion | import("@scayle/storefront-api").NavigationItemSuggestion | {
31
+ type: undefined;
32
+ } | null | undefined>;
31
33
  };
@@ -7,4 +7,4 @@ import { type RpcMethods, type RpcMethodName, type RpcHandler } from '@scayle/st
7
7
  * @param handler - The handler function to normalize.
8
8
  * @returns The normalized handler function with an `rpcType` property.
9
9
  */
10
- export declare const normalizeRpcHandler: <T extends RpcMethods[RpcMethodName], NormalizedHandler = T extends RpcHandler<infer R> ? RpcHandler<R> & Required<Pick<RpcHandler<R>, "rpcType">> : T extends RpcHandler<infer P, infer R> ? RpcHandler<P, R> & Required<Pick<RpcHandler<P, R>, "rpcType">> : never>(handler: T) => NormalizedHandler;
10
+ export declare const normalizeRpcHandler: <T extends RpcMethods[RpcMethodName], NormalizedHandler = T extends RpcHandler<infer R> ? RpcHandler<R> & Required<Pick<RpcHandler<R>, "rpcType">> : T extends RpcHandler<infer _P, infer R> ? RpcHandler<unknown, R> & Required<Pick<RpcHandler<unknown, R>, "rpcType">> : never>(handler: T) => NormalizedHandler;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "8.33.2",
4
+ "version": "8.34.0",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -90,7 +90,7 @@
90
90
  "utility-types": "^3.11.0",
91
91
  "vue-router": "^4.4.0",
92
92
  "zod": "^3.23.8",
93
- "@scayle/storefront-core": "8.33.2",
93
+ "@scayle/storefront-core": "8.34.0",
94
94
  "@scayle/unstorage-compression-driver": "1.0.0"
95
95
  },
96
96
  "devDependencies": {
@@ -101,7 +101,7 @@
101
101
  "@nuxt/module-builder": "1.0.1",
102
102
  "@nuxt/schema": "3.16.2",
103
103
  "@nuxt/test-utils": "3.19.2",
104
- "@types/node": "22.16.1",
104
+ "@types/node": "22.16.3",
105
105
  "@vitest/coverage-v8": "3.2.4",
106
106
  "dprint": "0.50.1",
107
107
  "eslint-formatter-gitlab": "6.0.1",
@@ -117,7 +117,7 @@
117
117
  "unbuild": "3.5.0",
118
118
  "vitest": "3.2.4",
119
119
  "vue-tsc": "3.0.1",
120
- "@scayle/eslint-config-storefront": "4.5.12",
120
+ "@scayle/eslint-config-storefront": "4.5.13",
121
121
  "@scayle/eslint-plugin-vue-composable": "0.2.1",
122
122
  "@scayle/unstorage-scayle-kv-driver": "1.0.2"
123
123
  },