@scayle/storefront-nuxt 7.95.3 → 8.0.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 +484 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/module.d.mts +2 -2
- package/dist/module.d.ts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -6
- package/dist/runtime/api/rpcHandler.d.ts +4 -6
- package/dist/runtime/campaignKey.d.ts +1 -2
- package/dist/runtime/campaignKey.js +3 -9
- package/dist/runtime/composables/core/useIDP.d.ts +2 -4
- package/dist/runtime/composables/core/useIDP.js +1 -8
- package/dist/runtime/composables/core/useRpc.d.ts +4 -17
- package/dist/runtime/composables/core/useRpc.js +11 -20
- package/dist/runtime/composables/core/useSession.d.ts +1 -1
- package/dist/runtime/composables/core/useUser.d.ts +2 -4
- package/dist/runtime/composables/core/useUser.js +3 -12
- package/dist/runtime/composables/index.d.ts +0 -3
- package/dist/runtime/composables/index.js +0 -3
- package/dist/runtime/composables/storefront/useBasket.d.ts +6 -4
- package/dist/runtime/composables/storefront/useBasket.js +68 -38
- package/dist/runtime/composables/storefront/useBrand.d.ts +2 -4
- package/dist/runtime/composables/storefront/useBrand.js +3 -4
- package/dist/runtime/composables/storefront/useBrands.d.ts +2 -4
- package/dist/runtime/composables/storefront/useBrands.js +3 -4
- package/dist/runtime/composables/storefront/useCategories.d.ts +3 -5
- package/dist/runtime/composables/storefront/useCategories.js +3 -8
- package/dist/runtime/composables/storefront/useCategoryById.d.ts +2 -4
- package/dist/runtime/composables/storefront/useCategoryById.js +3 -4
- package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +2 -4
- package/dist/runtime/composables/storefront/useCategoryByPath.js +3 -4
- package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +2 -4
- package/dist/runtime/composables/storefront/useCurrentPromotions.js +3 -4
- package/dist/runtime/composables/storefront/useFilters.d.ts +2 -4
- package/dist/runtime/composables/storefront/useFilters.js +3 -4
- package/dist/runtime/composables/storefront/useNavigationTree.d.ts +3 -11
- package/dist/runtime/composables/storefront/useNavigationTree.js +6 -9
- package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +2 -4
- package/dist/runtime/composables/storefront/useNavigationTrees.js +3 -4
- package/dist/runtime/composables/storefront/useOrder.d.ts +3 -5
- package/dist/runtime/composables/storefront/useOrder.js +3 -5
- package/dist/runtime/composables/storefront/useOrderConfirmation.d.ts +3 -5
- package/dist/runtime/composables/storefront/useOrderConfirmation.js +2 -2
- package/dist/runtime/composables/storefront/useProduct.d.ts +2 -4
- package/dist/runtime/composables/storefront/useProduct.js +3 -4
- package/dist/runtime/composables/storefront/useProducts.d.ts +2 -4
- package/dist/runtime/composables/storefront/useProducts.js +3 -4
- package/dist/runtime/composables/storefront/useProductsByIds.d.ts +2 -4
- package/dist/runtime/composables/storefront/useProductsByIds.js +3 -4
- package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +2 -4
- package/dist/runtime/composables/storefront/useProductsByReferenceKeys.js +3 -4
- package/dist/runtime/composables/storefront/useProductsCount.d.ts +2 -4
- package/dist/runtime/composables/storefront/useProductsCount.js +3 -4
- package/dist/runtime/composables/storefront/usePromotions.d.ts +2 -4
- package/dist/runtime/composables/storefront/usePromotions.js +3 -4
- package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +2 -4
- package/dist/runtime/composables/storefront/usePromotionsByIds.js +3 -4
- package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +1 -3
- package/dist/runtime/composables/storefront/useShopConfiguration.js +3 -4
- package/dist/runtime/composables/storefront/useStorefrontSearch.d.ts +5 -3
- package/dist/runtime/composables/storefront/useStorefrontSearch.js +3 -5
- package/dist/runtime/composables/storefront/useUserAddresses.d.ts +1 -3
- package/dist/runtime/composables/storefront/useUserAddresses.js +3 -4
- package/dist/runtime/composables/storefront/useVariant.d.ts +2 -4
- package/dist/runtime/composables/storefront/useVariant.js +3 -4
- package/dist/runtime/composables/storefront/useWishlist.d.ts +2 -3
- package/dist/runtime/composables/storefront/useWishlist.js +12 -21
- package/dist/runtime/context.js +1 -5
- package/dist/runtime/createLog.d.ts +1 -1
- package/dist/runtime/error/handler.d.ts +1 -1
- package/dist/runtime/error/handler.js +1 -28
- package/dist/runtime/nitro/plugins/nitroRuntimeStorageConfig.js +5 -93
- package/dist/runtime/plugin/shop.d.ts +4 -4
- package/dist/runtime/rpc/rpcCall.d.ts +1 -1
- package/dist/runtime/server/middleware/bootstrap-utils.d.ts +1 -5
- package/dist/runtime/server/middleware/bootstrap-utils.js +2 -4
- package/dist/runtime/server/middleware/bootstrap.js +3 -5
- package/dist/runtime/server/utils/cacheStorage.d.ts +1 -1
- package/dist/runtime/server/utils/cacheStorage.js +2 -2
- package/dist/runtime/utils/zodSchema.d.ts +467 -1840
- package/dist/runtime/utils/zodSchema.js +34 -83
- package/dist/shared/{storefront-nuxt.80aa5060.d.ts → storefront-nuxt.a816664e.d.mts} +4 -25
- package/dist/shared/{storefront-nuxt.80aa5060.d.mts → storefront-nuxt.a816664e.d.ts} +4 -25
- package/dist/test/factories.d.mts +1 -1
- package/dist/test/factories.d.ts +1 -1
- package/dist/test/factories.mjs +0 -2
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +9 -9
- package/dist/runtime/composables/storefront/useFacet.d.ts +0 -100
- package/dist/runtime/composables/storefront/useFacet.js +0 -210
- package/dist/runtime/composables/storefront/useQueryFilterState.d.ts +0 -13
- package/dist/runtime/composables/storefront/useQueryFilterState.js +0 -78
- package/dist/runtime/composables/storefront/useSearch.d.ts +0 -14
- package/dist/runtime/composables/storefront/useSearch.js +0 -44
|
@@ -4,19 +4,6 @@ export const RedirectsSchema = z.object({
|
|
|
4
4
|
enabled: z.boolean(),
|
|
5
5
|
queryParamWhitelist: z.array(z.string()).optional()
|
|
6
6
|
});
|
|
7
|
-
const RedisConfigSchema = z.object({
|
|
8
|
-
port: z.number().optional(),
|
|
9
|
-
host: z.string().optional(),
|
|
10
|
-
prefix: z.string().optional(),
|
|
11
|
-
sslTransit: z.boolean().optional()
|
|
12
|
-
}).or(z.object({
|
|
13
|
-
port: z.number().optional(),
|
|
14
|
-
host: z.string().optional(),
|
|
15
|
-
prefix: z.string().optional(),
|
|
16
|
-
sslTransit: z.boolean().optional(),
|
|
17
|
-
user: z.string(),
|
|
18
|
-
password: z.string()
|
|
19
|
-
}));
|
|
20
7
|
const SessionSchema = z.object({
|
|
21
8
|
/**
|
|
22
9
|
* The sameSite policy to use for the session cookie
|
|
@@ -38,12 +25,7 @@ const SessionSchema = z.object({
|
|
|
38
25
|
/**
|
|
39
26
|
* Controls the domain option on the session cookie
|
|
40
27
|
*/
|
|
41
|
-
domain: z.string().optional()
|
|
42
|
-
/**
|
|
43
|
-
* The provider to use for the persistent storage.
|
|
44
|
-
* @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead.
|
|
45
|
-
*/
|
|
46
|
-
provider: z.enum(["redis", "memory"]).optional()
|
|
28
|
+
domain: z.string().optional()
|
|
47
29
|
});
|
|
48
30
|
const SapiSchema = z.object({
|
|
49
31
|
host: z.string().url(),
|
|
@@ -59,6 +41,9 @@ const IdpSchema = z.object({
|
|
|
59
41
|
idpKeys: z.array(z.string()),
|
|
60
42
|
idpRedirectURL: z.string()
|
|
61
43
|
});
|
|
44
|
+
const LegacySchema = z.object({
|
|
45
|
+
enableSessionMigration: z.boolean().optional()
|
|
46
|
+
});
|
|
62
47
|
const builtinDriverKeys = Object.keys(builtinDrivers);
|
|
63
48
|
const StorageSchema = z.object({
|
|
64
49
|
driver: z.enum(builtinDriverKeys),
|
|
@@ -107,81 +92,44 @@ const ShopConfigSchema = z.object({
|
|
|
107
92
|
isEnabled: z.boolean().optional(),
|
|
108
93
|
sessionConfig: SessionSchema.optional(),
|
|
109
94
|
sapi: SapiSchema.optional(),
|
|
110
|
-
bapi: SapiSchema.optional(),
|
|
111
95
|
storage: z.object({
|
|
112
96
|
session: StorageSchema.optional(),
|
|
113
97
|
cache: StorageSchema.optional()
|
|
114
98
|
}).optional(),
|
|
115
|
-
isDefault: z.boolean().optional().or(emptyString)
|
|
116
|
-
/** @deprecated shop-specific storefront.redis config is being removed in favor of global nitro.storage config */
|
|
117
|
-
redis: RedisConfigSchema.optional(),
|
|
118
|
-
/**
|
|
119
|
-
* @deprecated storeCampaignKeyword will be removed in a future release.
|
|
120
|
-
*/
|
|
121
|
-
storeCampaignKeyword: z.string().optional()
|
|
99
|
+
isDefault: z.boolean().optional().or(emptyString)
|
|
122
100
|
});
|
|
123
101
|
const CacheSchema = z.object({
|
|
124
102
|
auth: z.object({
|
|
125
103
|
username: z.string(),
|
|
126
104
|
password: z.string()
|
|
127
105
|
}).optional(),
|
|
128
|
-
enabled: z.boolean().optional()
|
|
129
|
-
/**
|
|
130
|
-
* The provider to use for the persistent storage.
|
|
131
|
-
* @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead.
|
|
132
|
-
*/
|
|
133
|
-
provider: z.enum(["redis", "memory"]).optional()
|
|
106
|
+
enabled: z.boolean().optional()
|
|
134
107
|
});
|
|
135
108
|
const ShopSelectorSchema = z.enum(["path", "domain", "path_or_default"]);
|
|
136
|
-
const StorefrontConfigSchema = z.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
bapi: SapiSchema,
|
|
161
|
-
sapi: z.undefined()
|
|
162
|
-
})
|
|
163
|
-
])
|
|
164
|
-
);
|
|
165
|
-
const ModuleOptionSchema = z.intersection(
|
|
166
|
-
z.object(
|
|
167
|
-
{
|
|
168
|
-
shopSelector: ShopSelectorSchema,
|
|
169
|
-
redirects: RedirectsSchema.optional()
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
z.union([
|
|
173
|
-
z.object({
|
|
174
|
-
/**
|
|
175
|
-
* @deprecated stores was renamed. Use {@link shops} instead
|
|
176
|
-
*/
|
|
177
|
-
stores: z.record(ShopConfigSchema),
|
|
178
|
-
shops: z.undefined()
|
|
179
|
-
}),
|
|
180
|
-
z.object({
|
|
181
|
-
stores: z.undefined(),
|
|
182
|
-
shops: z.record(ShopConfigSchema)
|
|
183
|
-
})
|
|
184
|
-
])
|
|
109
|
+
const StorefrontConfigSchema = z.object({
|
|
110
|
+
session: SessionSchema.optional(),
|
|
111
|
+
storage: z.object({
|
|
112
|
+
session: StorageSchema.optional(),
|
|
113
|
+
cache: StorageSchema.optional()
|
|
114
|
+
}).optional(),
|
|
115
|
+
oauth: OAuthSchema,
|
|
116
|
+
appKeys: AppKeysSchema,
|
|
117
|
+
apiBasePath: z.string().optional(),
|
|
118
|
+
cache: CacheSchema.optional(),
|
|
119
|
+
publicShopData: z.array(z.string()).optional(),
|
|
120
|
+
idp: IdpSchema.optional(),
|
|
121
|
+
sapi: SapiSchema,
|
|
122
|
+
/** Collection of feature flags regarding legacy features and functionalities */
|
|
123
|
+
legacy: LegacySchema.optional(),
|
|
124
|
+
/** Undocumented property intended for internal usage only */
|
|
125
|
+
internalAccessHeader: z.string().optional()
|
|
126
|
+
});
|
|
127
|
+
const ModuleOptionSchema = z.object(
|
|
128
|
+
{
|
|
129
|
+
shopSelector: ShopSelectorSchema,
|
|
130
|
+
redirects: RedirectsSchema.optional(),
|
|
131
|
+
shops: z.record(ShopConfigSchema)
|
|
132
|
+
}
|
|
185
133
|
);
|
|
186
134
|
const logLevel = z.enum(["debug", "info", "warn", "error"]);
|
|
187
135
|
const PublicRuntimeConfigSchema = z.object({
|
|
@@ -189,7 +137,10 @@ const PublicRuntimeConfigSchema = z.object({
|
|
|
189
137
|
name: z.string(),
|
|
190
138
|
level: logLevel
|
|
191
139
|
}),
|
|
192
|
-
|
|
140
|
+
/** Collection of feature flags regarding legacy features and functionalities */
|
|
141
|
+
legacy: z.object({
|
|
142
|
+
enableDefaultGetCachedDataOverride: z.boolean().optional()
|
|
143
|
+
}).optional()
|
|
193
144
|
});
|
|
194
145
|
export const RuntimeConfigSchema = z.object({
|
|
195
146
|
storefront: z.intersection(ModuleOptionSchema, StorefrontConfigSchema),
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import { StorefrontHooks, RpcContext, RpcMethodName, HashAlgorithm, WithParams, rpcMethods, ShopUser } from '@scayle/storefront-core';
|
|
2
2
|
import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
|
|
3
3
|
import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
|
|
4
|
-
import { CheckoutShopConfigType, SessionType,
|
|
4
|
+
import { CheckoutShopConfigType, SessionType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../../dist/runtime/utils/zodSchema.js';
|
|
5
5
|
import { HookResult } from '@nuxt/schema';
|
|
6
6
|
|
|
7
|
-
type StorageProvider = 'memory' | 'redis';
|
|
8
7
|
type CheckoutShopConfig = CheckoutShopConfigType;
|
|
9
8
|
/**
|
|
10
9
|
* Options to configure how the storefront core manages sessions
|
|
11
10
|
*/
|
|
12
|
-
type SessionConfig = SessionType
|
|
13
|
-
/**
|
|
14
|
-
* The provider to use for the persistent storage.
|
|
15
|
-
* @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead.
|
|
16
|
-
*/
|
|
17
|
-
provider?: StorageProvider;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated
|
|
21
|
-
*/
|
|
22
|
-
type RedisConfig = RedisConfigType;
|
|
11
|
+
type SessionConfig = SessionType;
|
|
23
12
|
type CustomDriverName = string & {
|
|
24
13
|
_custom?: unknown;
|
|
25
14
|
};
|
|
@@ -31,10 +20,6 @@ interface StorageConfig {
|
|
|
31
20
|
cache?: StorageType;
|
|
32
21
|
session?: StorageType;
|
|
33
22
|
}
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use {@link SapiConfig} instead
|
|
36
|
-
*/
|
|
37
|
-
type BapiConfig = SapiConfigType;
|
|
38
23
|
type SapiConfig = SapiConfigType;
|
|
39
24
|
interface AppKeys {
|
|
40
25
|
wishlistKey: string;
|
|
@@ -57,14 +42,8 @@ type StorefrontConfig = StorefrontConfigType & {
|
|
|
57
42
|
type ModuleOption = {
|
|
58
43
|
shopSelector: ShopSelectorType;
|
|
59
44
|
redirects?: RedirectType;
|
|
60
|
-
} & ({
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated stores got renamed. Use {@link ModuleOption.shops} instead
|
|
63
|
-
*/
|
|
64
|
-
stores: ShopConfigIndexed;
|
|
65
|
-
} | {
|
|
66
45
|
shops: ShopConfigIndexed;
|
|
67
|
-
}
|
|
46
|
+
};
|
|
68
47
|
type ModuleBaseOptions = StorefrontConfig & ModuleOption & {
|
|
69
48
|
rpcDir?: string;
|
|
70
49
|
rpcMethodNames?: string[];
|
|
@@ -99,4 +78,4 @@ declare module 'nitropack' {
|
|
|
99
78
|
}
|
|
100
79
|
}
|
|
101
80
|
|
|
102
|
-
export type { AppKeys as A,
|
|
81
|
+
export type { AppKeys as A, CheckoutShopConfig as C, ModuleBaseOptions as M, PublicShopConfig as P, SessionConfig as S, StorageEntity as a, StorageConfig as b, SapiConfig as c, AdditionalShopConfig as d, ShopConfig as e, ShopConfigIndexed as f, StorefrontConfig as g, CheckoutEvent as h, ModulePublicRuntimeConfig as i };
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import { StorefrontHooks, RpcContext, RpcMethodName, HashAlgorithm, WithParams, rpcMethods, ShopUser } from '@scayle/storefront-core';
|
|
2
2
|
import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
|
|
3
3
|
import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
|
|
4
|
-
import { CheckoutShopConfigType, SessionType,
|
|
4
|
+
import { CheckoutShopConfigType, SessionType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../../dist/runtime/utils/zodSchema.js';
|
|
5
5
|
import { HookResult } from '@nuxt/schema';
|
|
6
6
|
|
|
7
|
-
type StorageProvider = 'memory' | 'redis';
|
|
8
7
|
type CheckoutShopConfig = CheckoutShopConfigType;
|
|
9
8
|
/**
|
|
10
9
|
* Options to configure how the storefront core manages sessions
|
|
11
10
|
*/
|
|
12
|
-
type SessionConfig = SessionType
|
|
13
|
-
/**
|
|
14
|
-
* The provider to use for the persistent storage.
|
|
15
|
-
* @deprecated Storefront Core is now relying on a unified cache configuration. Use the storage option instead.
|
|
16
|
-
*/
|
|
17
|
-
provider?: StorageProvider;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated
|
|
21
|
-
*/
|
|
22
|
-
type RedisConfig = RedisConfigType;
|
|
11
|
+
type SessionConfig = SessionType;
|
|
23
12
|
type CustomDriverName = string & {
|
|
24
13
|
_custom?: unknown;
|
|
25
14
|
};
|
|
@@ -31,10 +20,6 @@ interface StorageConfig {
|
|
|
31
20
|
cache?: StorageType;
|
|
32
21
|
session?: StorageType;
|
|
33
22
|
}
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use {@link SapiConfig} instead
|
|
36
|
-
*/
|
|
37
|
-
type BapiConfig = SapiConfigType;
|
|
38
23
|
type SapiConfig = SapiConfigType;
|
|
39
24
|
interface AppKeys {
|
|
40
25
|
wishlistKey: string;
|
|
@@ -57,14 +42,8 @@ type StorefrontConfig = StorefrontConfigType & {
|
|
|
57
42
|
type ModuleOption = {
|
|
58
43
|
shopSelector: ShopSelectorType;
|
|
59
44
|
redirects?: RedirectType;
|
|
60
|
-
} & ({
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated stores got renamed. Use {@link ModuleOption.shops} instead
|
|
63
|
-
*/
|
|
64
|
-
stores: ShopConfigIndexed;
|
|
65
|
-
} | {
|
|
66
45
|
shops: ShopConfigIndexed;
|
|
67
|
-
}
|
|
46
|
+
};
|
|
68
47
|
type ModuleBaseOptions = StorefrontConfig & ModuleOption & {
|
|
69
48
|
rpcDir?: string;
|
|
70
49
|
rpcMethodNames?: string[];
|
|
@@ -99,4 +78,4 @@ declare module 'nitropack' {
|
|
|
99
78
|
}
|
|
100
79
|
}
|
|
101
80
|
|
|
102
|
-
export type { AppKeys as A,
|
|
81
|
+
export type { AppKeys as A, CheckoutShopConfig as C, ModuleBaseOptions as M, PublicShopConfig as P, SessionConfig as S, StorageEntity as a, StorageConfig as b, SapiConfig as c, AdditionalShopConfig as d, ShopConfig as e, ShopConfigIndexed as f, StorefrontConfig as g, CheckoutEvent as h, ModulePublicRuntimeConfig as i };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from 'fishery';
|
|
2
|
-
import { M as ModuleBaseOptions,
|
|
2
|
+
import { M as ModuleBaseOptions, e as ShopConfig } from '../shared/storefront-nuxt.a816664e.mjs';
|
|
3
3
|
import { RpcContext } from '@scayle/storefront-core';
|
|
4
4
|
import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
|
|
5
5
|
export * from '@scayle/storefront-core/dist/test/factories';
|
package/dist/test/factories.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from 'fishery';
|
|
2
|
-
import { M as ModuleBaseOptions,
|
|
2
|
+
import { M as ModuleBaseOptions, e as ShopConfig } from '../shared/storefront-nuxt.a816664e.js';
|
|
3
3
|
import { RpcContext } from '@scayle/storefront-core';
|
|
4
4
|
import { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
|
|
5
5
|
export * from '@scayle/storefront-core/dist/test/factories';
|
package/dist/test/factories.mjs
CHANGED
|
@@ -56,14 +56,12 @@ const rpcContextFactory = Factory.define(({ transientParams }) => {
|
|
|
56
56
|
secret: "",
|
|
57
57
|
user: ""
|
|
58
58
|
},
|
|
59
|
-
bapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
|
|
60
59
|
sapiClient: new StorefrontAPIClient({ host: "", shopId: 1001 }),
|
|
61
60
|
cached: (fn, _options) => {
|
|
62
61
|
return async (...args) => {
|
|
63
62
|
return await fn(...args);
|
|
64
63
|
};
|
|
65
64
|
},
|
|
66
|
-
isCmsPreview: false,
|
|
67
65
|
shopId: 1001,
|
|
68
66
|
domain: "localhost",
|
|
69
67
|
destroySessionsForUserId: () => Promise.resolve(),
|
package/dist/types.d.mts
CHANGED
|
@@ -8,4 +8,4 @@ declare module '@nuxt/schema' {
|
|
|
8
8
|
|
|
9
9
|
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
10
10
|
|
|
11
|
-
export { type AdditionalShopConfig, type AppKeys, type
|
|
11
|
+
export { type AdditionalShopConfig, type AppKeys, type CheckoutEvent, type CheckoutShopConfig, type ModulePublicRuntimeConfig, type PublicShopConfig, type SapiConfig, type SessionConfig, type ShopConfig, type ShopConfigIndexed, type StorageConfig, type StorageEntity, type StorefrontConfig } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ declare module '@nuxt/schema' {
|
|
|
8
8
|
|
|
9
9
|
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
10
10
|
|
|
11
|
-
export { type AdditionalShopConfig, type AppKeys, type
|
|
11
|
+
export { type AdditionalShopConfig, type AppKeys, type CheckoutEvent, type CheckoutShopConfig, type ModulePublicRuntimeConfig, type PublicShopConfig, type SapiConfig, type SessionConfig, type ShopConfig, type ShopConfigIndexed, type StorageConfig, type StorageEntity, type StorefrontConfig } from './module'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"@nuxt/kit": "^3.12.2",
|
|
74
74
|
"@opentelemetry/api": "^1.9.0",
|
|
75
75
|
"@scayle/h3-session": "^0.4.1",
|
|
76
|
-
"@scayle/storefront-core": "
|
|
76
|
+
"@scayle/storefront-core": "8.0.0",
|
|
77
77
|
"@scayle/unstorage-compression-driver": "^0.1.5",
|
|
78
|
-
"@vueuse/core": "
|
|
78
|
+
"@vueuse/core": "12.0.0",
|
|
79
79
|
"consola": "^3.2.3",
|
|
80
80
|
"core-js": "^3.37.1",
|
|
81
81
|
"defu": "^6.1.4",
|
|
@@ -91,25 +91,25 @@
|
|
|
91
91
|
"schema-dts": "1.1.2"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@nuxt/eslint": "0.7.
|
|
94
|
+
"@nuxt/eslint": "0.7.2",
|
|
95
95
|
"@nuxt/module-builder": "0.8.4",
|
|
96
96
|
"@nuxt/schema": "3.13.2",
|
|
97
97
|
"@nuxt/test-utils": "3.14.4",
|
|
98
98
|
"@scayle/eslint-config-storefront": "4.3.2",
|
|
99
99
|
"@scayle/eslint-plugin-vue-composable": "0.2.1",
|
|
100
|
-
"@types/node": "22.
|
|
101
|
-
"dprint": "0.47.
|
|
102
|
-
"eslint": "9.
|
|
100
|
+
"@types/node": "22.10.1",
|
|
101
|
+
"dprint": "0.47.6",
|
|
102
|
+
"eslint": "9.16.0",
|
|
103
103
|
"eslint-formatter-gitlab": "5.1.0",
|
|
104
104
|
"fishery": "2.2.2",
|
|
105
105
|
"h3": "1.13.0",
|
|
106
106
|
"nitropack": "2.9.7",
|
|
107
107
|
"node-mocks-http": "1.16.1",
|
|
108
|
-
"nuxi": "3.
|
|
108
|
+
"nuxi": "3.16.0",
|
|
109
109
|
"nuxt": "3.13.2",
|
|
110
110
|
"publint": "0.2.12",
|
|
111
111
|
"vue-tsc": "2.1.10",
|
|
112
|
-
"vitest": "2.1.
|
|
112
|
+
"vitest": "2.1.8"
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
115
|
"fishery": "^2.2.2",
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { CacheOptions, FilterParams, ProductWith } from '@scayle/storefront-core';
|
|
2
|
-
type FacetParams = Partial<{
|
|
3
|
-
with: {
|
|
4
|
-
product?: ProductWith;
|
|
5
|
-
};
|
|
6
|
-
includedFilters: string[];
|
|
7
|
-
includeSoldOut: boolean;
|
|
8
|
-
includeSellableForFree: boolean;
|
|
9
|
-
}> & {
|
|
10
|
-
initialPath?: string;
|
|
11
|
-
};
|
|
12
|
-
type Options = Partial<{
|
|
13
|
-
params: FacetParams;
|
|
14
|
-
/** @deprecated use the second argument of the composable to define the key */
|
|
15
|
-
key: string;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function useFacet({ key: optionsKey, params, }?: Options, _key?: string): {
|
|
18
|
-
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
19
|
-
filtersFetching: import("vue").Ref<boolean, boolean>;
|
|
20
|
-
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
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
|
-
productCountData: import("vue").Ref<{
|
|
24
|
-
count: number;
|
|
25
|
-
} | null, {
|
|
26
|
-
count: number;
|
|
27
|
-
} | null>;
|
|
28
|
-
refreshProductCount: ({ where, }?: FilterParams) => Promise<void>;
|
|
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>;
|
|
32
|
-
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
33
|
-
pagination: import("vue").ComputedRef<{
|
|
34
|
-
current: number;
|
|
35
|
-
total: number;
|
|
36
|
-
perPage: number;
|
|
37
|
-
page: number;
|
|
38
|
-
first: number;
|
|
39
|
-
prev: number;
|
|
40
|
-
next: number;
|
|
41
|
-
last: number;
|
|
42
|
-
} | undefined>;
|
|
43
|
-
productsFetching: import("vue").Ref<boolean, boolean>;
|
|
44
|
-
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
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>;
|
|
47
|
-
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
48
|
-
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
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>;
|
|
52
|
-
fetchProducts: ({ path, page, perPage, where, sort, pricePromotionKey, cache, orFiltersOperator, }: FilterParams & {
|
|
53
|
-
path: string;
|
|
54
|
-
pricePromotionKey?: string;
|
|
55
|
-
cache?: CacheOptions;
|
|
56
|
-
}) => Promise<true | undefined>;
|
|
57
|
-
fetchPage: (pageToFetch: number) => Promise<void>;
|
|
58
|
-
} & Promise<{
|
|
59
|
-
filters: import("vue").ComputedRef<import("@scayle/storefront-api").FiltersEndpointResponseData | undefined>;
|
|
60
|
-
filtersFetching: import("vue").Ref<boolean, boolean>;
|
|
61
|
-
unfilteredCount: import("vue").ComputedRef<number | undefined>;
|
|
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>;
|
|
64
|
-
productCountData: import("vue").Ref<{
|
|
65
|
-
count: number;
|
|
66
|
-
} | null, {
|
|
67
|
-
count: number;
|
|
68
|
-
} | null>;
|
|
69
|
-
refreshProductCount: ({ where, }?: FilterParams) => Promise<void>;
|
|
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>;
|
|
73
|
-
products: import("vue").ComputedRef<import("@scayle/storefront-api").Product[] | undefined>;
|
|
74
|
-
pagination: import("vue").ComputedRef<{
|
|
75
|
-
current: number;
|
|
76
|
-
total: number;
|
|
77
|
-
perPage: number;
|
|
78
|
-
page: number;
|
|
79
|
-
first: number;
|
|
80
|
-
prev: number;
|
|
81
|
-
next: number;
|
|
82
|
-
last: number;
|
|
83
|
-
} | undefined>;
|
|
84
|
-
productsFetching: import("vue").Ref<boolean, boolean>;
|
|
85
|
-
filterProducts: ({ where, page, sort, orFiltersOperator, }: FilterParams) => Promise<void>;
|
|
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>;
|
|
88
|
-
categories: import("vue").ComputedRef<import("@scayle/storefront-api").Category | import("@scayle/storefront-api").Category[] | undefined>;
|
|
89
|
-
selectedCategory: import("vue").ComputedRef<import("@scayle/storefront-api").Category | undefined>;
|
|
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>;
|
|
93
|
-
fetchProducts: ({ path, page, perPage, where, sort, pricePromotionKey, cache, orFiltersOperator, }: FilterParams & {
|
|
94
|
-
path: string;
|
|
95
|
-
pricePromotionKey?: string;
|
|
96
|
-
cache?: CacheOptions;
|
|
97
|
-
}) => Promise<true | undefined>;
|
|
98
|
-
fetchPage: (pageToFetch: number) => Promise<void>;
|
|
99
|
-
}>;
|
|
100
|
-
export {};
|