@scayle/storefront-nuxt 7.84.5 → 7.85.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 +18 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/composables/core/useAvailableShops.d.ts +1 -1
- package/dist/runtime/composables/core/useRpc.d.ts +20 -13
- package/dist/runtime/composables/storefront/useBasket.d.ts +6 -6
- package/dist/runtime/composables/storefront/useBasket.mjs +1 -1
- package/dist/runtime/composables/storefront/useBrand.d.ts +4 -6
- package/dist/runtime/composables/storefront/useBrands.d.ts +4 -6
- package/dist/runtime/composables/storefront/useCategories.d.ts +7 -8
- package/dist/runtime/composables/storefront/useCategoryById.d.ts +4 -6
- package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +4 -6
- package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +4 -6
- package/dist/runtime/composables/storefront/useFacet.d.ts +36 -40
- package/dist/runtime/composables/storefront/useFilters.d.ts +4 -6
- package/dist/runtime/composables/storefront/useNavigationTree.d.ts +4 -6
- package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +4 -6
- package/dist/runtime/composables/storefront/useProduct.d.ts +4 -6
- package/dist/runtime/composables/storefront/useProducts.d.ts +4 -6
- package/dist/runtime/composables/storefront/useProductsByIds.d.ts +4 -6
- package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +4 -6
- package/dist/runtime/composables/storefront/useProductsCount.d.ts +4 -6
- package/dist/runtime/composables/storefront/usePromotions.d.ts +4 -6
- package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +4 -6
- package/dist/runtime/composables/storefront/useSearch.d.ts +3 -3
- package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +4 -6
- package/dist/runtime/composables/storefront/useStorefrontSearch.d.ts +2 -2
- package/dist/runtime/composables/storefront/useUserAddresses.d.ts +4 -6
- package/dist/runtime/composables/storefront/useVariant.d.ts +4 -6
- package/dist/runtime/composables/storefront/useWishlist.d.ts +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.85.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Improve typing when using `transform` or `pick` in RPC composables
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @scayle/storefront-core@7.64.3
|
|
13
|
+
|
|
14
|
+
## 7.84.6
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @scayle/storefront-core@7.64.2
|
|
20
|
+
|
|
3
21
|
## 7.84.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PublicShopConfig } from '../../../module';
|
|
2
|
-
export declare function useAvailableShops(): import("vue").Ref<PublicShopConfig[]
|
|
2
|
+
export declare function useAvailableShops(): import("vue").Ref<PublicShopConfig[]>;
|
|
@@ -2,23 +2,30 @@ import type { RpcContext, RpcMethodName, RpcMethodParameters, RpcMethodReturnTyp
|
|
|
2
2
|
import type { AsyncDataOptions } from 'nuxt/app';
|
|
3
3
|
import { useAsyncData } from 'nuxt/app';
|
|
4
4
|
import type { MaybeRefOrGetter } from '#imports';
|
|
5
|
-
type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;
|
|
6
|
-
export type
|
|
7
|
-
export interface RpcOptions {
|
|
5
|
+
export type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;
|
|
6
|
+
export type RpcOptions = {
|
|
8
7
|
/** @deprecated use immediate instead */
|
|
9
8
|
autoFetch?: boolean;
|
|
10
9
|
lazy?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type
|
|
10
|
+
};
|
|
11
|
+
/** The normalized return type of an RPC */
|
|
12
|
+
export type NormalizedRpcResponse<N extends RpcMethodName> = Exclude<Awaited<RpcMethodReturnType<N>>, Response>;
|
|
13
|
+
/**
|
|
14
|
+
* Extend AsyncDataOptions with autoFetch (deprecated) and lazy (unused)
|
|
15
|
+
*/
|
|
16
|
+
export type UseRpcOptions<N extends RpcMethodName, DataT = NormalizedRpcResponse<N>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null> = RpcOptions & AsyncDataOptions<NormalizedRpcResponse<N>, DataT, PickKeys, DefaultT>;
|
|
17
|
+
/**
|
|
18
|
+
* The return type of a composable based on useRpc
|
|
19
|
+
*/
|
|
20
|
+
export type UseRpcReturn<N extends RpcMethodName, DataT = NormalizedRpcResponse<N>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null> = ExtendedAsyncData<NormalizedRpcResponse<N>, unknown, DataT, PickKeys, DefaultT>;
|
|
14
21
|
export type Status = 'idle' | 'pending' | 'success' | 'error';
|
|
15
|
-
type AsyncData<
|
|
16
|
-
type AwaitedAsyncData<
|
|
17
|
-
type _ExtendedAsyncData<
|
|
18
|
-
fetching: AwaitedAsyncData<
|
|
19
|
-
fetch: AwaitedAsyncData<
|
|
22
|
+
type AsyncData<ResT, ErrorT = unknown, DataT = ResT, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null> = ReturnType<typeof useAsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT>>;
|
|
23
|
+
type AwaitedAsyncData<ResT, ErrorT = unknown, DataT = ResT, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null> = Awaited<AsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT>>;
|
|
24
|
+
type _ExtendedAsyncData<ResT, ErrorT = unknown, DataT = ResT, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null> = AwaitedAsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT> & {
|
|
25
|
+
fetching: AwaitedAsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT>['pending'];
|
|
26
|
+
fetch: AwaitedAsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT>['refresh'];
|
|
20
27
|
};
|
|
21
|
-
export type ExtendedAsyncData<
|
|
28
|
+
export type ExtendedAsyncData<ResT, ErrorT = unknown, DataT = ResT, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null> = _ExtendedAsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT> & Promise<_ExtendedAsyncData<ResT, ErrorT, DataT, PickKeys, DefaultT>>;
|
|
22
29
|
/**
|
|
23
30
|
* `useRpc` is a wrapper around `useAsyncData` for registered RPC methods
|
|
24
31
|
*
|
|
@@ -43,5 +50,5 @@ export type ExtendedAsyncData<T> = _ExtendedAsyncData<T> & Promise<_ExtendedAsyn
|
|
|
43
50
|
* But anything passed here will take precedence.
|
|
44
51
|
* @see {@link https://nuxt.com/docs/api/composables/use-async-data#params}
|
|
45
52
|
*/
|
|
46
|
-
export declare function useRpc<N extends RpcMethodName,
|
|
53
|
+
export declare function useRpc<N extends RpcMethodName, DataT = NormalizedRpcResponse<N>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>(method: N, key: string, params?: MaybeRefOrGetter<RpcMethodParameters<N> extends RpcContext ? undefined : RpcMethodParameters<N>>, options?: UseRpcOptions<N, DataT, PickKeys, DefaultT>): ExtendedAsyncData<NormalizedRpcResponse<N>, unknown, DataT, PickKeys, DefaultT>;
|
|
47
54
|
export {};
|
|
@@ -32,13 +32,13 @@ type UseBasketBaseReturn = Awaited<UseRpcReturn<'getBasket'>> & {
|
|
|
32
32
|
removeItemByKey: (itemKey: string) => Promise<void>;
|
|
33
33
|
clear: () => Promise<void>;
|
|
34
34
|
products: ComputedRef<Product[]>;
|
|
35
|
-
count: ComputedRef<number>;
|
|
36
|
-
countWithoutSoldOutItems: ComputedRef<number>;
|
|
37
|
-
items: ComputedRef<BasketItem[]>;
|
|
38
|
-
cost: ComputedRef<BasketTotalPrice>;
|
|
39
|
-
key: ComputedRef<BasketKey>;
|
|
35
|
+
count: ComputedRef<number | undefined>;
|
|
36
|
+
countWithoutSoldOutItems: ComputedRef<number | undefined>;
|
|
37
|
+
items: ComputedRef<BasketItem[] | undefined>;
|
|
38
|
+
cost: ComputedRef<BasketTotalPrice | undefined>;
|
|
39
|
+
key: ComputedRef<BasketKey | undefined>;
|
|
40
40
|
isEmpty: ComputedRef<boolean>;
|
|
41
|
-
packages: ComputedRef<BasketPackageInformation[]>;
|
|
41
|
+
packages: ComputedRef<BasketPackageInformation[] | undefined>;
|
|
42
42
|
shippingDates: ComputedRef<(string | null)[] | undefined>;
|
|
43
43
|
};
|
|
44
44
|
export declare function useBasket({ params, key, }?: UseBasketOptions): UseBasketBaseReturn & Promise<UseBasketBaseReturn>;
|
|
@@ -125,7 +125,7 @@ export function useBasket({
|
|
|
125
125
|
() => {
|
|
126
126
|
const mainItemQuantities = /* @__PURE__ */ new Map();
|
|
127
127
|
const soldOutItemGroups = /* @__PURE__ */ new Set();
|
|
128
|
-
let count2 = data.value?.items
|
|
128
|
+
let count2 = (data.value?.items ?? []).reduce((prev, current) => {
|
|
129
129
|
if (current.itemGroup?.id) {
|
|
130
130
|
if (current.itemGroup.isMainItem) {
|
|
131
131
|
mainItemQuantities.set(current.itemGroup.id, current.quantity);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useBrand<DataT = NormalizedRpcResponse<'getBrandById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getBrandById'>>;
|
|
6
|
-
options: UseRpcOptions<'getBrandById'>;
|
|
6
|
+
options: UseRpcOptions<'getBrandById', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useBrand({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getBrandById'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getBrandById', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useBrands<DataT = NormalizedRpcResponse<'getBrands'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getBrands'>>;
|
|
6
|
-
options: UseRpcOptions<'getBrands'>;
|
|
6
|
+
options: UseRpcOptions<'getBrands', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useBrands({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getBrands'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getBrands', DataT, PickKeys, DefaultT>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { RpcMethodParameters, RpcMethodReturnType } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
type
|
|
4
|
+
type UseCategoriesBaseReturn<DataT, PickKeys extends KeysOf<DataT>, DefaultT> = Pick<Awaited<UseRpcReturn<'getCategoriesByPath', DataT, PickKeys, DefaultT>>, 'data' | 'error' | 'status' | 'fetch' | 'fetching' | 'refresh'> & {
|
|
5
|
+
getCategoryById: (id: number, includeHidden?: true) => RpcMethodReturnType<'getCategoryById'>;
|
|
6
|
+
};
|
|
7
|
+
export declare function useCategories<DataT = NormalizedRpcResponse<'getCategoriesByPath'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
8
|
params: MaybeRefOrGetter<RpcMethodParameters<'getCategoriesByPath'>>;
|
|
6
|
-
options: UseRpcOptions<'getCategoriesByPath'>;
|
|
9
|
+
options: UseRpcOptions<'getCategoriesByPath', DataT, PickKeys, DefaultT>;
|
|
7
10
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
11
|
key: string;
|
|
9
|
-
}
|
|
10
|
-
type UseCategoriesBaseReturn = Pick<Awaited<UseRpcReturn<'getCategoriesByPath'>>, 'data' | 'error' | 'status' | 'fetch' | 'fetching' | 'refresh'> & {
|
|
11
|
-
getCategoryById: (id: number, includeHidden?: true) => RpcMethodReturnType<'getCategoryById'>;
|
|
12
|
-
};
|
|
13
|
-
export declare function useCategories({ params, options, key: _key, }?: Options, key?: string): UseCategoriesBaseReturn & Promise<UseCategoriesBaseReturn>;
|
|
12
|
+
}>, key?: string): UseCategoriesBaseReturn<DataT, PickKeys, DefaultT> & Promise<UseCategoriesBaseReturn<DataT, PickKeys, DefaultT>>;
|
|
14
13
|
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useCategoryById<DataT = NormalizedRpcResponse<'getCategoryById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getCategoryById'>>;
|
|
6
|
-
options: UseRpcOptions<'getCategoryById'>;
|
|
6
|
+
options: UseRpcOptions<'getCategoryById', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useCategoryById({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getCategoryById'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getCategoryById', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useCategoryByPath<DataT = NormalizedRpcResponse<'getCategoryByPath'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }: {
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getCategoryByPath'>>;
|
|
6
|
-
options?: UseRpcOptions<'getCategoryByPath'>;
|
|
6
|
+
options?: UseRpcOptions<'getCategoryByPath', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function useCategoryByPath({ params, options, key: _key, }: Options, key?: string): UseRpcReturn<'getCategoryByPath'>;
|
|
11
|
-
export {};
|
|
9
|
+
}, key?: string): UseRpcReturn<'getCategoryByPath', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useCurrentPromotions<DataT = NormalizedRpcResponse<'getCurrentPromotions'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getCurrentPromotions'>>;
|
|
6
|
-
options: UseRpcOptions<'getCurrentPromotions'>;
|
|
6
|
+
options: UseRpcOptions<'getCurrentPromotions', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useCurrentPromotions({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getCurrentPromotions'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getCurrentPromotions', DataT, PickKeys, DefaultT>;
|
|
@@ -15,21 +15,19 @@ type Options = Partial<{
|
|
|
15
15
|
key: string;
|
|
16
16
|
}>;
|
|
17
17
|
export declare function useFacet({ key: optionsKey, params, }?: Options, _key?: string): {
|
|
18
|
-
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData>;
|
|
19
|
-
filtersFetching: import("vue").Ref<boolean
|
|
20
|
-
unfilteredCount: import("vue").ComputedRef<number>;
|
|
21
|
-
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
22
|
-
filterError: import("vue").Ref<any
|
|
18
|
+
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
19
|
+
filtersFetching: import("vue").Ref<boolean>;
|
|
20
|
+
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
21
|
+
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
22
|
+
filterError: import("vue").Ref<any>;
|
|
23
23
|
productCountData: import("vue").Ref<{
|
|
24
24
|
count: number;
|
|
25
|
-
}
|
|
26
|
-
count: number;
|
|
27
|
-
}>;
|
|
25
|
+
} | null>;
|
|
28
26
|
refreshProductCount: ({ where, }?: FilterParams) => Promise<void>;
|
|
29
|
-
productCountFetching: import("vue").Ref<boolean
|
|
30
|
-
productCountError: import("vue").Ref<any
|
|
31
|
-
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
32
|
-
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[]>;
|
|
27
|
+
productCountFetching: import("vue").Ref<boolean>;
|
|
28
|
+
productCountError: import("vue").Ref<any>;
|
|
29
|
+
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
30
|
+
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
33
31
|
pagination: import("vue").ComputedRef<{
|
|
34
32
|
current: number;
|
|
35
33
|
total: number;
|
|
@@ -39,16 +37,16 @@ export declare function useFacet({ key: optionsKey, params, }?: Options, _key?:
|
|
|
39
37
|
prev: number;
|
|
40
38
|
next: number;
|
|
41
39
|
last: number;
|
|
42
|
-
}>;
|
|
43
|
-
productsFetching: import("vue").Ref<boolean
|
|
40
|
+
} | undefined>;
|
|
41
|
+
productsFetching: import("vue").Ref<boolean>;
|
|
44
42
|
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
45
|
-
productError: import("vue").Ref<any
|
|
46
|
-
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
47
|
-
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[]>;
|
|
43
|
+
productError: import("vue").Ref<any>;
|
|
44
|
+
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
45
|
+
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
48
46
|
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
49
|
-
categoriesFetching: import("vue").Ref<boolean
|
|
50
|
-
categoriesError: import("vue").Ref<any
|
|
51
|
-
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
47
|
+
categoriesFetching: import("vue").Ref<boolean>;
|
|
48
|
+
categoriesError: import("vue").Ref<any>;
|
|
49
|
+
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
52
50
|
fetchProducts: ({ path, page, perPage, where, sort, pricePromotionKey, cache, orFiltersOperator, }: FilterParams & {
|
|
53
51
|
path: string;
|
|
54
52
|
pricePromotionKey?: string;
|
|
@@ -56,21 +54,19 @@ export declare function useFacet({ key: optionsKey, params, }?: Options, _key?:
|
|
|
56
54
|
}) => Promise<true | undefined>;
|
|
57
55
|
fetchPage: (pageToFetch: number) => Promise<void>;
|
|
58
56
|
} & Promise<{
|
|
59
|
-
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData>;
|
|
60
|
-
filtersFetching: import("vue").Ref<boolean
|
|
61
|
-
unfilteredCount: import("vue").ComputedRef<number>;
|
|
62
|
-
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
63
|
-
filterError: import("vue").Ref<any
|
|
57
|
+
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
58
|
+
filtersFetching: import("vue").Ref<boolean>;
|
|
59
|
+
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
60
|
+
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
61
|
+
filterError: import("vue").Ref<any>;
|
|
64
62
|
productCountData: import("vue").Ref<{
|
|
65
63
|
count: number;
|
|
66
|
-
}
|
|
67
|
-
count: number;
|
|
68
|
-
}>;
|
|
64
|
+
} | null>;
|
|
69
65
|
refreshProductCount: ({ where, }?: FilterParams) => Promise<void>;
|
|
70
|
-
productCountFetching: import("vue").Ref<boolean
|
|
71
|
-
productCountError: import("vue").Ref<any
|
|
72
|
-
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
73
|
-
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[]>;
|
|
66
|
+
productCountFetching: import("vue").Ref<boolean>;
|
|
67
|
+
productCountError: import("vue").Ref<any>;
|
|
68
|
+
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
69
|
+
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
74
70
|
pagination: import("vue").ComputedRef<{
|
|
75
71
|
current: number;
|
|
76
72
|
total: number;
|
|
@@ -80,16 +76,16 @@ export declare function useFacet({ key: optionsKey, params, }?: Options, _key?:
|
|
|
80
76
|
prev: number;
|
|
81
77
|
next: number;
|
|
82
78
|
last: number;
|
|
83
|
-
}>;
|
|
84
|
-
productsFetching: import("vue").Ref<boolean
|
|
79
|
+
} | undefined>;
|
|
80
|
+
productsFetching: import("vue").Ref<boolean>;
|
|
85
81
|
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
86
|
-
productError: import("vue").Ref<any
|
|
87
|
-
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
88
|
-
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[]>;
|
|
82
|
+
productError: import("vue").Ref<any>;
|
|
83
|
+
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
84
|
+
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
89
85
|
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
90
|
-
categoriesFetching: import("vue").Ref<boolean
|
|
91
|
-
categoriesError: import("vue").Ref<any
|
|
92
|
-
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus
|
|
86
|
+
categoriesFetching: import("vue").Ref<boolean>;
|
|
87
|
+
categoriesError: import("vue").Ref<any>;
|
|
88
|
+
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
93
89
|
fetchProducts: ({ path, page, perPage, where, sort, pricePromotionKey, cache, orFiltersOperator, }: FilterParams & {
|
|
94
90
|
path: string;
|
|
95
91
|
pricePromotionKey?: string;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useFilters<DataT = NormalizedRpcResponse<'getFilters'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getFilters'>>;
|
|
6
|
-
options: UseRpcOptions<'getFilters'>;
|
|
6
|
+
options: UseRpcOptions<'getFilters', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useFilters({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getFilters'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getFilters', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useNavigationTree<DataT = NormalizedRpcResponse<'fetchNavigationTreeById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'fetchNavigationTreeById'>>;
|
|
6
|
-
options: UseRpcOptions<'fetchNavigationTreeById'>;
|
|
6
|
+
options: UseRpcOptions<'fetchNavigationTreeById', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useNavigationTree({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'fetchNavigationTreeById'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'fetchNavigationTreeById', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcReturn, UseRpcOptions } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcReturn, UseRpcOptions, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useNavigationTrees<DataT = NormalizedRpcResponse<'fetchAllNavigationTrees'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'fetchAllNavigationTrees'>>;
|
|
6
|
-
options: UseRpcOptions<'fetchAllNavigationTrees'>;
|
|
6
|
+
options: UseRpcOptions<'fetchAllNavigationTrees', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useNavigationTrees({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'fetchAllNavigationTrees'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'fetchAllNavigationTrees', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useProduct<DataT = NormalizedRpcResponse<'getProductById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getProductById'>>;
|
|
6
|
-
options: UseRpcOptions<'getProductById'>;
|
|
6
|
+
options: UseRpcOptions<'getProductById', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useProduct({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getProductById'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getProductById', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useProducts<DataT = NormalizedRpcResponse<'getProductsByCategory'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getProductsByCategory'>>;
|
|
6
|
-
options: UseRpcOptions<'getProductsByCategory'>;
|
|
6
|
+
options: UseRpcOptions<'getProductsByCategory', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useProducts({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getProductsByCategory'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getProductsByCategory', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useProductsByIds<DataT = NormalizedRpcResponse<'getProductsByIds'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getProductsByIds'>>;
|
|
6
|
-
options: UseRpcOptions<'getProductsByIds'>;
|
|
6
|
+
options: UseRpcOptions<'getProductsByIds', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useProductsByIds({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getProductsByIds'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getProductsByIds', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useProductsByReferenceKeys<DataT = NormalizedRpcResponse<'getProductsByReferenceKeys'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getProductsByReferenceKeys'>>;
|
|
6
|
-
options: UseRpcOptions<'getProductsByReferenceKeys'>;
|
|
6
|
+
options: UseRpcOptions<'getProductsByReferenceKeys', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useProductsByReferenceKeys({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getProductsByReferenceKeys'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getProductsByReferenceKeys', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useProductsCount<DataT = NormalizedRpcResponse<'getProductsCount'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getProductsCount'>>;
|
|
6
|
-
options: UseRpcOptions<'getProductsCount'>;
|
|
6
|
+
options: UseRpcOptions<'getProductsCount', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useProductsCount({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getProductsCount'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getProductsCount', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function usePromotions<DataT = NormalizedRpcResponse<'getPromotions'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getPromotions'>>;
|
|
6
|
-
options: UseRpcOptions<'getPromotions'>;
|
|
6
|
+
options: UseRpcOptions<'getPromotions', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function usePromotions({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getPromotions'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getPromotions', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function usePromotionsByIds<DataT = NormalizedRpcResponse<'getPromotionsByIds'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getPromotionsByIds'>>;
|
|
6
|
-
options: UseRpcOptions<'getPromotionsByIds'>;
|
|
6
|
+
options: UseRpcOptions<'getPromotionsByIds', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function usePromotionsByIds({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getPromotionsByIds'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getPromotionsByIds', DataT, PickKeys, DefaultT>;
|
|
@@ -5,9 +5,9 @@ type Options = Partial<{
|
|
|
5
5
|
}>;
|
|
6
6
|
/** @deprecated `useSearch` is deprecated. Please, use `useSearchSuggestions` or `useSearchResolve` */
|
|
7
7
|
export declare function useSearch({ params, key }?: Options): {
|
|
8
|
-
data: import("vue").Ref<TypeaheadSuggestionsEndpointResponseData | undefined
|
|
9
|
-
pending: import("vue").Ref<boolean
|
|
10
|
-
searchQuery: import("vue").Ref<string
|
|
8
|
+
data: import("vue").Ref<TypeaheadSuggestionsEndpointResponseData | undefined>;
|
|
9
|
+
pending: import("vue").Ref<boolean>;
|
|
10
|
+
searchQuery: import("vue").Ref<string>;
|
|
11
11
|
resetSearch: () => void;
|
|
12
12
|
search: ({ term, slug, productLimit }: SearchInput) => Promise<void>;
|
|
13
13
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
-
|
|
3
|
-
options: UseRpcOptions<'getShopConfiguration'>;
|
|
1
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
export declare function useShopConfiguration<DataT = NormalizedRpcResponse<'getShopConfiguration'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ options, key: _key, }?: Partial<{
|
|
3
|
+
options: UseRpcOptions<'getShopConfiguration', DataT, PickKeys, DefaultT>;
|
|
4
4
|
/** @deprecated use the second argument of the composable to define the key */
|
|
5
5
|
key: string;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function useShopConfiguration({ options, key: _key, }?: Options, key?: string): UseRpcReturn<'getShopConfiguration'>;
|
|
8
|
-
export {};
|
|
6
|
+
}>, key?: string): UseRpcReturn<'getShopConfiguration', DataT, PickKeys, DefaultT>;
|
|
@@ -8,8 +8,8 @@ export type SearchOptions = Partial<{
|
|
|
8
8
|
key: string;
|
|
9
9
|
}>;
|
|
10
10
|
export declare function useStorefrontSearch(searchQuery: Ref<string>, { params, key }?: SearchOptions): {
|
|
11
|
-
data: import("vue").Ref<SearchV2SuggestionsEndpointResponseData | undefined
|
|
12
|
-
pending: import("vue").Ref<boolean
|
|
11
|
+
data: import("vue").Ref<SearchV2SuggestionsEndpointResponseData | undefined>;
|
|
12
|
+
pending: import("vue").Ref<boolean>;
|
|
13
13
|
resetSearch: () => void;
|
|
14
14
|
getSearchSuggestions: () => Promise<void>;
|
|
15
15
|
resolveSearch: () => Promise<import("@scayle/storefront-api").SearchEntity | null | undefined>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { UseRpcOptions, UseRpcReturn } from '../core/useRpc';
|
|
2
|
-
|
|
3
|
-
options: UseRpcOptions<'getShopUserAddresses'>;
|
|
1
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
export declare function useUserAddresses<DataT = NormalizedRpcResponse<'getShopUserAddresses'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ options, key: _key, }?: Partial<{
|
|
3
|
+
options: UseRpcOptions<'getShopUserAddresses', DataT, PickKeys, DefaultT>;
|
|
4
4
|
/** @deprecated use the second argument of the composable to define the key */
|
|
5
5
|
key: string;
|
|
6
|
-
}>;
|
|
7
|
-
export declare function useUserAddresses({ options, key: _key, }?: Options, key?: string): UseRpcReturn<'getShopUserAddresses'>;
|
|
8
|
-
export {};
|
|
6
|
+
}>, key?: string): UseRpcReturn<'getShopUserAddresses', DataT, PickKeys, DefaultT>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import {
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
|
-
|
|
4
|
+
export declare function useVariant<DataT = NormalizedRpcResponse<'getVariantById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getVariantById'>>;
|
|
6
|
-
options: UseRpcOptions<'getVariantById'>;
|
|
6
|
+
options: UseRpcOptions<'getVariantById', DataT, PickKeys, DefaultT>;
|
|
7
7
|
/** @deprecated use the second argument of the composable to define the key */
|
|
8
8
|
key: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare function useVariant({ params, options, key: _key, }?: Options, key?: string): UseRpcReturn<'getVariantById'>;
|
|
11
|
-
export {};
|
|
9
|
+
}>, key?: string): UseRpcReturn<'getVariantById', DataT, PickKeys, DefaultT>;
|
|
@@ -36,8 +36,8 @@ type UseWishlistBaseReturn = Awaited<UseRpcReturn<'getWishlist'>> & {
|
|
|
36
36
|
variantId?: number;
|
|
37
37
|
productId?: number;
|
|
38
38
|
}) => Promise<void>;
|
|
39
|
-
count: ComputedRef<number>;
|
|
40
|
-
items: ComputedRef<WishlistItem[]>;
|
|
39
|
+
count: ComputedRef<number | undefined>;
|
|
40
|
+
items: ComputedRef<WishlistItem[] | undefined>;
|
|
41
41
|
products: ComputedRef<Product[]>;
|
|
42
42
|
};
|
|
43
43
|
export declare function useWishlist({ params, key, }?: Options): UseWishlistBaseReturn & Promise<UseWishlistBaseReturn>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.85.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@nuxt/kit": "^3.12.2",
|
|
61
61
|
"@opentelemetry/api": "^1.9.0",
|
|
62
62
|
"@scayle/h3-session": "^0.4.0",
|
|
63
|
-
"@scayle/storefront-core": "7.64.
|
|
63
|
+
"@scayle/storefront-core": "7.64.3",
|
|
64
64
|
"@scayle/unstorage-compression-driver": "^0.1.3",
|
|
65
|
-
"@vueuse/core": "^
|
|
65
|
+
"@vueuse/core": "^11.0.0",
|
|
66
66
|
"consola": "^3.2.3",
|
|
67
67
|
"core-js": "^3.37.1",
|
|
68
68
|
"defu": "^6.1.4",
|
|
@@ -80,22 +80,22 @@
|
|
|
80
80
|
"zod": "^3.23.8"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@nuxt/eslint": "0.5.
|
|
83
|
+
"@nuxt/eslint": "0.5.3",
|
|
84
84
|
"@nuxt/module-builder": "0.5.5",
|
|
85
85
|
"@nuxt/schema": "3.12.4",
|
|
86
|
-
"@nuxt/test-utils": "3.14.
|
|
86
|
+
"@nuxt/test-utils": "3.14.1",
|
|
87
87
|
"@scayle/eslint-config-storefront": "4.3.0",
|
|
88
88
|
"@scayle/eslint-plugin-vue-composable": "0.2.0",
|
|
89
|
-
"@types/node": "20.
|
|
89
|
+
"@types/node": "20.16.1",
|
|
90
90
|
"dprint": "0.47.2",
|
|
91
|
-
"eslint": "9.9.
|
|
91
|
+
"eslint": "9.9.1",
|
|
92
92
|
"eslint-formatter-gitlab": "5.1.0",
|
|
93
93
|
"fishery": "2.2.2",
|
|
94
94
|
"h3": "1.12.0",
|
|
95
95
|
"node-mocks-http": "1.15.1",
|
|
96
|
-
"nuxi": "3.
|
|
96
|
+
"nuxi": "3.13.0",
|
|
97
97
|
"nuxt": "3.12.4",
|
|
98
|
-
"publint": "0.2.
|
|
98
|
+
"publint": "0.2.10",
|
|
99
99
|
"vitest": "2.0.5",
|
|
100
100
|
"vue-tsc": "2.0.29"
|
|
101
101
|
},
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
},
|
|
108
108
|
"resolutions": {
|
|
109
109
|
"h3": "1.12.0",
|
|
110
|
-
"vue": "3.4.
|
|
110
|
+
"vue": "3.4.38",
|
|
111
111
|
"@nuxt/kit": "3.12.4",
|
|
112
112
|
"@nuxt/schema": "3.12.4"
|
|
113
113
|
},
|
|
114
114
|
"volta": {
|
|
115
|
-
"node": "20.
|
|
115
|
+
"node": "20.17.0"
|
|
116
116
|
}
|
|
117
117
|
}
|