@scayle/storefront-nuxt 8.11.10 → 8.12.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 +23 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/rpcHandler.d.ts +1 -1
- package/dist/runtime/composables/storefront/useOrder.d.ts +4 -20
- package/dist/runtime/composables/storefront/useOrder.js +4 -1
- package/dist/runtime/composables/storefront/useOrderConfirmation.d.ts +4 -20
- package/dist/runtime/composables/storefront/useOrderConfirmation.js +4 -1
- package/package.json +25 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 8.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- `OrderItem` and `Order` now accept generics: Both `OrderItem` and `Order` interfaces now accept generic type parameters for `Product` and `Variant`. Previously, these were implicitly typed as `Record<string, unknown>`. This change allows to strongly type the `product` and `variant` data within orders and order items, leading to better type checking and potentially fewer runtime errors. This allows for compile-time checks and autocompletion when working with `product` and `variant` properties of `OrderItem` and items property of `Order`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
**Dependencies**
|
|
12
|
+
|
|
13
|
+
- Updated dependency to @scayle/storefront-core@8.14.0
|
|
14
|
+
|
|
15
|
+
## 8.11.11
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependency `@vueuse/core@12.8.2` to `@vueuse/core@13.0.0`
|
|
20
|
+
- Added `@scayle/storefront-api@>=18.1.0` to `peerDependencies`.
|
|
21
|
+
|
|
22
|
+
**Dependencies**
|
|
23
|
+
|
|
24
|
+
- Updated dependency to @scayle/storefront-core@8.13.0
|
|
25
|
+
|
|
3
26
|
## 8.11.10
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/module.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.12.0",
|
|
4
4
|
"configKey": "storefront",
|
|
5
5
|
"compatibility": {
|
|
6
6
|
"nuxt": "^3.9.0"
|
|
7
7
|
},
|
|
8
8
|
"builder": {
|
|
9
9
|
"@nuxt/module-builder": "0.8.4",
|
|
10
|
-
"unbuild": "
|
|
10
|
+
"unbuild": "2.0.0"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -28,7 +28,7 @@ declare const _default: import("h3").EventHandler<import("h3").EventHandlerReque
|
|
|
28
28
|
} | import("@scayle/storefront-api").Category | {
|
|
29
29
|
categories: import("@scayle/storefront-api").Category;
|
|
30
30
|
activeNode: import("@scayle/storefront-api").Category;
|
|
31
|
-
} | import("@scayle/storefront-core").Order | import("@scayle/storefront-api").SearchV2SuggestionsEndpointResponseData | import("@scayle/storefront-api").SearchEntity | import("@scayle/storefront-api").ShopConfiguration | {
|
|
31
|
+
} | import("@scayle/storefront-core").Order<Record<string, unknown>, Record<string, unknown>> | import("@scayle/storefront-api").SearchV2SuggestionsEndpointResponseData | import("@scayle/storefront-api").SearchEntity | import("@scayle/storefront-api").ShopConfiguration | {
|
|
32
32
|
user: import("@scayle/storefront-core").ShopUser | undefined;
|
|
33
33
|
} | import("@scayle/storefront-core").ShopUserAddress[] | import("@scayle/storefront-api").NavigationAllEndpointResponseData | import("@scayle/storefront-api").NavigationTree | {
|
|
34
34
|
success: true;
|
|
@@ -2,11 +2,6 @@ import type { RpcMethodParameters, Order } from '@scayle/storefront-core';
|
|
|
2
2
|
import type { AsyncDataOptions } from 'nuxt/app';
|
|
3
3
|
import { type KeysOf, type ExtendedAsyncData } from '../core/useRpc.js';
|
|
4
4
|
import type { MaybeRefOrGetter } from 'vue';
|
|
5
|
-
type ItemsType = Exclude<Order['items'], undefined>;
|
|
6
|
-
type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
7
|
-
product: P;
|
|
8
|
-
variant: V;
|
|
9
|
-
};
|
|
10
5
|
/**
|
|
11
6
|
* Retrieves order data by ID using the `getOrderById` RPC method.
|
|
12
7
|
*
|
|
@@ -19,7 +14,7 @@ type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
|
19
14
|
*
|
|
20
15
|
* @template P The type of the `product` property within the order items. Defaults to an object with any keys.
|
|
21
16
|
* @template V The type of the `variant` property within the order items. Defaults to an object with any keys.
|
|
22
|
-
* @template DataT The type of the transformed data. Defaults to `Order
|
|
17
|
+
* @template DataT The type of the transformed data. Defaults to `Order<P, V>`.
|
|
23
18
|
* @template PickKeys Keys of the `DataT` type that will be present. This defaults to all keys of DataT.
|
|
24
19
|
* @template DefaultT The default return type. Useful for showing loading skeletons. Defaults to `null`.
|
|
25
20
|
*
|
|
@@ -30,18 +25,7 @@ type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
|
30
25
|
*
|
|
31
26
|
* @returns An extended async data object containing the order data.
|
|
32
27
|
*/
|
|
33
|
-
export declare function useOrder<P = {
|
|
34
|
-
[k: string]: unknown;
|
|
35
|
-
}, V = {
|
|
36
|
-
[k: string]: unknown;
|
|
37
|
-
}, DataT = Order & {
|
|
38
|
-
items?: NewItemsType<P, V>[];
|
|
39
|
-
}, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options }?: {
|
|
28
|
+
export declare function useOrder<P = Record<string, unknown>, V = Record<string, unknown>, DataT = Order<P, V>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, }?: {
|
|
40
29
|
params?: MaybeRefOrGetter<RpcMethodParameters<'getOrderById'>>;
|
|
41
|
-
options?: AsyncDataOptions<Order
|
|
42
|
-
|
|
43
|
-
}, DataT, PickKeys, DefaultT>;
|
|
44
|
-
}, key?: string): ExtendedAsyncData<Order & {
|
|
45
|
-
items?: NewItemsType<P, V>[];
|
|
46
|
-
}, unknown, DataT, PickKeys, DefaultT>;
|
|
47
|
-
export {};
|
|
30
|
+
options?: AsyncDataOptions<Order<P, V>, DataT, PickKeys, DefaultT>;
|
|
31
|
+
}, key?: string): ExtendedAsyncData<Order<P, V>, unknown, DataT, PickKeys, DefaultT>;
|
|
@@ -2,11 +2,6 @@ import type { RpcMethodParameters, Order } from '@scayle/storefront-core';
|
|
|
2
2
|
import type { AsyncDataOptions } from 'nuxt/app';
|
|
3
3
|
import type { ExtendedAsyncData, KeysOf } from '../core/useRpc.js';
|
|
4
4
|
import type { MaybeRefOrGetter } from 'vue';
|
|
5
|
-
type ItemsType = Exclude<Order['items'], undefined>;
|
|
6
|
-
type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
7
|
-
product: P;
|
|
8
|
-
variant: V;
|
|
9
|
-
};
|
|
10
5
|
/**
|
|
11
6
|
* Retrieves order data by ID using the `getOrderDataByCbd RPC method.
|
|
12
7
|
*
|
|
@@ -17,7 +12,7 @@ type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
|
17
12
|
*
|
|
18
13
|
* @template P The type of the `product` property within the order items. Defaults to an object with any keys.
|
|
19
14
|
* @template V The type of the `variant` property within the order items. Defaults to an object with any keys.
|
|
20
|
-
* @template DataT The type of the transformed data. Defaults to `Order
|
|
15
|
+
* @template DataT The type of the transformed data. Defaults to `Order<P, V>`.
|
|
21
16
|
* @template PickKeys Keys of the `DataT` type that will be present. This defaults to all keys of DataT.
|
|
22
17
|
* @template DefaultT The default return type. Useful for showing loading skeletons. Defaults to `null`.
|
|
23
18
|
*
|
|
@@ -28,18 +23,7 @@ type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
|
28
23
|
*
|
|
29
24
|
* @returns An extended async data object containing the order data.
|
|
30
25
|
*/
|
|
31
|
-
export declare function useOrderConfirmation<P = {
|
|
32
|
-
[k: string]: unknown;
|
|
33
|
-
}, V = {
|
|
34
|
-
[k: string]: unknown;
|
|
35
|
-
}, DataT = Order & {
|
|
36
|
-
items?: NewItemsType<P, V>[];
|
|
37
|
-
}, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options }?: {
|
|
26
|
+
export declare function useOrderConfirmation<P = Record<string, unknown>, V = Record<string, unknown>, DataT = Order<P, V>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, }?: {
|
|
38
27
|
params?: MaybeRefOrGetter<RpcMethodParameters<'getOrderDataByCbd'>>;
|
|
39
|
-
options?: AsyncDataOptions<Order
|
|
40
|
-
|
|
41
|
-
}, DataT, PickKeys, DefaultT>;
|
|
42
|
-
}, key?: string): ExtendedAsyncData<Order & {
|
|
43
|
-
items?: NewItemsType<P, V>[];
|
|
44
|
-
}, unknown, DataT, PickKeys, DefaultT>;
|
|
45
|
-
export {};
|
|
28
|
+
options?: AsyncDataOptions<Order<P, V>, DataT, PickKeys, DefaultT>;
|
|
29
|
+
}, key?: string): ExtendedAsyncData<Order<P, V>, unknown, DataT, PickKeys, DefaultT>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { useRpc } from "../core/useRpc.js";
|
|
2
|
-
export function useOrderConfirmation({
|
|
2
|
+
export function useOrderConfirmation({
|
|
3
|
+
params,
|
|
4
|
+
options
|
|
5
|
+
} = {}, key = "useOrderConfirmation") {
|
|
3
6
|
return useRpc(
|
|
4
7
|
"getOrderDataByCbd",
|
|
5
8
|
key,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.12.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"access": "public",
|
|
10
10
|
"registry": "https://registry.npmjs.org/"
|
|
11
11
|
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"url": "git+https://github.com/scayle/storefront-nuxt.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"nuxt"
|
|
17
|
+
],
|
|
12
18
|
"website": "https://scayle.dev/en/storefront-guide/developer-guide/getting-started/about-storefront",
|
|
13
19
|
"sideEffects": false,
|
|
14
20
|
"exports": {
|
|
@@ -72,10 +78,10 @@
|
|
|
72
78
|
"dependencies": {
|
|
73
79
|
"@opentelemetry/api": "^1.9.0",
|
|
74
80
|
"@scayle/h3-session": "0.6.0",
|
|
75
|
-
"@scayle/storefront-core": "8.
|
|
81
|
+
"@scayle/storefront-core": "8.14.0",
|
|
76
82
|
"@scayle/unstorage-compression-driver": "^0.2.4",
|
|
77
83
|
"@vercel/nft": "0.29.2",
|
|
78
|
-
"@vueuse/core": "
|
|
84
|
+
"@vueuse/core": "13.0.0",
|
|
79
85
|
"consola": "^3.2.3",
|
|
80
86
|
"core-js": "^3.37.1",
|
|
81
87
|
"defu": "^6.1.4",
|
|
@@ -91,43 +97,46 @@
|
|
|
91
97
|
"schema-dts": "1.1.5"
|
|
92
98
|
},
|
|
93
99
|
"devDependencies": {
|
|
94
|
-
"@
|
|
100
|
+
"@eslint/eslintrc": "3.3.0",
|
|
101
|
+
"@nuxt/eslint": "1.2.0",
|
|
95
102
|
"@nuxt/kit": "3.15.4",
|
|
96
103
|
"@nuxt/module-builder": "0.8.4",
|
|
97
104
|
"@nuxt/schema": "3.15.4",
|
|
98
|
-
"@nuxt/test-utils": "3.17.
|
|
105
|
+
"@nuxt/test-utils": "3.17.2",
|
|
99
106
|
"@scayle/eslint-config-storefront": "4.4.1",
|
|
100
107
|
"@scayle/eslint-plugin-vue-composable": "0.2.1",
|
|
101
108
|
"@scayle/unstorage-scayle-kv-driver": "0.1.1",
|
|
102
|
-
"@types/node": "22.13.
|
|
109
|
+
"@types/node": "22.13.10",
|
|
103
110
|
"dprint": "0.49.0",
|
|
104
|
-
"eslint": "9.21.0",
|
|
105
111
|
"eslint-formatter-gitlab": "5.1.0",
|
|
112
|
+
"eslint": "9.22.0",
|
|
106
113
|
"fishery": "2.2.3",
|
|
107
114
|
"h3": "1.15.0",
|
|
108
115
|
"nitropack": "2.9.7",
|
|
109
116
|
"node-mocks-http": "1.16.2",
|
|
110
|
-
"nuxi": "3.22.
|
|
117
|
+
"nuxi": "3.22.5",
|
|
111
118
|
"nuxt": "3.15.4",
|
|
112
119
|
"publint": "0.2.12",
|
|
113
120
|
"typescript": "5.8.2",
|
|
114
|
-
"
|
|
115
|
-
"vitest": "2.1.9"
|
|
121
|
+
"unbuild": "2.0.0",
|
|
122
|
+
"vitest": "2.1.9",
|
|
123
|
+
"vue-tsc": "2.2.8"
|
|
116
124
|
},
|
|
117
125
|
"peerDependencies": {
|
|
118
|
-
"@nuxt/kit": "
|
|
126
|
+
"@nuxt/kit": ">=3.12.2",
|
|
127
|
+
"@scayle/storefront-api": "^18.1.0",
|
|
119
128
|
"fishery": "^2.2.2",
|
|
120
129
|
"h3": "^1.10.0",
|
|
121
130
|
"nitropack": "^2.9.7",
|
|
122
131
|
"nuxt": ">=3.10.0",
|
|
123
|
-
"unstorage": "
|
|
124
|
-
"vue": "
|
|
132
|
+
"unstorage": "^1.10.1",
|
|
133
|
+
"vue": "^3.4.0"
|
|
125
134
|
},
|
|
126
135
|
"resolutions": {
|
|
127
|
-
"h3": "1.15.0",
|
|
128
|
-
"vue": "3.5.13",
|
|
129
136
|
"@nuxt/kit": "3.15.4",
|
|
130
|
-
"@nuxt/schema": "3.15.4"
|
|
137
|
+
"@nuxt/schema": "3.15.4",
|
|
138
|
+
"h3": "1.15.0",
|
|
139
|
+
"vue": "3.5.13"
|
|
131
140
|
},
|
|
132
141
|
"volta": {
|
|
133
142
|
"node": "22.14.0"
|