@scayle/storefront-nuxt 7.85.8 → 7.85.10
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 +12 -0
- package/dist/index.d.mts +5 -15
- package/dist/index.d.ts +5 -15
- package/dist/index.mjs +2 -16
- package/dist/module.d.mts +4 -4
- package/dist/module.d.ts +4 -4
- package/dist/module.json +5 -1
- package/dist/module.mjs +5 -25
- package/dist/rpc.d.mts +1 -16
- package/dist/rpc.d.ts +1 -16
- package/dist/rpc.mjs +1 -20
- package/dist/runtime/api/{purgeAll.mjs → purgeAll.js} +1 -1
- package/dist/runtime/api/{purgeTags.mjs → purgeTags.js} +1 -1
- package/dist/runtime/api/rpcHandler.d.ts +55 -1
- package/dist/runtime/api/{rpcHandler.mjs → rpcHandler.js} +3 -3
- package/dist/runtime/composables/core/useAvailableShops.d.ts +2 -2
- package/dist/runtime/composables/core/useCurrentShop.d.ts +1 -1
- package/dist/runtime/composables/core/{useFormatHelpers.mjs → useFormatHelpers.js} +1 -1
- package/dist/runtime/composables/core/useIDP.d.ts +1 -1
- package/dist/runtime/composables/core/{useIDP.mjs → useIDP.js} +3 -3
- package/dist/runtime/composables/core/{useRpc.mjs → useRpc.js} +3 -3
- package/dist/runtime/composables/core/{useRpcCall.mjs → useRpcCall.js} +2 -2
- package/dist/runtime/composables/core/{useSession.mjs → useSession.js} +1 -1
- package/dist/runtime/composables/core/useUser.d.ts +1 -1
- package/dist/runtime/composables/core/{useUser.mjs → useUser.js} +4 -4
- package/dist/runtime/composables/index.d.ts +36 -36
- package/dist/runtime/composables/index.js +36 -0
- package/dist/runtime/composables/storefront/useBasket.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useBasket.mjs → useBasket.js} +3 -3
- package/dist/runtime/composables/storefront/useBrand.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useBrand.mjs → useBrand.js} +1 -1
- package/dist/runtime/composables/storefront/useBrands.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useBrands.mjs → useBrands.js} +1 -1
- package/dist/runtime/composables/storefront/useCategories.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCategories.mjs → useCategories.js} +3 -3
- package/dist/runtime/composables/storefront/useCategoryById.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCategoryById.mjs → useCategoryById.js} +1 -1
- package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCategoryByPath.mjs → useCategoryByPath.js} +1 -1
- package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCurrentPromotions.mjs → useCurrentPromotions.js} +1 -1
- package/dist/runtime/composables/storefront/useFacet.d.ts +28 -24
- package/dist/runtime/composables/storefront/{useFacet.mjs → useFacet.js} +5 -5
- package/dist/runtime/composables/storefront/useFilters.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useFilters.mjs → useFilters.js} +1 -1
- package/dist/runtime/composables/storefront/useNavigationTree.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useNavigationTree.mjs → useNavigationTree.js} +1 -1
- package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useNavigationTrees.mjs → useNavigationTrees.js} +1 -1
- package/dist/runtime/composables/storefront/useOrder.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useOrder.mjs → useOrder.js} +1 -1
- package/dist/runtime/composables/storefront/useOrderConfirmation.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useOrderConfirmation.mjs → useOrderConfirmation.js} +1 -1
- package/dist/runtime/composables/storefront/useProduct.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProduct.mjs → useProduct.js} +1 -1
- package/dist/runtime/composables/storefront/useProducts.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProducts.mjs → useProducts.js} +1 -1
- package/dist/runtime/composables/storefront/useProductsByIds.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProductsByIds.mjs → useProductsByIds.js} +1 -1
- package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProductsByReferenceKeys.mjs → useProductsByReferenceKeys.js} +1 -1
- package/dist/runtime/composables/storefront/useProductsCount.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProductsCount.mjs → useProductsCount.js} +1 -1
- package/dist/runtime/composables/storefront/usePromotions.d.ts +1 -1
- package/dist/runtime/composables/storefront/{usePromotions.mjs → usePromotions.js} +1 -1
- package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +1 -1
- package/dist/runtime/composables/storefront/{usePromotionsByIds.mjs → usePromotionsByIds.js} +1 -1
- package/dist/runtime/composables/storefront/{useQueryFilterState.mjs → useQueryFilterState.js} +1 -1
- package/dist/runtime/composables/storefront/useSearch.d.ts +3 -3
- package/dist/runtime/composables/storefront/{useSearch.mjs → useSearch.js} +1 -1
- package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useShopConfiguration.mjs → useShopConfiguration.js} +1 -1
- package/dist/runtime/composables/storefront/useStorefrontSearch.d.ts +2 -2
- package/dist/runtime/composables/storefront/{useStorefrontSearch.mjs → useStorefrontSearch.js} +1 -1
- package/dist/runtime/composables/storefront/useUserAddresses.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useUserAddresses.mjs → useUserAddresses.js} +1 -1
- package/dist/runtime/composables/storefront/useVariant.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useVariant.mjs → useVariant.js} +1 -1
- package/dist/runtime/composables/storefront/useWishlist.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useWishlist.mjs → useWishlist.js} +3 -3
- package/dist/runtime/composables/{useCoreLog.mjs → useCoreLog.js} +1 -1
- package/dist/runtime/context.d.ts +1 -1
- package/dist/runtime/{context.mjs → context.js} +2 -2
- package/dist/runtime/createLog.d.ts +2 -2
- package/dist/runtime/{createLog.mjs → createLog.js} +1 -1
- package/dist/runtime/error/handler.d.ts +1 -1
- package/dist/runtime/nitro/plugins/cacheRuntimeConfig.d.ts +1 -1
- package/dist/runtime/nitro/plugins/{cacheRuntimeConfig.mjs → cacheRuntimeConfig.js} +2 -1
- package/dist/runtime/nitro/plugins/configValidation.d.ts +8 -3
- package/dist/runtime/nitro/plugins/{configValidation.mjs → configValidation.js} +8 -6
- package/dist/runtime/nitro/plugins/nitroLogger.d.ts +1 -1
- package/dist/runtime/nitro/plugins/{nitroLogger.mjs → nitroLogger.js} +3 -2
- package/dist/runtime/nitro/plugins/nitroRuntimeStorageConfig.d.ts +1 -1
- package/dist/runtime/nitro/plugins/{nitroRuntimeStorageConfig.mjs → nitroRuntimeStorageConfig.js} +9 -7
- package/dist/runtime/nitro/plugins/nitroSetXPoweredByHeader.d.ts +1 -1
- package/dist/runtime/nitro/plugins/{nitroSetXPoweredByHeader.mjs → nitroSetXPoweredByHeader.js} +1 -1
- package/dist/runtime/plugin/{log.client.mjs → log.client.js} +1 -1
- package/dist/runtime/plugin/{shop.mjs → shop.js} +2 -2
- package/dist/runtime/rpc/rpcCall.d.ts +1 -1
- package/dist/runtime/server/middleware/{bootstrap.utils.d.ts → bootstrap-utils.d.ts} +7 -3
- package/dist/runtime/server/middleware/{bootstrap.utils.mjs → bootstrap-utils.js} +2 -2
- package/dist/runtime/server/middleware/bootstrap.d.ts +1 -1
- package/dist/runtime/server/middleware/{bootstrap.mjs → bootstrap.js} +5 -5
- package/dist/runtime/server/middleware/{redirects.mjs → redirects.js} +1 -1
- package/dist/runtime/server/tsconfig.json +1 -1
- package/dist/runtime/server/utils/cacheStorage.d.ts +1 -1
- package/dist/runtime/utils/zodSchema.d.ts +261 -153
- package/dist/runtime/utils/{zodSchema.mjs → zodSchema.js} +16 -7
- package/dist/shared/storefront-nuxt.80aa5060.d.mts +102 -0
- package/dist/shared/storefront-nuxt.80aa5060.d.ts +102 -0
- package/dist/types.d.mts +48 -0
- package/dist/types.d.ts +48 -0
- package/package.json +15 -13
- package/dist/runtime/composables/index.mjs +0 -36
- package/dist/shared/storefront-nuxt.891170da.d.mts +0 -1205
- package/dist/shared/storefront-nuxt.891170da.d.ts +0 -1205
- /package/dist/runtime/api/{cacheAuth.mjs → cacheAuth.js} +0 -0
- /package/dist/runtime/api/{up.mjs → up.js} +0 -0
- /package/dist/runtime/{campaignKey.mjs → campaignKey.js} +0 -0
- /package/dist/runtime/composables/core/{useAvailableShops.mjs → useAvailableShops.js} +0 -0
- /package/dist/runtime/composables/core/{useCurrentShop.mjs → useCurrentShop.js} +0 -0
- /package/dist/runtime/composables/core/{useLog.mjs → useLog.js} +0 -0
- /package/dist/runtime/error/{handler.mjs → handler.js} +0 -0
- /package/dist/runtime/{handler.mjs → handler.js} +0 -0
- /package/dist/runtime/{log.mjs → log.js} +0 -0
- /package/dist/runtime/plugin/{log.server.mjs → log.server.js} +0 -0
- /package/dist/runtime/rpc/{rpcCall.mjs → rpcCall.js} +0 -0
- /package/dist/runtime/server/middleware/{redirects.utils.mjs → redirects.utils.js} +0 -0
- /package/dist/runtime/server/utils/{cacheStorage.mjs → cacheStorage.js} +0 -0
- /package/dist/runtime/utils/{promise.mjs → promise.js} +0 -0
- /package/dist/runtime/utils/{route.mjs → route.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters, RpcMethodReturnType } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
3
3
|
import type { MaybeRefOrGetter } from '#imports';
|
|
4
4
|
type UseCategoriesBaseReturn<DataT, PickKeys extends KeysOf<DataT>, DefaultT> = Pick<Awaited<UseRpcReturn<'getCategoriesByPath', DataT, PickKeys, DefaultT>>, 'data' | 'error' | 'status' | 'fetch' | 'fetching' | 'refresh'> & {
|
|
5
5
|
getCategoryById: (id: number, includeHidden?: true) => RpcMethodReturnType<'getCategoryById'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useRpc } from "../core/useRpc.
|
|
2
|
-
import { extendPromise } from "../../utils/promise.
|
|
3
|
-
import { useRpcCall } from "../core/useRpcCall.
|
|
1
|
+
import { useRpc } from "../core/useRpc.js";
|
|
2
|
+
import { extendPromise } from "../../utils/promise.js";
|
|
3
|
+
import { useRpcCall } from "../core/useRpcCall.js";
|
|
4
4
|
export function useCategories({
|
|
5
5
|
params,
|
|
6
6
|
options,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -16,17 +16,19 @@ type Options = Partial<{
|
|
|
16
16
|
}>;
|
|
17
17
|
export declare function useFacet({ key: optionsKey, params, }?: Options, _key?: string): {
|
|
18
18
|
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
19
|
-
filtersFetching: import("vue").Ref<boolean>;
|
|
19
|
+
filtersFetching: import("vue").Ref<boolean, boolean>;
|
|
20
20
|
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
21
|
-
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
22
|
-
filterError: import("vue").Ref<
|
|
21
|
+
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
22
|
+
filterError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
23
23
|
productCountData: import("vue").Ref<{
|
|
24
24
|
count: number;
|
|
25
|
+
} | null, {
|
|
26
|
+
count: number;
|
|
25
27
|
} | null>;
|
|
26
28
|
refreshProductCount: ({ where, }?: FilterParams) => Promise<void>;
|
|
27
|
-
productCountFetching: import("vue").Ref<boolean>;
|
|
28
|
-
productCountError: import("vue").Ref<
|
|
29
|
-
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
29
|
+
productCountFetching: import("vue").Ref<boolean, boolean>;
|
|
30
|
+
productCountError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
31
|
+
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
30
32
|
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
31
33
|
pagination: import("vue").ComputedRef<{
|
|
32
34
|
current: number;
|
|
@@ -38,15 +40,15 @@ export declare function useFacet({ key: optionsKey, params, }?: Options, _key?:
|
|
|
38
40
|
next: number;
|
|
39
41
|
last: number;
|
|
40
42
|
} | undefined>;
|
|
41
|
-
productsFetching: import("vue").Ref<boolean>;
|
|
43
|
+
productsFetching: import("vue").Ref<boolean, boolean>;
|
|
42
44
|
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
43
|
-
productError: import("vue").Ref<
|
|
44
|
-
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
45
|
+
productError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
46
|
+
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
45
47
|
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
46
48
|
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
47
|
-
categoriesFetching: import("vue").Ref<boolean>;
|
|
48
|
-
categoriesError: import("vue").Ref<
|
|
49
|
-
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
49
|
+
categoriesFetching: import("vue").Ref<boolean, boolean>;
|
|
50
|
+
categoriesError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
51
|
+
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
50
52
|
fetchProducts: ({ path, page, perPage, where, sort, pricePromotionKey, cache, orFiltersOperator, }: FilterParams & {
|
|
51
53
|
path: string;
|
|
52
54
|
pricePromotionKey?: string;
|
|
@@ -55,17 +57,19 @@ export declare function useFacet({ key: optionsKey, params, }?: Options, _key?:
|
|
|
55
57
|
fetchPage: (pageToFetch: number) => Promise<void>;
|
|
56
58
|
} & Promise<{
|
|
57
59
|
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
58
|
-
filtersFetching: import("vue").Ref<boolean>;
|
|
60
|
+
filtersFetching: import("vue").Ref<boolean, boolean>;
|
|
59
61
|
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
60
|
-
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
61
|
-
filterError: import("vue").Ref<
|
|
62
|
+
filterStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
63
|
+
filterError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
62
64
|
productCountData: import("vue").Ref<{
|
|
63
65
|
count: number;
|
|
66
|
+
} | null, {
|
|
67
|
+
count: number;
|
|
64
68
|
} | null>;
|
|
65
69
|
refreshProductCount: ({ where, }?: FilterParams) => Promise<void>;
|
|
66
|
-
productCountFetching: import("vue").Ref<boolean>;
|
|
67
|
-
productCountError: import("vue").Ref<
|
|
68
|
-
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
70
|
+
productCountFetching: import("vue").Ref<boolean, boolean>;
|
|
71
|
+
productCountError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
72
|
+
productCountStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
69
73
|
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
70
74
|
pagination: import("vue").ComputedRef<{
|
|
71
75
|
current: number;
|
|
@@ -77,15 +81,15 @@ export declare function useFacet({ key: optionsKey, params, }?: Options, _key?:
|
|
|
77
81
|
next: number;
|
|
78
82
|
last: number;
|
|
79
83
|
} | undefined>;
|
|
80
|
-
productsFetching: import("vue").Ref<boolean>;
|
|
84
|
+
productsFetching: import("vue").Ref<boolean, boolean>;
|
|
81
85
|
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
82
|
-
productError: import("vue").Ref<
|
|
83
|
-
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
86
|
+
productError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
87
|
+
productStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
84
88
|
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
85
89
|
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
86
|
-
categoriesFetching: import("vue").Ref<boolean>;
|
|
87
|
-
categoriesError: import("vue").Ref<
|
|
88
|
-
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
90
|
+
categoriesFetching: import("vue").Ref<boolean, boolean>;
|
|
91
|
+
categoriesError: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null, import("nuxt/app").NuxtError<unknown> | null>;
|
|
92
|
+
categoriesStatus: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus, import("nuxt/app").AsyncDataRequestStatus>;
|
|
89
93
|
fetchProducts: ({ path, page, perPage, where, sort, pricePromotionKey, cache, orFiltersOperator, }: FilterParams & {
|
|
90
94
|
path: string;
|
|
91
95
|
pricePromotionKey?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useState } from "nuxt/app";
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import { useCategories } from "../storefront/useCategories.
|
|
4
|
-
import { useFilters } from "../storefront/useFilters.
|
|
5
|
-
import { useProducts } from "../storefront/useProducts.
|
|
6
|
-
import { useProductsCount } from "../storefront/useProductsCount.
|
|
7
|
-
import { extendPromise } from "../../utils/promise.
|
|
3
|
+
import { useCategories } from "../storefront/useCategories.js";
|
|
4
|
+
import { useFilters } from "../storefront/useFilters.js";
|
|
5
|
+
import { useProducts } from "../storefront/useProducts.js";
|
|
6
|
+
import { useProductsCount } from "../storefront/useProductsCount.js";
|
|
7
|
+
import { extendPromise } from "../../utils/promise.js";
|
|
8
8
|
export function useFacet({
|
|
9
9
|
key: optionsKey,
|
|
10
10
|
params = { initialPath: "/" }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcReturn, UseRpcOptions, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcReturn, UseRpcOptions, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RpcMethodParameters, Order } from '@scayle/storefront-core';
|
|
2
2
|
import type { AsyncDataOptions } from 'nuxt/app';
|
|
3
|
-
import { type RpcOptions, type KeysOf, type ExtendedAsyncData } from '../core/useRpc';
|
|
3
|
+
import { type RpcOptions, type KeysOf, type ExtendedAsyncData } from '../core/useRpc.js';
|
|
4
4
|
import type { MaybeRefOrGetter } from 'vue';
|
|
5
5
|
type ItemsType = Exclude<Order['items'], undefined>;
|
|
6
6
|
type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RpcMethodParameters, Order } from '@scayle/storefront-core';
|
|
2
2
|
import type { AsyncDataOptions } from 'nuxt/app';
|
|
3
|
-
import type { RpcOptions, ExtendedAsyncData, KeysOf } from '../core/useRpc';
|
|
3
|
+
import type { RpcOptions, ExtendedAsyncData, KeysOf } from '../core/useRpc.js';
|
|
4
4
|
import type { MaybeRefOrGetter } from 'vue';
|
|
5
5
|
type ItemsType = Exclude<Order['items'], undefined>;
|
|
6
6
|
type NewItemsType<P, V> = Exclude<ItemsType[number], 'product' | 'variant'> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
2
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
package/dist/runtime/composables/storefront/{useQueryFilterState.mjs → useQueryFilterState.js}
RENAMED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getSortByValue
|
|
7
7
|
} from "@scayle/storefront-core";
|
|
8
8
|
import { computed } from "vue";
|
|
9
|
-
import { getCurrentPage } from "../../utils/route.
|
|
9
|
+
import { getCurrentPage } from "../../utils/route.js";
|
|
10
10
|
import { useRoute, useRouter } from "#imports";
|
|
11
11
|
const DEFAULT_QUERY_KEYS = ["page", "sort", "term"];
|
|
12
12
|
function queryValueToString(value) {
|
|
@@ -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, TypeaheadSuggestionsEndpointResponseData | undefined>;
|
|
9
|
+
pending: import("vue").Ref<boolean, boolean>;
|
|
10
|
+
searchQuery: import("vue").Ref<string, string>;
|
|
11
11
|
resetSearch: () => void;
|
|
12
12
|
search: ({ term, slug, productLimit }: SearchInput) => Promise<void>;
|
|
13
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
1
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
2
2
|
export declare function useShopConfiguration<DataT = NormalizedRpcResponse<'getShopConfiguration'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ options, key: _key, }?: Partial<{
|
|
3
3
|
options: UseRpcOptions<'getShopConfiguration', DataT, PickKeys, DefaultT>;
|
|
4
4
|
/** @deprecated use the second argument of the composable to define the key */
|
|
@@ -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:
|
|
12
|
-
pending:
|
|
11
|
+
data: Ref<SearchV2SuggestionsEndpointResponseData | undefined, SearchV2SuggestionsEndpointResponseData | undefined>;
|
|
12
|
+
pending: Ref<boolean, boolean>;
|
|
13
13
|
resetSearch: () => void;
|
|
14
14
|
getSearchSuggestions: () => Promise<void>;
|
|
15
15
|
resolveSearch: () => Promise<import("@scayle/storefront-api").SearchEntity | null | undefined>;
|
package/dist/runtime/composables/storefront/{useStorefrontSearch.mjs → useStorefrontSearch.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "nuxt/app";
|
|
2
|
-
import { useRpcCall } from "../core/useRpcCall.
|
|
2
|
+
import { useRpcCall } from "../core/useRpcCall.js";
|
|
3
3
|
export function useStorefrontSearch(searchQuery, { params, key = "search" } = {}) {
|
|
4
4
|
const data = useState(
|
|
5
5
|
`${key}-data`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
|
|
1
|
+
import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
|
|
2
2
|
export declare function useUserAddresses<DataT = NormalizedRpcResponse<'getShopUserAddresses'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ options, key: _key, }?: Partial<{
|
|
3
3
|
options: UseRpcOptions<'getShopUserAddresses', DataT, PickKeys, DefaultT>;
|
|
4
4
|
/** @deprecated use the second argument of the composable to define the key */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
|
|
2
|
+
import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
|
|
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'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Product, WishlistItem, RpcMethodParameters } from '@scayle/storefront-core';
|
|
2
|
-
import { type UseRpcReturn } from '../core/useRpc';
|
|
2
|
+
import { type UseRpcReturn } from '../core/useRpc.js';
|
|
3
3
|
import type { MaybeRefOrGetter, ComputedRef } from '#imports';
|
|
4
4
|
type Options = Partial<{
|
|
5
5
|
params: MaybeRefOrGetter<RpcMethodParameters<'getWishlist'>>;
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "@scayle/storefront-core";
|
|
6
6
|
import { useNuxtApp } from "nuxt/app";
|
|
7
7
|
import { computed } from "vue";
|
|
8
|
-
import { useRpc } from "../core/useRpc.
|
|
9
|
-
import { extendPromise } from "../../utils/promise.
|
|
8
|
+
import { useRpc } from "../core/useRpc.js";
|
|
9
|
+
import { extendPromise } from "../../utils/promise.js";
|
|
10
10
|
import { toValue, toRef } from "#imports";
|
|
11
|
-
import { useRpcCall } from "../core/useRpcCall.
|
|
11
|
+
import { useRpcCall } from "../core/useRpcCall.js";
|
|
12
12
|
export function useWishlist({
|
|
13
13
|
params,
|
|
14
14
|
key = "useWishlist"
|
|
@@ -3,7 +3,7 @@ import type { RuntimeConfig } from '@nuxt/schema';
|
|
|
3
3
|
import { type H3Event } from 'h3';
|
|
4
4
|
import type { Log, RpcContext, Cache as CacheInterface } from '@scayle/storefront-core';
|
|
5
5
|
import { StorefrontAPIClient } from '@scayle/storefront-core';
|
|
6
|
-
import type { ShopConfig, StorefrontConfig } from '../module';
|
|
6
|
+
import type { ShopConfig, StorefrontConfig } from '../module.js';
|
|
7
7
|
export interface ContextBuilderOptions {
|
|
8
8
|
$cache: CacheInterface;
|
|
9
9
|
$shopConfig: ShopConfig;
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
generateBasketKey,
|
|
9
9
|
generateWishlistKey
|
|
10
10
|
} from "@scayle/storefront-core/dist/utils/keys";
|
|
11
|
-
import { useNitroApp } from "
|
|
12
|
-
import { fetchCampaignKey } from "./campaignKey.
|
|
11
|
+
import { useNitroApp } from "nitropack/runtime";
|
|
12
|
+
import { fetchCampaignKey } from "./campaignKey.js";
|
|
13
13
|
async function getWishlistKey(appKeys, session, $log, $shopConfig) {
|
|
14
14
|
return session.data.user ? await generateWishlistKey({
|
|
15
15
|
keyTemplate: appKeys.wishlistKey,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ConsolaInstance, ConsolaOptions } from 'consola';
|
|
2
|
-
import type { LogLevel } from '../types/module';
|
|
3
|
-
import { Log } from './log';
|
|
2
|
+
import type { LogLevel } from '../types/module.js';
|
|
3
|
+
import { Log } from './log.js';
|
|
4
4
|
export default function createLog(createConsola: (options?: Partial<ConsolaOptions>) => ConsolaInstance, space: string | undefined, level: LogLevel): Log;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const resolveError: (error: Error | unknown) => {
|
|
2
|
-
statusCode: 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 506 | 507 | 508 | 510 | 511
|
|
2
|
+
statusCode: 100 | 101 | 102 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
|
|
3
3
|
statusMessage: string;
|
|
4
4
|
name: string;
|
|
5
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("nitropack").NitroAppPlugin;
|
|
2
2
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineNitroPlugin
|
|
1
|
+
import { defineNitroPlugin } from "nitropack/runtime/plugin";
|
|
2
|
+
import { useRuntimeConfig } from "#imports";
|
|
2
3
|
export default defineNitroPlugin((nitroApp) => {
|
|
3
4
|
const runtimeConfig = useRuntimeConfig();
|
|
4
5
|
nitroApp.hooks.hook("request", (event) => {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { RuntimeConfig } from '@nuxt/schema';
|
|
2
2
|
import type { ZodIssue } from 'zod';
|
|
3
3
|
export declare const sensitiveKeys: string[];
|
|
4
|
-
export declare const getValue: (object:
|
|
5
|
-
export declare const formatZodError: (issues: Array<ZodIssue>, runtimeConfig: RuntimeConfig) =>
|
|
6
|
-
|
|
4
|
+
export declare const getValue: (object: Record<string | number, unknown>, pathArray: (string | number)[]) => string;
|
|
5
|
+
export declare const formatZodError: (issues: Array<ZodIssue>, runtimeConfig: RuntimeConfig) => (ZodIssue | {
|
|
6
|
+
code: string;
|
|
7
|
+
path: string;
|
|
8
|
+
message: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
})[];
|
|
11
|
+
declare const _default: import("nitropack").NitroAppPlugin;
|
|
7
12
|
export default _default;
|