@scayle/storefront-nuxt 8.10.1 → 8.10.3

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.d.mts +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/module.d.mts +32 -2
  5. package/dist/module.d.ts +32 -2
  6. package/dist/module.json +1 -1
  7. package/dist/module.mjs +6 -1
  8. package/dist/runtime/campaignKey.d.ts +1 -4
  9. package/dist/runtime/campaignKey.js +5 -17
  10. package/dist/runtime/context.js +1 -1
  11. package/dist/runtime/error/handler.d.ts +7 -0
  12. package/dist/runtime/nitro/plugins/cacheRuntimeConfig.d.ts +12 -0
  13. package/dist/runtime/nitro/plugins/configValidation.d.ts +39 -0
  14. package/dist/runtime/nitro/plugins/nitroLogger.d.ts +8 -0
  15. package/dist/runtime/nitro/plugins/nitroRuntimeStorageConfig.d.ts +10 -0
  16. package/dist/runtime/nitro/plugins/nitroSetXPoweredByHeader.d.ts +7 -0
  17. package/dist/runtime/plugin/log.client.d.ts +12 -0
  18. package/dist/runtime/plugin/log.server.d.ts +12 -0
  19. package/dist/runtime/plugin/shop.d.ts +15 -0
  20. package/dist/runtime/server/middleware/bootstrap-utils.d.ts +62 -0
  21. package/dist/runtime/server/middleware/bootstrap.d.ts +33 -0
  22. package/dist/runtime/server/middleware/redirects.d.ts +13 -0
  23. package/dist/runtime/server/middleware/redirects.utils.d.ts +19 -9
  24. package/dist/runtime/server/utils/cacheStorage.d.ts +14 -8
  25. package/dist/runtime/utils/seo.d.ts +11 -0
  26. package/dist/shared/storefront-nuxt.b72fefd0.d.mts +267 -0
  27. package/dist/shared/storefront-nuxt.b72fefd0.d.ts +267 -0
  28. package/dist/test/factories.d.mts +1 -1
  29. package/dist/test/factories.d.ts +1 -1
  30. package/package.json +4 -4
  31. package/dist/shared/storefront-nuxt.a816664e.d.mts +0 -81
  32. package/dist/shared/storefront-nuxt.a816664e.d.ts +0 -81
@@ -1,81 +0,0 @@
1
- import { StorefrontHooks, RpcContext, RpcMethodName, HashAlgorithm, WithParams, rpcMethods, ShopUser } from '@scayle/storefront-core';
2
- import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
3
- import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
4
- import { CheckoutShopConfigType, SessionType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../../dist/runtime/utils/zodSchema.js';
5
- import { HookResult } from '@nuxt/schema';
6
-
7
- type CheckoutShopConfig = CheckoutShopConfigType;
8
- /**
9
- * Options to configure how the storefront core manages sessions
10
- */
11
- type SessionConfig = SessionType;
12
- type CustomDriverName = string & {
13
- _custom?: unknown;
14
- };
15
- type StorageEntity<Driver extends BuiltinDriverName | CustomDriverName | unknown = unknown, DriverOptions = Driver extends keyof BuiltinDriverOptions ? BuiltinDriverOptions[Driver] : unknown> = {
16
- driver: Driver;
17
- compression?: CompressionEncodings;
18
- } & DriverOptions;
19
- interface StorageConfig {
20
- cache?: StorageType;
21
- session?: StorageType;
22
- }
23
- type SapiConfig = SapiConfigType;
24
- interface AppKeys {
25
- wishlistKey: string;
26
- basketKey: string;
27
- hashAlgorithm: HashAlgorithm;
28
- }
29
- interface AdditionalShopConfig {
30
- }
31
- type ShopConfig = ShopConfigType & AdditionalShopConfig;
32
- type ShopConfigIndexed = Record<string, ShopConfig>;
33
- interface PublicShopConfig extends Pick<ShopConfig, 'shopId' | 'domain' | 'locale' | 'currency' | 'currencyFractionDigits'> {
34
- checkout: Pick<CheckoutShopConfig, 'host'>;
35
- apiBasePath: string;
36
- idp?: IdpType;
37
- path?: string;
38
- }
39
- type StorefrontConfig = StorefrontConfigType & {
40
- withParams?: WithParams;
41
- };
42
- type ModuleOption = {
43
- shopSelector: ShopSelectorType;
44
- redirects?: RedirectType;
45
- shops: ShopConfigIndexed;
46
- };
47
- type ModuleBaseOptions = StorefrontConfig & ModuleOption & {
48
- rpcDir?: string;
49
- rpcMethodNames?: string[];
50
- rpcMethodOverrides?: Array<keyof typeof rpcMethods>;
51
- };
52
- interface CheckoutEvent {
53
- action?: 'authenticated';
54
- type?: 'tracking';
55
- user: ShopUser;
56
- accessToken: string;
57
- event?: {
58
- event: 'login' | 'add_to_cart' | 'remove_from_cart';
59
- status: 'successful' | 'error';
60
- };
61
- }
62
- interface ModulePublicRuntimeConfig extends ModulePublicRuntimeConfigType {
63
- }
64
- declare module '@nuxt/schema' {
65
- interface RuntimeConfig {
66
- storefront: ModuleBaseOptions;
67
- }
68
- interface PublicRuntimeConfig {
69
- storefront: ModulePublicRuntimeConfig;
70
- }
71
- }
72
- declare module 'nitropack' {
73
- interface NitroRuntimeHooks extends StorefrontHooks {
74
- 'storefront:context:created': (context: RpcContext) => HookResult;
75
- 'storefront:rpc:before': (rpcName: RpcMethodName, context: RpcContext, payload: unknown) => HookResult;
76
- 'storefront:rpc:after': (rpcName: RpcMethodName, context: RpcContext, result: unknown) => HookResult;
77
- 'storefront:rpc:error': (rpcName: RpcMethodName, context: RpcContext, error: unknown) => HookResult;
78
- }
79
- }
80
-
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 };