@swell/apps-sdk 1.0.143 → 1.0.144

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/dist/src/api.d.ts CHANGED
@@ -31,7 +31,7 @@ export declare class Swell {
31
31
  * Fetches a resource.
32
32
  * First attempts to fetch from cache.
33
33
  */
34
- getCachedResource<T>(key: string, args: unknown[], handler: () => T | Promise<T>): Promise<T | undefined>;
34
+ getCachedResource<T>(key: string, args: unknown[], handler: () => T | Promise<T>, isCacheble?: boolean): Promise<T | undefined>;
35
35
  getAppSettings(): Promise<SwellData>;
36
36
  getStorefrontSettings(force?: boolean): Promise<SwellData>;
37
37
  getStorefrontMenus(): SwellMenu[];
@@ -18,7 +18,7 @@ export declare class Cache {
18
18
  *
19
19
  * This will always return the cached value immediately if exists
20
20
  */
21
- fetchSWR<T>(key: string, fetchFn: () => T | Promise<T>, ttl?: number): Promise<T>;
21
+ fetchSWR<T>(key: string, fetchFn: () => T | Promise<T>, ttl?: number, isCacheble?: boolean): Promise<T>;
22
22
  get<T>(key: string): Promise<T | undefined>;
23
23
  set<T>(key: string, value: T, ttl?: number): Promise<T>;
24
24
  flush(key: string): Promise<void>;
@@ -37,6 +37,7 @@ export declare class SwellTheme {
37
37
  menus: Record<string, SwellMenu | undefined>;
38
38
  geo: SwellSettingsGeo;
39
39
  configs: ThemeConfigs;
40
+ storefrontSettings: SwellData;
40
41
  }>;
41
42
  resolvePageData(store: SwellData, configs: ThemeConfigs, pageId?: string, altTemplate?: string): Promise<{
42
43
  settings: ThemeSettings;
@@ -46,7 +47,7 @@ export declare class SwellTheme {
46
47
  account: SwellStorefrontSingleton | null;
47
48
  customer?: SwellStorefrontSingleton | null;
48
49
  }>;
49
- fetchSingletonResourceCached<R>(key: string, handler: () => Promise<R>, defaultValue: () => R | Promise<R>): Promise<R | undefined>;
50
+ fetchSingletonResourceCached<R>(key: string, handler: () => Promise<R>, defaultValue: () => R | Promise<R>, isCacheble?: boolean): Promise<R | undefined>;
50
51
  fetchCart(): Promise<StorefrontResource>;
51
52
  fetchAccount(): Promise<StorefrontResource | null>;
52
53
  getFormConfig(formType: string): ThemeFormConfig | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@swell/apps-sdk",
3
3
  "type": "module",
4
- "version": "1.0.143",
4
+ "version": "1.0.144",
5
5
  "description": "Swell SDK for building isomorphic apps.",
6
6
  "author": "Swell",
7
7
  "license": "MIT",